diff options
author | Samuel Iglesias Gonsálvez <[email protected]> | 2016-03-23 08:04:18 +0100 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2016-04-11 08:27:04 +0200 |
commit | 3663a2397e47da9b766b0c4239a8b74ac77b5d04 (patch) | |
tree | 8de1cc32a2ab24f26518f7d86860986506285d9d /src/compiler/nir/nir.c | |
parent | a5b17ae7455af205a89074d176289affbf68e444 (diff) |
nir: add bit_size info to nir_load_const_instr_create()
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.c')
-rw-r--r-- | src/compiler/nir/nir.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index e45f727764e..56a50090fdd 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -469,12 +469,13 @@ nir_jump_instr_create(nir_shader *shader, nir_jump_type type) } nir_load_const_instr * -nir_load_const_instr_create(nir_shader *shader, unsigned num_components) +nir_load_const_instr_create(nir_shader *shader, unsigned num_components, + unsigned bit_size) { nir_load_const_instr *instr = ralloc(shader, nir_load_const_instr); instr_init(&instr->instr, nir_instr_type_load_const); - nir_ssa_def_init(&instr->instr, &instr->def, num_components, 32, NULL); + nir_ssa_def_init(&instr->instr, &instr->def, num_components, bit_size, NULL); return instr; } @@ -694,7 +695,8 @@ nir_deref_get_const_initializer_load(nir_shader *shader, nir_deref_var *deref) } nir_load_const_instr *load = - nir_load_const_instr_create(shader, glsl_get_vector_elements(tail->type)); + nir_load_const_instr_create(shader, glsl_get_vector_elements(tail->type), + 32); matrix_offset *= load->def.num_components; for (unsigned i = 0; i < load->def.num_components; i++) { |