diff options
author | Sven Gothel <[email protected]> | 2012-04-09 05:36:33 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-04-09 05:36:33 +0200 |
commit | ca14c6b3d5e53f6eda31ab6112b6b1705c5b31e5 (patch) | |
tree | 9445b46793de1334c23b03a63d6b4e84fe4aa327 /src/test/com/jogamp | |
parent | 1ab2108279ede3b646ad2d410fd16368393c174e (diff) |
ShaderUtil: isProgramValid() -> isProgramLinkStatusValid() + isProgramExecStatusValid()
isProgramValid() was testing whether the linkx status is valid
and whether the executable environment is valid for the shader, see glValidateProgram().
glValidateProgram() may fail on some implementations in some circumstances (APX2500 and Tegra2)
and indeed require all resources are set for execution of the shader program (glDraw*).
This is not a requirement for issueing useProgram(), hence removed this test
and made it available explicit for debugging purposes: isProgramExecStatusValid().
Diffstat (limited to 'src/test/com/jogamp')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java | 4 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java index 2f6025a63..685ceeb2a 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java @@ -126,7 +126,7 @@ public class TestTransformFeedbackVaryingsBug407NEWT extends UITestCase { boolean error = false; - if(!ShaderUtil.isProgramValid(gl, myShader.shaderProgram, pbaos)) { + if(!ShaderUtil.isProgramLinkStatusValid(gl, myShader.shaderProgram, pbaos)) { System.out.println("Error (unexpected link error) - testGlTransformFeedbackVaryings_WhenVarNameOK:postLink: "+baos.toString()); error = true; } @@ -164,7 +164,7 @@ public class TestTransformFeedbackVaryingsBug407NEWT extends UITestCase { boolean error = false; - if(!ShaderUtil.isProgramValid(gl, myShader.shaderProgram, pbaos)) { + if(!ShaderUtil.isProgramLinkStatusValid(gl, myShader.shaderProgram, pbaos)) { System.out.println("GOOD (expected link error) - testGlTransformFeedbackVaryings_WhenVarNameWrong:postLink: "+baos.toString()); // should be invalid, due to wrong var name } else { diff --git a/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java b/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java index 047b04815..989de6c7e 100644 --- a/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java +++ b/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java @@ -90,7 +90,7 @@ public class GLSLSimpleProgram { if(link) { gl.glLinkProgram(shaderProgram); - if(!ShaderUtil.isProgramValid(gl, shaderProgram, pbaos)) { + if(!ShaderUtil.isProgramLinkStatusValid(gl, shaderProgram, pbaos)) { System.out.println("Error (GLSL link error): "+baos.toString()); Assert.assertTrue(false); } |