Commit cfa01331 authored by Karol Herbst's avatar Karol Herbst 🐧
Browse files

nv50/ir/nir: fix smem size for GL

Originally I tried to fix where the nir itself has a shared mem size of 0,
but the frontend (here clover) set it to some value. But st/mesa presets
it on the state object and we actually double the value in the end.

Just use max the value and use the biggest one.

Fixes the compute_shader.shared-max CTS test.

Fixes: dc667b1f

 ("nv50/ir/nir: fix smem size")
Signed-off-by: Karol Herbst's avatarKarol Herbst <>
parent c65c99c7
Pipeline #327494 waiting for manual action with stages
in 8 seconds
......@@ -1292,7 +1292,7 @@ Converter::parseNIR()
info->prop.cp.numThreads[0] = nir->info.cs.local_size[0];
info->prop.cp.numThreads[1] = nir->info.cs.local_size[1];
info->prop.cp.numThreads[2] = nir->info.cs.local_size[2];
info_out->bin.smemSize += nir->info.shared_size;
info_out->bin.smemSize = std::max(info_out->bin.smemSize, nir->info.shared_size);
case Program::TYPE_FRAGMENT:
info_out->prop.fp.earlyFragTests = nir->info.fs.early_fragment_tests;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment