Bug 30196 - [GLSL] gl_TextureMatrix{Inverse,Transpose,InverseTranspose} unsupported
[GLSL] gl_TextureMatrix{Inverse,Transpose,InverseTranspose} unsupported
Status: VERIFIED FIXED
Product: Mesa
Classification: Unclassified
Component: Mesa core
git
All All
: medium enhancement
Assigned To: Ian Romanick
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-14 20:38 UTC by Gordon Jin
Modified: 2010-09-24 18:02 UTC (History)
1 user (show)

See Also:


Attachments
test case (187 bytes, text/plain)
2010-09-14 20:38 UTC, Gordon Jin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Jin 2010-09-14 20:38:13 UTC
Created attachment 38707 [details]
test case

GLSL spec 1.1 section 7.5 mentions below variables are built into GLSL:
gl_TextureMatrixInverse[gl_MaxTextureCoords]
gl_TextureMatrixTranspose[gl_MaxTextureCoords]
gl_TextureMatrixInverseTranspose[gl_MaxTextureCoords]

But they are not supported in either glsl2 or the old glsl compiler.

The attached case gets below compiling error:

Failed to compile fragment shader TextureMatrixInverse.frag: 0:5(34): error: `gl_TextureMatrixInverse' undeclared
0:6(36): error: `gl_TextureMatrixTranspose' undeclared
0:7(43): error: `gl_TextureMatrixInverseTranspose' undeclared

Shader source:
void main()
{
	mat4  result;
	result = gl_TextureMatrix[0];
	result = gl_TextureMatrixInverse[0];
	result = gl_TextureMatrixTranspose[0];
	result = gl_TextureMatrixInverseTranspose[0];
}
Comment 1 Gordon Jin 2010-09-14 20:46:00 UTC
tested with mesa master 9476efe77ff196993937c3aa2e5bca725ceb0b41 on Piketon.
Comment 2 Eric Anholt 2010-09-21 10:10:49 UTC
commit b13a90d76305d80201f7d35bd44164e911bef5bb
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Sep 21 10:06:51 2010 -0700

    builtin-texturematrix: test for gl_TextureMatrix inverse/transpose presence.
    
    Bug #30196

commit b5bb21562942dab7571ef748c3ca562a66f25b33
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Sep 21 10:08:38 2010 -0700

    glsl: Add definition of gl_TextureMatrix inverse/transpose builtins.
    
    Fixes glsl2/builtin-texturematrix.
    Bug #30196.
Comment 3 Gordon Jin 2010-09-24 18:02:07 UTC
verified