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 <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17977>
This commit is contained in:
Charmaine Lee 2022-08-09 19:39:29 -07:00 committed by Marge Bot
parent bea050345e
commit 2937c100e1

View file

@ -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 */