Module: Mesa Branch: main Commit: d7c4a1beb4a3f8f5e51c8abb171ac121365a2299 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d7c4a1beb4a3f8f5e51c8abb171ac121365a2299
Author: Charmaine Lee <[email protected]> Date: Wed May 11 21:15:40 2022 -0700 svga: fix clip distance shadow copy writemask Fix clip distance shadow copy writemask as the shadow copy includes clip distances to all clip planes whether enabled or not. Fixes [email protected]@execution@interpolation@interpolation-*distance Reviewed-by: Neha Bhende <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16481> --- src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index 03e7b0f4fb2..2ca153ade31 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -5512,12 +5512,13 @@ emit_output_declarations(struct svga_shader_emitter_v10 *emit) /* Emit the declaration for the clip distance shadow copy which * will be used for stream output purpose and for clip distance - * varying variable + * varying variable. Note all clip distances + * will be written regardless of the enabled clipping planes. */ emit_output_declaration(emit, VGPU10_OPCODE_DCL_OUTPUT, emit->clip_dist_so_index, VGPU10_NAME_UNDEFINED, - emit->output_usage_mask[emit->clip_dist_out_index], + VGPU10_OPERAND_4_COMPONENT_MASK_ALL, TRUE, SVGADX_SIGNATURE_SEMANTIC_NAME_UNDEFINED); @@ -5526,7 +5527,7 @@ emit_output_declarations(struct svga_shader_emitter_v10 *emit) emit_output_declaration(emit, VGPU10_OPCODE_DCL_OUTPUT, emit->clip_dist_so_index + 1, VGPU10_NAME_UNDEFINED, - emit->output_usage_mask[emit->clip_dist_out_index+1], + VGPU10_OPERAND_4_COMPONENT_MASK_ALL, TRUE, SVGADX_SIGNATURE_SEMANTIC_NAME_UNDEFINED); }
