[Mesa-dev] [PATCH] tgsi: fix regression introduced in 16caeff

Rob Clark robdclark at gmail.com
Thu Mar 21 11:39:53 PDT 2013


The recently added tgsi_declaration::Array field was not being
initialized to zero, resulting in nonsense shaders like:

   FRAG
   PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1
   DCL IN[0], ARRAY(48), GENERIC[0], CONSTANT
-> DCL NULL[1..0].
     0: MOV OUT[0], IN[0]
     1: END

Signed-off-by: Rob Clark <robdclark at gmail.com>
---
 src/gallium/auxiliary/tgsi/tgsi_build.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index 435d94a..2e49671 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -109,6 +109,7 @@ tgsi_default_declaration( void )
    declaration.Semantic = 0;
    declaration.Invariant = 0;
    declaration.Local = 0;
+   declaration.Array = 0;
    declaration.Padding = 0;
 
    return declaration;
-- 
1.8.1.4



More information about the mesa-dev mailing list