Vulkan driver bug: regression in HLSL GetDimensions
on RWTexture2DArray
(original) (raw)
December 1, 2024, 6:50pm 1
In a recent driver update the behaviour of the HLSL GetDimensions
call is broken when called on a RWTexture2DArray
that has a view with more than 1 level attached.GetDimensions
returns the width and height of mip level 0 instead of the bound view’s dimensions.
GPUs tested: Nvidia 3060, Nvidia 4080
Still working: 560.94.0
Broken: 566.14.0
To reproduce I created a minimal repro case:
git clone https://github.com/Sanakan8472/Vulkan-Samples.git Vulkan-Samples-Fork
cd Vulkan-Samples-Fork
git submodule update --init --recursive
cmake -G "Visual Studio 17 2022" -A x64 -S . -Bbuild/windows
cmake --build build/windows --config Debug --target vulkan_samples
build\windows\app\bin\Debug\AMD64\vulkan_samples.exe sample texture_mipmap_generation
The code commit here writes to every mip level of a texture with 6 layers using an added compute shader.
The dispatch on level 0 works fine, but on all the following levels, the shader call to GetDimensions
returns the width / height of miplevel 0 instead of the bound view to mip level 1, 2, etc.
You can see this by switching the sample to bilinear sampling as you will see that the higher mip levels get darker and darker.
Better yet, do a Renderdoc capture: Top is the new broken driver, below is the old working driver.
I’ve also noticed that the issue only occurs if you bind a view to the shader that has more than one level. On single level views the problem does not occur.
Please provide simple executable application for testing instead of gtithub links, It helps nVidia team
Sora March 21, 2025, 1:15pm 3
having visible source code helps more.