ac/nir: fix 64-bit NGG GS output stores
I don't know why this was here. The DIV_ROUND_UP ensures that it's always at least 1 and the MIN2 ensures that it's never greater than 1. Fixes some KHR-Single-GL46.enhanced_layouts.varying_* tests with zink: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6301 Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15863>
This commit is contained in:
parent
4c1cb62999
commit
ab1409010a
|
@ -1562,7 +1562,7 @@ lower_ngg_gs_store_output(nir_builder *b, nir_intrinsic_instr *intrin, lower_ngg
|
|||
/* Small bitsize components consume the same amount of space as 32-bit components,
|
||||
* but 64-bit ones consume twice as many. (Vulkan spec 15.1.5)
|
||||
*/
|
||||
unsigned num_consumed_components = MIN2(1, DIV_ROUND_UP(store_val->bit_size, 32));
|
||||
unsigned num_consumed_components = DIV_ROUND_UP(store_val->bit_size, 32);
|
||||
nir_ssa_def *element = nir_channel(b, store_val, comp);
|
||||
if (num_consumed_components > 1)
|
||||
element = nir_extract_bits(b, &element, 1, 0, num_consumed_components, 32);
|
||||
|
|
|
@ -50,11 +50,6 @@ KHR-GL46.shader_image_load_store.non-layered_binding,Fail
|
|||
KHR-GL46.shader_ballot_tests.ShaderBallotFunctionRead,Fail
|
||||
|
||||
# radv issue #6301
|
||||
KHR-Single-GL46.enhanced_layouts.varying_array_components,Fail
|
||||
KHR-Single-GL46.enhanced_layouts.varying_array_locations,Fail
|
||||
KHR-Single-GL46.enhanced_layouts.varying_components,Fail
|
||||
KHR-Single-GL46.enhanced_layouts.varying_locations,Fail
|
||||
KHR-Single-GL46.enhanced_layouts.varying_structure_locations,Fail
|
||||
KHR-Single-GL46.enhanced_layouts.xfb_override_qualifiers_with_api,Fail
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue