st/pbo: select the right swizzle for instance IDs
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 6 Apr 2017 14:44:11 +0000 (16:44 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 6 Apr 2017 18:26:27 +0000 (20:26 +0200)
The system value only has an X component, and radeonsi started
checking that in debug builds.

Reported-by: Michel Dänzer <michel.daenzer@amd.com>
Fixes: 4cf29427770f ("radeonsi: support 64-bit system values")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_pbo.c

index 2c63c092ed54e9f091235acc5b3b6276d5d26ab1..1ded58392c1ee01c033e5d5cd1dd7670837e4778 100644 (file)
@@ -333,7 +333,8 @@ st_pbo_create_vs(struct st_context *st)
                         ureg_scalar(in_instanceid, TGSI_SWIZZLE_X));
       } else {
          /* out_layer = gl_InstanceID */
-         ureg_MOV(ureg, out_layer, in_instanceid);
+         ureg_MOV(ureg, ureg_writemask(out_layer, TGSI_WRITEMASK_X),
+                        ureg_scalar(in_instanceid, TGSI_SWIZZLE_X));
       }
    }