From 7fe581203b2b5d4277910c55e9a67308dc9b386a Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Tue, 18 Jun 2024 13:18:59 -0500 Subject: [PATCH] vkd3d-shader/hlsl: Respect the coords writemask in write_sm1_resource_load(). Spotted by Francisco Casas. --- libs/vkd3d-shader/d3dbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/d3dbc.c b/libs/vkd3d-shader/d3dbc.c index 2290385d..3665b99a 100644 --- a/libs/vkd3d-shader/d3dbc.c +++ b/libs/vkd3d-shader/d3dbc.c @@ -2582,7 +2582,7 @@ static void write_sm1_resource_load(struct hlsl_ctx *ctx, struct vkd3d_bytecode_ .srcs[0].type = D3DSPR_TEMP, .srcs[0].reg = coords->reg.id, - .srcs[0].swizzle = hlsl_swizzle_from_writemask(VKD3DSP_WRITEMASK_ALL), + .srcs[0].swizzle = hlsl_swizzle_from_writemask(coords->reg.writemask), .srcs[1].type = D3DSPR_SAMPLER, .srcs[1].reg = reg_id,