Browse Source

st/mesa: fix handling of vertex array double inputs

The is_double_vertex_input needs to be set for arrays of doubles as
well.

Fixes KHR-GL45.enhanced_layouts.varying_array_locations

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
tags/17.3-branchpoint
Ilia Mirkin 8 years ago
parent
commit
ae53bff8b1
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/mesa/state_tracker/st_glsl_to_tgsi.cpp

+ 3
- 1
src/mesa/state_tracker/st_glsl_to_tgsi.cpp View File

@@ -2718,7 +2718,9 @@ glsl_to_tgsi_visitor::visit(ir_dereference_variable *ir)

this->result = st_src_reg(entry->file, entry->index, var->type,
entry->component, entry->array_id);
if (this->shader->Stage == MESA_SHADER_VERTEX && var->data.mode == ir_var_shader_in && var->type->is_double())
if (this->shader->Stage == MESA_SHADER_VERTEX &&
var->data.mode == ir_var_shader_in &&
var->type->without_array()->is_double())
this->result.is_double_vertex_input = true;
if (!native_integers)
this->result.type = GLSL_TYPE_FLOAT;

Loading…
Cancel
Save