diff options
author | Timothy Arceri <[email protected]> | 2017-12-16 14:06:23 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-01-30 09:08:47 +1100 |
commit | f63e05ae9ea0be38a8fb2dd0ae8f391b8699e757 (patch) | |
tree | a8560935b10101db258f692e50dff41efb996367 /src/mesa | |
parent | f6cc15dccd54ff70be987457af790cac1c8fe5bb (diff) |
compiler: tidy up double_inputs_read uses
First we move double_inputs_read into a vs struct in the union,
double_inputs_read is only used for vs inputs so this will
save space and also allows us to add a new double_inputs field.
We add the new field because c2acf97fcc9b changed the behaviour
of double_inputs_read, and while it's no longer used to track
actual reads in i965 we do still want to track this for gallium
drivers.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 4cf150ea1ef..2de767625af 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -88,7 +88,7 @@ st_nir_assign_vs_in_locations(struct gl_program *prog, nir_shader *nir) if ((prog->info.inputs_read & BITFIELD64_BIT(attr)) != 0) { input_to_index[attr] = num_inputs; num_inputs++; - if ((prog->info.double_inputs_read & BITFIELD64_BIT(attr)) != 0) { + if ((prog->info.vs.double_inputs_read & BITFIELD64_BIT(attr)) != 0) { /* add placeholder for second part of a double attribute */ num_inputs++; } diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 094c79ade9e..84ed614927b 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6783,7 +6783,7 @@ get_mesa_program_tgsi(struct gl_context *ctx, _mesa_copy_linked_program_data(shader_program, shader); shrink_array_declarations(v->inputs, v->num_inputs, &prog->info.inputs_read, - prog->info.double_inputs_read, + prog->info.vs.double_inputs_read, &prog->info.patch_inputs_read); shrink_array_declarations(v->outputs, v->num_outputs, &prog->info.outputs_written, 0ULL, diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 883813d6c02..1116b5afbc8 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -406,7 +406,7 @@ st_translate_vertex_program(struct st_context *st, input_to_index[attr] = stvp->num_inputs; stvp->index_to_input[stvp->num_inputs] = attr; stvp->num_inputs++; - if ((stvp->Base.info.double_inputs_read & + if ((stvp->Base.info.vs.double_inputs_read & BITFIELD64_BIT(attr)) != 0) { /* add placeholder for second part of a double attribute */ stvp->index_to_input[stvp->num_inputs] = ST_DOUBLE_ATTRIB_PLACEHOLDER; |