svga: SVGA_3D_CMD_BIND_GB_SHADER needs to reserve two relocations.
authorMatthew McClure <mcclurem@vmware.com>
Fri, 27 Jun 2014 17:24:08 +0000 (10:24 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 4 Aug 2014 20:06:13 +0000 (14:06 -0600)
With this patch, the SVGA_3D_CMD_BIND_GB_SHADER functionality will reserve
two relocations, one for the shader ID and the second for the MOB ID.

Verified with the WDDM winsys path that the number of relocations and patch
locations required is two.

Fixes Bug 1277406

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/svga/svga_cmd.c

index 3bb93c750b40323d38239e16e0454a32d0c9df53..474b75c3c86bad7e21217ccc341a50e164079568 100644 (file)
@@ -1652,7 +1652,7 @@ SVGA3D_BindGBShader(struct svga_winsys_context *swc,
       SVGA3D_FIFOReserve(swc,
                          SVGA_3D_CMD_BIND_GB_SHADER,
                          sizeof *cmd,
-                         1);  /* one relocation */
+                         2);  /* two relocations */
 
    if (!cmd)
       return PIPE_ERROR_OUT_OF_MEMORY;