From: Philip Rebohle Subject: [PATCH vkd3d 06/11] vkd3d-shader: Use full write mask for variables for array built-ins. Message-Id: <20191016195544.23720-7-philip.rebohle@tu-dortmund.de> Date: Wed, 16 Oct 2019 21:55:40 +0200 In-Reply-To: <20191016195544.23720-1-philip.rebohle@tu-dortmund.de> References: <20191016195544.23720-1-philip.rebohle@tu-dortmund.de> Private variables are always vec4, so using a sparse write mask here will lead to invalid code being generated when accessing the variable. This is needed for the following commits. Signed-off-by: Philip Rebohle --- libs/vkd3d-shader/spirv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 76df8fc..74b6e52 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -4320,7 +4320,7 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler storage_class = SpvStorageClassOutput; if ((use_private_variable = builtin && builtin->spirv_array_size)) - write_mask = dst->write_mask; + write_mask = VKD3DSP_WRITEMASK_ALL; else if (get_shader_output_swizzle(compiler, signature_element->register_index) != VKD3D_NO_SWIZZLE || needs_private_io_variable(shader_signature, signature_element->register_index, builtin, &output_component_count, &write_mask) -- 2.23.0