diff options
author | Jason Ekstrand <[email protected]> | 2016-11-29 22:19:28 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-12-02 10:53:32 -0800 |
commit | 19a541f496aace95d6660ed7e216fecc8be2e49d (patch) | |
tree | 5ce74da718bdf4c831135ba290ec781b8c0b67db /src/compiler/spirv/vtn_variables.c | |
parent | c45d84ad8349d0c69893458d6c58eb5f6f1609c4 (diff) |
nir: Get rid of nir_constant_data
This has bothered me for about as long as NIR has been around. Why do we
have two different unions for constants? No good reason other than one of
them is a direct port from GLSL IR.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 14366dc321d..917aa9d84a2 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -938,9 +938,9 @@ apply_var_decoration(struct vtn_builder *b, nir_variable *nir_var, nir_var->data.read_only = true; nir_constant *c = rzalloc(nir_var, nir_constant); - c->value.u[0] = b->shader->info->cs.local_size[0]; - c->value.u[1] = b->shader->info->cs.local_size[1]; - c->value.u[2] = b->shader->info->cs.local_size[2]; + c->values[0].u32[0] = b->shader->info->cs.local_size[0]; + c->values[0].u32[1] = b->shader->info->cs.local_size[1]; + c->values[0].u32[2] = b->shader->info->cs.local_size[2]; nir_var->constant_initializer = c; break; } @@ -1388,7 +1388,7 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode, struct vtn_value *link_val = vtn_untyped_value(b, w[i]); if (link_val->value_type == vtn_value_type_constant) { chain->link[idx].mode = vtn_access_mode_literal; - chain->link[idx].id = link_val->constant->value.u[0]; + chain->link[idx].id = link_val->constant->values[0].u32[0]; } else { chain->link[idx].mode = vtn_access_mode_id; chain->link[idx].id = w[i]; |