AnsweredAssumed Answered

Vulkan loading/compiling SPIRV in AMD Driver use too much RAM

Question asked by danilw on Feb 8, 2020

Short:

1. download this vk_spirv_mem.zip

2. open vk_spirv_mem.zip\vk_spirv_mem\shaders\spv\buf.frag.spv in Radeon GPU Analyzer (RGA)

3. look on RAM usage in Windows Task Manager, I have ~5.2Gb RAM usage for 1-2 min time by RGA or VKlauncher

 

instead of RGA, launch VKlauncher.exe RAM usage will be same, on shader first loading, when it loaded RAM become normal (~30Mb for that app)

 

Long:

Shader source code in vk_spirv_mem.zip\vk_spirv_mem\shaders\src\Buf0.glsl

This shader based on Shadertoy link few small modifications, original shader(from that shadertoy) use ~3Gb RAM in AMD Vulkan (this shader in OpenGL launcher)

 

OpenGL on same AMD hardware do no have this problem.(at all, it load/work fine)

Nvidia load this shader fine.(no RAM usage)

 

OS Windows 10, everything latest (1 week old)

Hardware AMD Vega 8 (Ryzen 3200) (I think it does not matter)

 

shader compiled with glslangValidator -V100 <files> command, nothing secial

Vulkan code of VKlauncher.exe are valid, and it does not matter because RGA show same result

Outcomes