anv: Fix a build error caused by recent fp64 NIR changes
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 28 Apr 2016 17:13:42 +0000 (10:13 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 28 Apr 2016 17:13:42 +0000 (10:13 -0700)
src/intel/vulkan/anv_nir_apply_dynamic_offsets.c

index bbcbcc08f17e60382de644d14164128cfeb2cea5..6b664f689e83d34b08ca829fe81d4332977ba43b 100644 (file)
@@ -119,8 +119,9 @@ apply_dynamic_offsets_block(nir_block *block, void *void_state)
          exec_list_push_tail(&phi->srcs, &src1->node);
 
          b->cursor = nir_after_cf_list(&if_stmt->else_list);
-         nir_ssa_def *zero = nir_build_imm(b, intrin->num_components,
-            (nir_const_value) { .u32 = { 0, 0, 0, 0 } });
+         nir_const_value zero_val = { .u32 = { 0, 0, 0, 0 } };
+         nir_ssa_def *zero = nir_build_imm(b, intrin->dest.ssa.bit_size,
+                                           intrin->num_components, zero_val);
 
          nir_phi_src *src2 = ralloc(phi, nir_phi_src);
          struct exec_node *enode = exec_list_get_tail(&if_stmt->else_list);