[Mesa-dev] [PATCH 20/29] nir/glsl_to_nir: set bit_size on ssbo_load result

Samuel Iglesias Gonsálvez siglesias at igalia.com
Mon Mar 21 12:05:59 UTC 2016


From: Iago Toral Quiroga <itoral at igalia.com>

---
 src/compiler/nir/glsl_to_nir.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/nir/glsl_to_nir.cpp
index 498733f..910c3a1 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
-- 
2.5.0



More information about the mesa-dev mailing list