summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-08-31 07:55:07 -0500
committerJason Ekstrand <[email protected]>2018-09-06 16:07:50 -0500
commit0909a57b631f2b200a7422907df6302a72930252 (patch)
treec2fd127451eee11b317c62385e575c7d3b15fb26 /src/compiler
parent25efd787cfd842c0b0b900f35399e44a2e01ea39 (diff)
radeonsi/nir: Set vs_inputs_dual_locations and let NIR do the remap
We were going out of our way to disable dual-location re-mapping in NIR only to then do the remapping in st_glsl_to_nir.cpp. Presumably, this was so that double_inputs would be correct for the core state tracker. However, now that we've it to gl_program::DualSlotInputs which is unaffected by NIR lowering, we can let NIR lower things for us. The one tricky bit here is that we have to remap the inputs_read bitfield back to the single-slot convention for the gallium state tracker to use. Since radeonsi is the only NIR-capable gallium driver that also supports GL_ARB_vertex_attrib_64bit, we only have to worry about radeonsi when making core gallium state tracker changes. Acked-by: Marek Olšák <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir_lower_io_arrays_to_elements.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_lower_io_arrays_to_elements.c b/src/compiler/nir/nir_lower_io_arrays_to_elements.c
index 16f6233f614..af33d153ea5 100644
--- a/src/compiler/nir/nir_lower_io_arrays_to_elements.c
+++ b/src/compiler/nir/nir_lower_io_arrays_to_elements.c
@@ -36,9 +36,6 @@ static unsigned
get_io_offset(nir_builder *b, nir_deref_instr *deref, nir_variable *var,
unsigned *element_index, nir_ssa_def **vertex_index)
{
- bool vs_in = (b->shader->info.stage == MESA_SHADER_VERTEX) &&
- (var->data.mode == nir_var_shader_in);
-
nir_deref_path path;
nir_deref_path_init(&path, deref, NULL);
@@ -60,7 +57,7 @@ get_io_offset(nir_builder *b, nir_deref_instr *deref, nir_variable *var,
assert(c); /* must not be indirect dereference */
- unsigned size = glsl_count_attribute_slots((*p)->type, vs_in);
+ unsigned size = glsl_count_attribute_slots((*p)->type, false);
offset += size * c->u32[0];
unsigned num_elements = glsl_type_is_array((*p)->type) ?