diff options
author | Iago Toral Quiroga <[email protected]> | 2016-01-21 13:23:55 +0100 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2016-04-11 08:29:27 +0200 |
commit | fab5d4cd9582aa5289143876c26af23ff855f355 (patch) | |
tree | a0e85ff2b285c3c8a64138589cf47b2f0e95ec33 /src | |
parent | a741378cb59e4263f909d73498ebf153375e6dcc (diff) |
nir/glsl_to_nir: set bit_size on ssbo_load result
v2 (Sam):
- Add missing bit_size assignment when ssbo_load destination is a boolean.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/glsl_to_nir.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/nir/glsl_to_nir.cpp index 4db7946e884..0b83bdc4078 100644 --- a/src/compiler/nir/glsl_to_nir.cpp +++ b/src/compiler/nir/glsl_to_nir.cpp @@ -858,8 +858,9 @@ nir_visitor::visit(ir_call *ir) instr->num_components = type->vector_elements; /* Setup destination register */ + unsigned bit_size = glsl_get_bit_size(type->base_type); nir_ssa_dest_init(&instr->instr, &instr->dest, - type->vector_elements, 32, NULL); + type->vector_elements, bit_size, NULL); /* Insert the created nir instruction now since in the case of boolean * result we will need to emit another instruction after it @@ -882,7 +883,7 @@ nir_visitor::visit(ir_call *ir) load_ssbo_compare->src[1].swizzle[i] = 0; nir_ssa_dest_init(&load_ssbo_compare->instr, &load_ssbo_compare->dest.dest, - type->vector_elements, 32, NULL); + type->vector_elements, bit_size, NULL); load_ssbo_compare->dest.write_mask = (1 << type->vector_elements) - 1; nir_builder_instr_insert(&b, &load_ssbo_compare->instr); dest = &load_ssbo_compare->dest.dest; |