mesa/shaderapi: Fix TRANSFORM_FEEDBACK_VARYING program query
authorAntia Puentes <apuentes@igalia.com>
Mon, 13 Aug 2018 12:13:38 +0000 (14:13 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 12 Jul 2019 21:42:41 +0000 (23:42 +0200)
commit8818553f1809d25c08ad44826313352e54453717
treed16acf9608b2d1d8a3de264fa4e1c3690e666341
parent8792abff9de8a6767fdd97bd4b5d0c3a1ef1b1e2
mesa/shaderapi: Fix TRANSFORM_FEEDBACK_VARYING program query

Fixes the program queries API (glGetProgramiv):
TRANSFORM_FEEDBACK_VARYINGS and TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH
in two cases:

  1. ARB_enhaced_layouts:

The queries were not working for GLSL shaders which specify the
varyings using enhanced layouts. We were returning the info as if the
varyings could only be specified using the API.

  2. ARB_gl_spirv:

TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH should return 1 if there is no
name reflection information available.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/mesa/main/shaderapi.c