[Piglit] [PATCH 50/50] general: add missing KHR_no_error status
Samuel Pitoiset
samuel.pitoiset at gmail.com
Thu Aug 10 15:22:50 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
tests/general/draw-pixels.c | 2 ++
tests/general/geterror-inside-begin.c | 2 ++
tests/general/geterror-invalid-enum.c | 2 ++
tests/general/masked-clear.c | 1 +
tests/general/roundmode-pixelstore.c | 10 +++++++---
tests/general/select.c | 2 ++
tests/general/tex-errors.c | 2 ++
tests/general/texunits.c | 24 ++++++++++++++----------
8 files changed, 32 insertions(+), 13 deletions(-)
diff --git a/tests/general/draw-pixels.c b/tests/general/draw-pixels.c
index 65f512266..a6c06c4d9 100644
--- a/tests/general/draw-pixels.c
+++ b/tests/general/draw-pixels.c
@@ -57,6 +57,8 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_STENCIL;
+ config.khr_no_error_support = PIGLIT_HAS_ERRORS;
+
PIGLIT_GL_TEST_CONFIG_END
const GLuint idx0 = 0, idx1 = 1, idx2 = 2, idx3 = 3;
diff --git a/tests/general/geterror-inside-begin.c b/tests/general/geterror-inside-begin.c
index 1d59a2336..5efba2962 100644
--- a/tests/general/geterror-inside-begin.c
+++ b/tests/general/geterror-inside-begin.c
@@ -41,6 +41,8 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+ config.khr_no_error_support = PIGLIT_HAS_ERRORS;
+
PIGLIT_GL_TEST_CONFIG_END
enum piglit_result
diff --git a/tests/general/geterror-invalid-enum.c b/tests/general/geterror-invalid-enum.c
index 143c7c420..f0d65c9ab 100644
--- a/tests/general/geterror-invalid-enum.c
+++ b/tests/general/geterror-invalid-enum.c
@@ -28,6 +28,8 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+ config.khr_no_error_support = PIGLIT_HAS_ERRORS;
+
PIGLIT_GL_TEST_CONFIG_END
enum piglit_result
diff --git a/tests/general/masked-clear.c b/tests/general/masked-clear.c
index e205fa961..d7c496536 100644
--- a/tests/general/masked-clear.c
+++ b/tests/general/masked-clear.c
@@ -40,6 +40,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
PIGLIT_GL_VISUAL_STENCIL |
PIGLIT_GL_VISUAL_DOUBLE);
config.requires_displayed_window = true;
+ config.khr_no_error_support = PIGLIT_NO_ERRORS;
PIGLIT_GL_TEST_CONFIG_END
diff --git a/tests/general/roundmode-pixelstore.c b/tests/general/roundmode-pixelstore.c
index 9284f4354..8a029b257 100644
--- a/tests/general/roundmode-pixelstore.c
+++ b/tests/general/roundmode-pixelstore.c
@@ -46,6 +46,8 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE;
+ config.khr_no_error_support = PIGLIT_NO_ERRORS;
+
PIGLIT_GL_TEST_CONFIG_END
enum piglit_result
@@ -90,9 +92,11 @@ piglit_init(int argc, char **argv)
pass = test(-0.1, 0) && pass;
pass = piglit_check_gl_error(GL_NO_ERROR) && pass;
- printf("Setting row length -0.9, and expecting error\n");
- glPixelStoref(GL_UNPACK_ROW_LENGTH, -0.9);
- pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+ if (!piglit_khr_no_error) {
+ printf("Setting row length -0.9, and expecting error\n");
+ glPixelStoref(GL_UNPACK_ROW_LENGTH, -0.9);
+ pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+ }
piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
}
diff --git a/tests/general/select.c b/tests/general/select.c
index 879a1e9c1..c71fe2041 100644
--- a/tests/general/select.c
+++ b/tests/general/select.c
@@ -39,6 +39,8 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_STENCIL;
+ config.khr_no_error_support = PIGLIT_NO_ERRORS;
+
PIGLIT_GL_TEST_CONFIG_END
GLuint ReferenceHitEntries[3][64];
diff --git a/tests/general/tex-errors.c b/tests/general/tex-errors.c
index c63007a0e..211bed812 100644
--- a/tests/general/tex-errors.c
+++ b/tests/general/tex-errors.c
@@ -36,6 +36,8 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_visual = PIGLIT_GL_VISUAL_RGBA |
PIGLIT_GL_VISUAL_DOUBLE;
+ config.khr_no_error_support = PIGLIT_HAS_ERRORS;
+
PIGLIT_GL_TEST_CONFIG_END
void
diff --git a/tests/general/texunits.c b/tests/general/texunits.c
index d0cbbb3d1..b68dcf71c 100644
--- a/tests/general/texunits.c
+++ b/tests/general/texunits.c
@@ -36,6 +36,8 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+ config.khr_no_error_support = PIGLIT_NO_ERRORS;
+
PIGLIT_GL_TEST_CONFIG_END
#define MAX_UNITS 256
@@ -144,8 +146,8 @@ test_rasterpos(void)
return GL_FALSE;
}
- /* this should generate an error */
- {
+ if (!piglit_khr_no_error) {
+ /* this should generate an error */
GLfloat v[4];
glActiveTexture(GL_TEXTURE0 + MaxTextureCoordUnits);
if (MaxTextureCoordUnits == MaxTextureCombinedUnits) {
@@ -197,8 +199,8 @@ test_texture_matrix(void)
return GL_FALSE;
}
- /* this should generate an error */
- {
+ if (!piglit_khr_no_error) {
+ /* this should generate an error */
GLfloat m[16];
glActiveTexture(GL_TEXTURE0 + MaxTextureCoordUnits);
if (MaxTextureCoordUnits == MaxTextureCombinedUnits) {
@@ -257,13 +259,15 @@ test_texture_params(void)
return GL_FALSE;
}
- maxUnit = MAX2(MaxTextureCombinedUnits, MaxTextureCoordUnits);
+ if (!piglit_khr_no_error) {
+ maxUnit = MAX2(MaxTextureCombinedUnits, MaxTextureCoordUnits);
- /* this should generate an error */
- glActiveTexture(GL_TEXTURE0 + maxUnit);
- /* INVALID_ENUM is expected */
- if (!piglit_check_gl_error(GL_INVALID_ENUM)) {
- return GL_FALSE;
+ /* this should generate an error */
+ glActiveTexture(GL_TEXTURE0 + maxUnit);
+ /* INVALID_ENUM is expected */
+ if (!piglit_check_gl_error(GL_INVALID_ENUM)) {
+ return GL_FALSE;
+ }
}
return GL_TRUE;
--
2.14.0
More information about the Piglit
mailing list