aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorBoyan Ding <[email protected]>2017-04-12 21:14:22 +0800
committerJason Ekstrand <[email protected]>2017-04-14 14:54:06 -0700
commitff29f488d4a2d05cdefbca7d675c479b2a1780a0 (patch)
tree74a0e00eb256e117b1589c5e2ad696fee17bfd5e /src/compiler/glsl
parent39f51b5db9404b166fa7c1845a348f427c03a8f1 (diff)
nir: Destination component count of shader_clock intrinsic is 2
This fixes the following error when using ARB_shader_clock on i965: vec1 32 ssa_0 = intrinsic shader_clock () () () intrinsic store_var (ssa_0) (clock_retval) (3) /* wrmask=xy */ error: src->ssa->num_components == num_components (nir/nir_validate.c:204) Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: [email protected]
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index f0557f985bf..870d4576818 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -930,7 +930,8 @@ nir_visitor::visit(ir_call *ir)
nir_builder_instr_insert(&b, &instr->instr);
break;
case nir_intrinsic_shader_clock:
- nir_ssa_dest_init(&instr->instr, &instr->dest, 1, 32, NULL);
+ nir_ssa_dest_init(&instr->instr, &instr->dest, 2, 32, NULL);
+ instr->num_components = 2;
nir_builder_instr_insert(&b, &instr->instr);
break;
case nir_intrinsic_store_ssbo: {