[Mesa-dev] [PATCH] nir/lower_vars_to_ssa: fix a bug with boolean constants

Connor Abbott cwabbott0 at gmail.com
Thu Jan 15 19:20:17 PST 2015


Cc: Jason Ekstrand <jason at jlekstrand.net>
---
Seems like we missed fixing this issue during review. Jason, can you commit
this? 

 src/glsl/nir/nir_lower_vars_to_ssa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/nir/nir_lower_vars_to_ssa.c b/src/glsl/nir/nir_lower_vars_to_ssa.c
index e331bcd..0eed0e2 100644
--- a/src/glsl/nir/nir_lower_vars_to_ssa.c
+++ b/src/glsl/nir/nir_lower_vars_to_ssa.c
@@ -602,7 +602,7 @@ get_const_initializer_load(const nir_deref_var *deref,
          load->value.u[i] = constant->value.u[matrix_offset + i];
          break;
       case GLSL_TYPE_BOOL:
-         load->value.u[i] = constant->value.u[matrix_offset + i] ?
+         load->value.u[i] = constant->value.b[matrix_offset + i] ?
                              NIR_TRUE : NIR_FALSE;
          break;
       default:
-- 
2.1.0



More information about the mesa-dev mailing list