summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/gl_nir_link_uniform_initializers.c10
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp18
2 files changed, 14 insertions, 14 deletions
diff --git a/src/compiler/glsl/gl_nir_link_uniform_initializers.c b/src/compiler/glsl/gl_nir_link_uniform_initializers.c
index 6e38d01269e..36441b4bbe7 100644
--- a/src/compiler/glsl/gl_nir_link_uniform_initializers.c
+++ b/src/compiler/glsl/gl_nir_link_uniform_initializers.c
@@ -124,25 +124,25 @@ copy_constant_to_storage(union gl_constant_value *storage,
for (unsigned int row = 0; row < n_rows; row++) {
switch (base_type) {
case GLSL_TYPE_UINT:
- storage[i].u = val->values[column].u32[row];
+ storage[i].u = val->values[column][row].u32;
break;
case GLSL_TYPE_INT:
case GLSL_TYPE_SAMPLER:
- storage[i].i = val->values[column].i32[row];
+ storage[i].i = val->values[column][row].i32;
break;
case GLSL_TYPE_FLOAT:
- storage[i].f = val->values[column].f32[row];
+ storage[i].f = val->values[column][row].f32;
break;
case GLSL_TYPE_DOUBLE:
case GLSL_TYPE_UINT64:
case GLSL_TYPE_INT64:
/* XXX need to check on big-endian */
memcpy(&storage[i * 2].u,
- &val->values[column].f64[row],
+ &val->values[column][row].f64,
sizeof(double));
break;
case GLSL_TYPE_BOOL:
- storage[i].b = val->values[column].u32[row] ? boolean_true : 0;
+ storage[i].b = val->values[column][row].u32 ? boolean_true : 0;
break;
case GLSL_TYPE_ARRAY:
case GLSL_TYPE_STRUCT:
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index 6c42bd9f5ac..547764982dc 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -308,9 +308,9 @@ nir_visitor::constant_copy(ir_constant *ir, void *mem_ctx)
for (unsigned r = 0; r < rows; r++)
if (supports_ints)
- ret->values[0].u32[r] = ir->value.u[r];
+ ret->values[0][r].u32 = ir->value.u[r];
else
- ret->values[0].f32[r] = ir->value.u[r];
+ ret->values[0][r].f32 = ir->value.u[r];
break;
@@ -320,23 +320,23 @@ nir_visitor::constant_copy(ir_constant *ir, void *mem_ctx)
for (unsigned r = 0; r < rows; r++)
if (supports_ints)
- ret->values[0].i32[r] = ir->value.i[r];
+ ret->values[0][r].i32 = ir->value.i[r];
else
- ret->values[0].f32[r] = ir->value.i[r];
+ ret->values[0][r].f32 = ir->value.i[r];
break;
case GLSL_TYPE_FLOAT:
for (unsigned c = 0; c < cols; c++) {
for (unsigned r = 0; r < rows; r++)
- ret->values[c].f32[r] = ir->value.f[c * rows + r];
+ ret->values[c][r].f32 = ir->value.f[c * rows + r];
}
break;
case GLSL_TYPE_DOUBLE:
for (unsigned c = 0; c < cols; c++) {
for (unsigned r = 0; r < rows; r++)
- ret->values[c].f64[r] = ir->value.d[c * rows + r];
+ ret->values[c][r].f64 = ir->value.d[c * rows + r];
}
break;
@@ -345,7 +345,7 @@ nir_visitor::constant_copy(ir_constant *ir, void *mem_ctx)
assert(cols == 1);
for (unsigned r = 0; r < rows; r++)
- ret->values[0].u64[r] = ir->value.u64[r];
+ ret->values[0][r].u64 = ir->value.u64[r];
break;
case GLSL_TYPE_INT64:
@@ -353,7 +353,7 @@ nir_visitor::constant_copy(ir_constant *ir, void *mem_ctx)
assert(cols == 1);
for (unsigned r = 0; r < rows; r++)
- ret->values[0].i64[r] = ir->value.i64[r];
+ ret->values[0][r].i64 = ir->value.i64[r];
break;
case GLSL_TYPE_BOOL:
@@ -361,7 +361,7 @@ nir_visitor::constant_copy(ir_constant *ir, void *mem_ctx)
assert(cols == 1);
for (unsigned r = 0; r < rows; r++)
- ret->values[0].b[r] = ir->value.b[r];
+ ret->values[0][r].b = ir->value.b[r];
break;