storage->storage[i].i;
}
}
- } else if (glsl_type_is_image(type)) {
+ } else if (glsl_type_is_image(storage->type)) {
for (unsigned i = 0; i < elements; i++) {
const unsigned index = storage->opaque[sh].index + i;
unsigned dmul = glsl_base_type_is_64bit(base_type) ? 2 : 1;
int i = 0;
- if (n_columns > 0) {
+ if (n_columns > 1) {
const struct glsl_type *column_type = glsl_get_column_type(type);
for (unsigned int column = 0; column < n_columns; column++) {
copy_constant_to_storage(&storage[i], val->elements[column],
case GLSL_TYPE_UINT64:
case GLSL_TYPE_INT64:
/* XXX need to check on big-endian */
- memcpy(&storage[i * 2].u, &val->values[row].f64, sizeof(double));
+ memcpy(&storage[i].u, &val->values[row].f64, sizeof(double));
break;
case GLSL_TYPE_BOOL:
storage[i].b = val->values[row].u32 ? boolean_true : 0;
var->type,
var->constant_initializer);
} else if (var->data.explicit_binding) {
+
+ if (nir_variable_is_in_block(var)) {
+ /* This case is handled by link_uniform_blocks */
+ continue;
+ }
+
const struct glsl_type *without_array =
glsl_without_array(var->type);
}
}
}
+ memcpy(prog->data->UniformDataDefaults, prog->data->UniformDataSlots,
+ sizeof(union gl_constant_value) * prog->data->NumUniformDataSlots);
+
}