diff options
author | Danylo Piliaiev <dpiliaiev@igalia.com> | 2022-07-28 10:28:55 +0300 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-08-03 10:51:58 +0000 |
commit | e1c89abd8616dc6ae6d492ac43c70ca2d6a002ef (patch) | |
tree | d540bb4c6e4198c57d646b78cd36dd7755d6d32b | |
parent | ed7814def77384fc0c8588b173ecdf8f383dc372 (diff) | |
download | mesa-e1c89abd8616dc6ae6d492ac43c70ca2d6a002ef.tar.gz |
ir3: Never remove GS_HEADER_IR3 sysval input
Without GS header geometry shader is never invoked which may cause
issues if it has side-effects.
Fixes GL CTS tests running via Zink:
KHR-GL46.shader_image_load_store.multiple-uniforms
KHR-GL46.texture_cube_map_array.image_op_geometry_sh
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6940
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17771>
-rw-r--r-- | src/freedreno/ir3/ir3_dce.c | 19 | ||||
-rw-r--r-- | src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt | 6 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/freedreno/ir3/ir3_dce.c b/src/freedreno/ir3/ir3_dce.c index a3ddbe802b1..02cd29b68dd 100644 --- a/src/freedreno/ir3/ir3_dce.c +++ b/src/freedreno/ir3/ir3_dce.c @@ -111,12 +111,19 @@ find_and_remove_unused(struct ir3 *ir, struct ir3_shader_variant *so) */ foreach_block (block, &ir->block_list) { foreach_instr (instr, &block->instr_list) { - /* special case, if pre-fs texture fetch used, we cannot - * eliminate the barycentric i/j input - */ - if (so->num_sampler_prefetch && (instr->opc == OPC_META_INPUT) && - (instr->input.sysval == SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL)) - continue; + if (instr->opc == OPC_META_INPUT) { + /* special case, if pre-fs texture fetch used, we cannot + * eliminate the barycentric i/j input + */ + if (so->num_sampler_prefetch && + instr->input.sysval == SYSTEM_VALUE_BARYCENTRIC_PERSP_PIXEL) + continue; + + /* Without GS header geometry shader is never invoked. */ + if (instr->input.sysval == SYSTEM_VALUE_GS_HEADER_IR3) + continue; + } + instr->flags |= IR3_INSTR_UNUSED; } } diff --git a/src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt b/src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt index b2e8ecc9bb0..70654ce212d 100644 --- a/src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt @@ -8,12 +8,6 @@ KHR-Single-GL46.arrays_of_arrays_gl.SubroutineFunctionCalls2,Crash dEQP-GLES31.functional.texture.border_clamp.range_clamp.linear_srgb_color,Fail dEQP-GLES31.functional.texture.border_clamp.range_clamp.nearest_srgb_color,Fail -# https://gitlab.freedesktop.org/mesa/mesa/-/issues/6940 -KHR-GL46.shader_image_load_store.multiple-uniforms,Fail -KHR-GL46.texture_cube_map_array.image_op_geometry_sh,Fail -KHR-GLES31.core.texture_cube_map_array.image_op_geometry_sh,Fail -KHR-GLES32.core.texture_cube_map_array.image_op_geometry_sh,Fail - # Turnip has maxFragmentInputComponents = 124, while GL requires # gl_MaxFragmentInputComponents >= 128 KHR-GL46.limits.max_fragment_input_components,Fail |