From 2937c100e19e37c92e6b998d9bef77f15b1a90c9 Mon Sep 17 00:00:00 2001 From: Charmaine Lee Date: Tue, 9 Aug 2022 19:39:29 -0700 Subject: [PATCH] svga: fix SetConstantBufferOffset command opcode This patch fixes the SetConstantBufferOffset command opcode which is not mapped correctly after the reordering of the pipe shader type defines. Acked-by: Dave Airlie Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/drivers/svga/svga_state_constants.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/svga/svga_state_constants.c b/src/gallium/drivers/svga/svga_state_constants.c index 71ad3b96398..d6d379e2797 100644 --- a/src/gallium/drivers/svga/svga_state_constants.c +++ b/src/gallium/drivers/svga/svga_state_constants.c @@ -857,7 +857,8 @@ emit_constbuf(struct svga_context *svga, new_buf_size); } else if (dst_handle){ - unsigned command = SVGA_3D_CMD_DX_SET_VS_CONSTANT_BUFFER_OFFSET + shader; + unsigned command = SVGA_3D_CMD_DX_SET_VS_CONSTANT_BUFFER_OFFSET + + svga_shader_type(shader) - SVGA3D_SHADERTYPE_VS; ret = SVGA3D_vgpu10_SetConstantBufferOffset(svga->swc, command, slot, /* index */