From: Gert Wollny Date: Sat, 18 Jul 2020 19:33:54 +0000 (+0200) Subject: r600/sfn: Add a forced output swizzle for depth write X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c18b1c6df5108112445c34b30680d8818202a4cb;p=mesa.git r600/sfn: Add a forced output swizzle for depth write This makes sure no components are written that shouldn't be written. Signed-off-by: Gert Wollny Part-of: --- diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp b/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp index 850092ef843..978d96277d1 100644 --- a/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp @@ -701,6 +701,10 @@ bool FragmentShaderFromNir::emit_export_pixel(const nir_variable *out_var, nir_i std::array swizzle; unsigned writemask = nir_intrinsic_write_mask(instr); switch (out_var->data.location) { + case FRAG_RESULT_DEPTH: + writemask = 1; + swizzle = {0,7,7,7}; + break; case FRAG_RESULT_STENCIL: writemask = 2; swizzle = {7,0,7,7};