From 2357e7a202f30d091f548674779ac946af7b7b3f Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Thu, 6 Apr 2017 16:44:11 +0200 Subject: st/pbo: select the right swizzle for instance IDs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The system value only has an X component, and radeonsi started checking that in debug builds. Reported-by: Michel Dänzer Fixes: 4cf29427770f ("radeonsi: support 64-bit system values") Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_pbo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_pbo.c b/src/mesa/state_tracker/st_pbo.c index 2c63c092ed5..1ded58392c1 100644 --- a/src/mesa/state_tracker/st_pbo.c +++ b/src/mesa/state_tracker/st_pbo.c @@ -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)); } } -- cgit v1.2.3