On 08/03/2015 01:48 PM, Martin Peres wrote:
On 03/08/15 11:10, Tapani Pälli wrote:
_mesa_get_program_resource_name has logic to append '[0]' in name
if variable is an array, this should be skipped for XFB varyings
that have array index already appended.

Fixes:
    ES31-CTS.program_interface_query.transform-feedback-types

Signed-off-by: Tapani Pälli <tapani.pa...@intel.com>
---
  src/mesa/main/shader_query.cpp | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/src/mesa/main/shader_query.cpp
b/src/mesa/main/shader_query.cpp
index c1a7660..a50c348 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -726,6 +726,12 @@ _mesa_get_program_resource_name(struct
gl_shader_program *shProg,
     bool add_index = !(((programInterface == GL_PROGRAM_INPUT) &&
                         res->StageReferences & (1 <<
MESA_SHADER_GEOMETRY)));
+   /* Transform feedback varyings have possible array index already
appended
+    * in their names.
+    */

Possibly have the array index already appended? So how do you detect
that here?

By 'possible array index' I mean that not all the XFB varyings are arrays. Maybe better text would be just:

"Transform feedback varyings have array index already appended in their names"

If it's not array, then of course it does not have it.

+   if (programInterface == GL_TRANSFORM_FEEDBACK_VARYING)
+      add_index = false;
+
     if (add_index && _mesa_program_resource_array_size(res)) {
        int i;

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to