[Mesa-dev] [PATCH] st/mesa: fix handling of vertex array double inputs
Kenneth Graunke
kenneth at whitecape.org
Mon Aug 28 04:39:26 UTC 2017
On Saturday, August 26, 2017 9:42:17 PM PDT Ilia Mirkin wrote:
> 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 at alum.mit.edu>
> Cc: mesa-stable at lists.freedesktop.org
> ---
> src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index 9f021962e40..49e97004703 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -2718,7 +2718,7 @@ 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;
>
Makes sense to me - structures don't exist as VS inputs, so unwrapping
arrays should be sufficient.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170827/c10443a0/attachment.sig>
More information about the mesa-dev
mailing list