softpipe: use provoking vertex for layer
authorRoland Scheidegger <sroland@vmware.com>
Thu, 3 Dec 2015 00:19:52 +0000 (01:19 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 4 Dec 2015 02:42:19 +0000 (03:42 +0100)
Same as for llvmpipe, albeit softpipe only really handles multiple layers,
not multiple viewports/scissors.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/softpipe/sp_setup.c

index ff3cb9fe5e1fc9d9a5798b0749397b98894a34a2..973803e909d6908c8b8577bf7d0a1201ddf94189 100644 (file)
@@ -840,7 +840,7 @@ sp_setup_tri(struct setup_context *setup,
    setup->span.right[1] = 0;
    /*   setup->span.z_mode = tri_z_mode( setup->ctx ); */
    if (setup->softpipe->layer_slot > 0) {
-      layer = *(unsigned *)v1[setup->softpipe->layer_slot];
+      layer = *(unsigned *)setup->vprovoke[setup->softpipe->layer_slot];
       layer = MIN2(layer, setup->max_layer);
    }
    setup->quad[0].input.layer = layer;
@@ -1127,7 +1127,7 @@ sp_setup_line(struct setup_context *setup,
    setup->quad[0].input.x0 = setup->quad[0].input.y0 = -1;
    setup->quad[0].inout.mask = 0x0;
    if (setup->softpipe->layer_slot > 0) {
-      layer = *(unsigned *)v1[setup->softpipe->layer_slot];
+      layer = *(unsigned *)setup->vprovoke[setup->softpipe->layer_slot];
       layer = MIN2(layer, setup->max_layer);
    }
    setup->quad[0].input.layer = layer;