nv2a/vk: Fix missing scale in d32_sfloat_s8_uint pack

This commit is contained in:
Matt Borgerson 2024-07-26 17:21:02 -07:00 committed by mborgerson
parent ddc1a388e8
commit 8e5a77c45d
1 changed files with 4 additions and 3 deletions

View File

@ -83,9 +83,10 @@ const char *pack_d32_sfloat_s8_uint_to_z24s8_glsl =
"layout(binding = 1) buffer StencilIn { uint stencil_in[]; };\n"
"layout(binding = 2) buffer DepthStencilOut { uint depth_stencil_out[]; };\n"
"uint get_input_idx(uint idx_out) {\n"
" uint y = idx_out / width_out;\n"
" uint x = idx_out % width_out;\n"
" return (y * width_in + x) * (width_in / width_out);\n"
" uint scale = width_in / width_out;"
" uint y = (idx_out / width_out) * scale;\n"
" uint x = (idx_out % width_out) * scale;\n"
" return y * width_in + x;\n"
"}\n"
"void main() {\n"
" uint idx_out = gl_GlobalInvocationID.x;\n"