[Piglit] [PATCH] arb_shader_storage_buffer_object: modify tests to use gl_core_version = 32
Samuel Iglesias Gonsalvez
siglesias at igalia.com
Fri Jul 24 02:22:47 PDT 2015
Recently, some of them were returning errors on glGetIntegerv() calls for
shader storage buffer constants in Mesa because they used GL compat 1.0
version.
Some shaders were modified to avoid "GL_INVALID_OPERATION in
glDrawArray(No VAO bound)" Mesa errors when calling piglit_draw_rect() with
this config.
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
---
.../arb_shader_storage_buffer_object/array-ssbo-binding.c | 4 ++--
tests/spec/arb_shader_storage_buffer_object/deletebuffers.c | 3 ++-
tests/spec/arb_shader_storage_buffer_object/getintegeri_v.c | 3 ++-
.../layout-std140-write-shader.c | 4 ++--
.../layout-std430-write-shader.c | 4 ++--
tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c | 12 ++++++++----
tests/spec/arb_shader_storage_buffer_object/maxblocks.c | 9 ++++++---
.../program-interface-query.c | 4 ++--
tests/spec/arb_shader_storage_buffer_object/rendering.c | 7 +++++--
tests/spec/arb_shader_storage_buffer_object/ssbo-binding.c | 4 ++--
10 files changed, 33 insertions(+), 21 deletions(-)
diff --git a/tests/spec/arb_shader_storage_buffer_object/array-ssbo-binding.c b/tests/spec/arb_shader_storage_buffer_object/array-ssbo-binding.c
index 14787f1..f3c7d15 100644
--- a/tests/spec/arb_shader_storage_buffer_object/array-ssbo-binding.c
+++ b/tests/spec/arb_shader_storage_buffer_object/array-ssbo-binding.c
@@ -33,8 +33,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 100;
config.window_height = 100;
- config.supports_gl_compat_version = 10;
- config.supports_gl_core_version = 31;
+ config.supports_gl_compat_version = 32;
+ config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
PIGLIT_GL_TEST_CONFIG_END
diff --git a/tests/spec/arb_shader_storage_buffer_object/deletebuffers.c b/tests/spec/arb_shader_storage_buffer_object/deletebuffers.c
index ff8783f..947bca9 100644
--- a/tests/spec/arb_shader_storage_buffer_object/deletebuffers.c
+++ b/tests/spec/arb_shader_storage_buffer_object/deletebuffers.c
@@ -32,7 +32,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
- config.supports_gl_compat_version = 10;
+ config.supports_gl_compat_version = 32;
+ config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
PIGLIT_GL_TEST_CONFIG_END
diff --git a/tests/spec/arb_shader_storage_buffer_object/getintegeri_v.c b/tests/spec/arb_shader_storage_buffer_object/getintegeri_v.c
index 05c8d0e..9e7617f 100644
--- a/tests/spec/arb_shader_storage_buffer_object/getintegeri_v.c
+++ b/tests/spec/arb_shader_storage_buffer_object/getintegeri_v.c
@@ -41,7 +41,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
- config.supports_gl_compat_version = 10;
+ config.supports_gl_compat_version = 32;
+ config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
PIGLIT_GL_TEST_CONFIG_END
diff --git a/tests/spec/arb_shader_storage_buffer_object/layout-std140-write-shader.c b/tests/spec/arb_shader_storage_buffer_object/layout-std140-write-shader.c
index bcddce5..1eaba37 100644
--- a/tests/spec/arb_shader_storage_buffer_object/layout-std140-write-shader.c
+++ b/tests/spec/arb_shader_storage_buffer_object/layout-std140-write-shader.c
@@ -32,8 +32,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 100;
config.window_height = 100;
- config.supports_gl_compat_version = 10;
- config.supports_gl_core_version = 31;
+ config.supports_gl_compat_version = 32;
+ config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
PIGLIT_GL_TEST_CONFIG_END
diff --git a/tests/spec/arb_shader_storage_buffer_object/layout-std430-write-shader.c b/tests/spec/arb_shader_storage_buffer_object/layout-std430-write-shader.c
index 75d7b09..c25e921 100644
--- a/tests/spec/arb_shader_storage_buffer_object/layout-std430-write-shader.c
+++ b/tests/spec/arb_shader_storage_buffer_object/layout-std430-write-shader.c
@@ -40,8 +40,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 100;
config.window_height = 100;
- config.supports_gl_compat_version = 10;
- config.supports_gl_core_version = 31;
+ config.supports_gl_compat_version = 32;
+ config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
PIGLIT_GL_TEST_CONFIG_END
diff --git a/tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c b/tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c
index ac33fac..4595349 100644
--- a/tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c
+++ b/tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c
@@ -33,8 +33,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
- config.supports_gl_compat_version = 20;
-
+ config.supports_gl_compat_version = 32;
+ config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
PIGLIT_GL_TEST_CONFIG_END
@@ -58,10 +58,12 @@ enum piglit_result
piglit_display(void)
{
const char *vs_ssbo_template =
+ "#version 130\n"
"#extension GL_ARB_shader_storage_buffer_object : enable\n"
"#extension GL_ARB_uniform_buffer_object : enable\n"
"\n"
"varying vec4 vary;"
+ "in vec4 piglit_vertex;\n"
"\n"
"layout(std140) buffer ssbo {\n"
" vec4 v[%d];\n"
@@ -69,7 +71,7 @@ piglit_display(void)
"uniform int i;\n"
"\n"
"void main() {\n"
- " gl_Position = gl_Vertex;\n"
+ " gl_Position = piglit_vertex;\n"
" vary = v[i];\n"
"}\n";
@@ -83,10 +85,12 @@ piglit_display(void)
"}\n";
const char *vs_template =
+ "#version 130\n"
"#extension GL_ARB_shader_storage_buffer_object : enable\n"
+ "in vec4 piglit_vertex;\n"
"\n"
"void main() {\n"
- " gl_Position = gl_Vertex;\n"
+ " gl_Position = piglit_vertex;\n"
"}\n";
const char *fs_ssbo_template =
diff --git a/tests/spec/arb_shader_storage_buffer_object/maxblocks.c b/tests/spec/arb_shader_storage_buffer_object/maxblocks.c
index d87b58c..cd9bc47 100644
--- a/tests/spec/arb_shader_storage_buffer_object/maxblocks.c
+++ b/tests/spec/arb_shader_storage_buffer_object/maxblocks.c
@@ -48,7 +48,8 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 800;
config.window_height = 200;
- config.supports_gl_compat_version = 10;
+ config.supports_gl_compat_version = 32;
+ config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
PIGLIT_GL_TEST_CONFIG_END
@@ -58,15 +59,17 @@ get_shader(GLenum target, const char *block_prefix, int blocks)
{
char *shader = NULL;
const char *vs_source =
+ "#version 130\n"
"#extension GL_ARB_shader_storage_buffer_object : enable\n"
"#extension GL_ARB_uniform_buffer_object : enable\n"
"\n"
- "varying vec4 v;"
+ "varying vec4 v;\n"
+ "in vec4 piglit_vertex;\n"
"\n"
"%s"
"\n"
"void main() {\n"
- " gl_Position = gl_Vertex;\n"
+ " gl_Position = piglit_vertex;\n"
" v = vec4(0)%s;\n"
"}\n";
const char *fs_source =
diff --git a/tests/spec/arb_shader_storage_buffer_object/program-interface-query.c b/tests/spec/arb_shader_storage_buffer_object/program-interface-query.c
index b1818b5..2044898 100644
--- a/tests/spec/arb_shader_storage_buffer_object/program-interface-query.c
+++ b/tests/spec/arb_shader_storage_buffer_object/program-interface-query.c
@@ -32,8 +32,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 100;
config.window_height = 100;
- config.supports_gl_compat_version = 10;
- config.supports_gl_core_version = 31;
+ config.supports_gl_compat_version = 32;
+ config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
PIGLIT_GL_TEST_CONFIG_END
diff --git a/tests/spec/arb_shader_storage_buffer_object/rendering.c b/tests/spec/arb_shader_storage_buffer_object/rendering.c
index 9b1ab8d..8d4ecdf 100644
--- a/tests/spec/arb_shader_storage_buffer_object/rendering.c
+++ b/tests/spec/arb_shader_storage_buffer_object/rendering.c
@@ -33,16 +33,19 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
- config.supports_gl_compat_version = 10;
+ config.supports_gl_compat_version = 32;
+ config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
PIGLIT_GL_TEST_CONFIG_END
static const char vert_shader_text[] =
+ "#version 130\n"
"#extension GL_ARB_shader_storage_buffer_object : require\n"
"\n"
"buffer ssbo_pos_size { vec2 pos; float size; };\n"
"buffer ssbo_rot {float rotation; };\n"
+ "in vec4 piglit_vertex;\n"
"\n"
"void main()\n"
"{\n"
@@ -50,7 +53,7 @@ static const char vert_shader_text[] =
" m[0][0] = m[1][1] = cos(rotation); \n"
" m[0][1] = sin(rotation); \n"
" m[1][0] = -m[0][1]; \n"
- " gl_Position.xy = m * gl_Vertex.xy * vec2(size) + pos;\n"
+ " gl_Position.xy = m * piglit_vertex.xy * vec2(size) + pos;\n"
" gl_Position.zw = vec2(0, 1);\n"
"}\n";
diff --git a/tests/spec/arb_shader_storage_buffer_object/ssbo-binding.c b/tests/spec/arb_shader_storage_buffer_object/ssbo-binding.c
index 17c99cd..6e20de0 100644
--- a/tests/spec/arb_shader_storage_buffer_object/ssbo-binding.c
+++ b/tests/spec/arb_shader_storage_buffer_object/ssbo-binding.c
@@ -44,8 +44,8 @@
PIGLIT_GL_TEST_CONFIG_BEGIN
- config.supports_gl_compat_version = 10;
-
+ config.supports_gl_compat_version = 32;
+ config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
PIGLIT_GL_TEST_CONFIG_END
--
2.1.4
More information about the Piglit
mailing list