Re: [Piglit] [PATCH 8/8] egl_khr_create_context: Add valid-flag-debug tests to GLES CMakeLists
On Fri, Jan 10, 2014 at 10:30 AM, Chad Versace chad.vers...@linux.intel.com wrote: On Tue, Jan 07, 2014 at 12:02:43AM +0800, Daniel Kurtz wrote: Add these gles specific tests to CMakelists so they will be built when targeting GLES. Signed-off-by: Daniel Kurtz djku...@chromium.org --- tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt b/tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt index dde8960..c629888 100644 --- a/tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt +++ b/tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt @@ -27,5 +27,6 @@ piglit_add_executable (egl-create-context-invalid-flag-gles invalid-flag-gles.c # Tests that use ES 1, ES 2, and Desktop GL. piglit_add_executable (egl-create-context-invalid-gl-version invalid-gl-version.c common.c) piglit_add_executable (egl-create-context-verify-gl-flavor verify-gl-flavor.c common.c) +piglit_add_executable (egl-create-context-valid-flag-debug valid-flag-debug.c common.c) NAK This patch breaks the Piglit build. In CMake, it's illegal to for a target name to have multiple definitions. And egl-create-context-valid-flag-debug is already defined in CMakeLists.gl.txt. Isn't this simply fixed by suffixing the executable name with -gles, like we've done for most of the other tests in this directory? ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/8] piglit-dispatch: Install waffle procs during dispatch init
On Tue, Jan 07, 2014 at 12:02:37AM +0800, Daniel Kurtz wrote: When using the PIGLIT_GL_TEST_CONFIG_* macros to create a test, a piglit_gl_framework, 'gl_fw' is used to store gl framework state, including core and extension gl dispatch handlers. Just before running the actual test code, piglit_gl_test_run() gets invoked to setup gl_fw by calling piglit_gl_framework_factory(). If using waffle, the get_wfl_*_proc dispatch handlers should be installed during piglit_dispatch_init(). However, piglit_dispatch_init() is called *during* piglit_gl_framework_factory(), so, gl_fw is always NULL and the handlers are not installed. The call chain during init looks like this: main // from PIGLIT_GL_TEST_CONFIG_[BEGIN,END] piglit_gl_test_run piglit_gl_framework_factory piglit_winsys_framework_factory piglit_x11_framework_create piglit_winsys_framework_init piglit_wfl_framework_init make_context_current make_context_current_singlepass waffle_context_create() // Need to create context first piglit_dispatch_default_init() = gl_fw still NULL, gl_fw not set piglit_dispatch_init piglit_get_gl_version glGetString() // piglit-dispatch will use non-WFL glGetString Since gl_fw was NULL, piglit_default_init() fails to install the waffle dispatch handlers, and the wrong glGetString() might be called to get the GL_VERSION. Fix this by installing get_wfl_*_proc() unconditionally. Signed-off-by: Daniel Kurtz djku...@chromium.org --- tests/util/piglit-dispatch.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/util/piglit-dispatch.c b/tests/util/piglit-dispatch.c index 5284b7d..7f9f910 100644 --- a/tests/util/piglit-dispatch.c +++ b/tests/util/piglit-dispatch.c @@ -233,10 +233,8 @@ piglit_dispatch_init(piglit_dispatch_api api, break; } - if (gl_fw) { - get_core_proc_address = get_wfl_core_proc; - get_ext_proc_address = get_wfl_ext_proc; - } + get_core_proc_address = get_wfl_core_proc; + get_ext_proc_address = get_wfl_ext_proc; #endif /* No need to reset the dispatch pointers the first time */ -- 1.8.5.1 I suspect that this patch breaks many GLX and EGL tests. It's illegal to call waffle_dl_sym(), and hence also get_wfl_core_proc(), if waffle if not first initialized with waffle_init(). To my knowledge, no GLX or EGL test calls waffle_init() (though there may be an exception). When your patch series is applied, I want to know the behavior of piglit_dispatch_default_init() and glGetIntegerv() in tests/egl/spec/egl_khr_create_context/valid-flag-debug.c. After your series, does piglit_dispatch_default_init() use get_wfl_core/ext_proc? If so, do waffle_dl_sym()/waffle_get_proc_address() actually succeed? I agree that the bug you discovered needs fixing, but I'm doubt that this fix is correct. We need more information to determine if it's safe. By the way, the gl_fw symbol was originally private (static) to the piglit-framework-gl directory, so the piglit-dispatch code would never access it with fragile hacks like this. I searched the history, and 4fa218b70d27c2dd8daedb6c5bc55135c7f32c00 moved gl_fw from private to public, introducing this fragility. The gl_fw genie needs to go back into its bottle, but that task is likely outside the scope of this patch series. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 3/8] gles-3.0/texture-immutable-levels: Fix tex array size
On Tue, Jan 07, 2014 at 12:02:38AM +0800, Daniel Kurtz wrote: We access tex[0] throught tex[3]. So, tex must have at least 4 elements. This fixes a gcc warning: warning: array subscript is above array bounds [-Warray-bounds] glBindTexture(GL_TEXTURE_3D, tex[3]); ^ Signed-off-by: Daniel Kurtz djku...@chromium.org --- tests/spec/gles-3.0/texture-immutable-levels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Chad Versace chad.vers...@linux.intel.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 4/8] all.tests: add texture-immutable-levels_gles3
On Tue, Jan 07, 2014 at 12:02:39AM +0800, Daniel Kurtz wrote: This test was missing from all.tests. Signed-off-by: Daniel Kurtz djku...@chromium.org --- tests/all.tests | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/all.tests b/tests/all.tests index edf066b..5e7d007 100644 --- a/tests/all.tests +++ b/tests/all.tests @@ -3351,6 +3351,7 @@ gles30['minmax'] = concurrent_test('minmax_gles3') for test_mode in ['teximage', 'texsubimage']: test_name = 'ext_texture_array-compressed_gles3 {0}'.format(test_mode) gles30[test_name] = PlainExecTest(test_name + ' -auto -fbo') +gles30['texture-immutable-levels'] = concurrent_test('texture-immutable-levels_gles3') Reviewed-by: Chad Versace chad.vers...@linux.intel.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 6/8] ext_texture_array: Add sampler2DArray precision for GL ES 3.0
On Tue, Jan 07, 2014 at 12:02:41AM +0800, Daniel Kurtz wrote: From GLSL_ES_Specification_3.0 [0]: There is no default precision qualifier for the following sampler types in either the vertex or fragment language: sampler2DArray [0] http://www.khronos.org/registry/gles/specs/3.0/GLSL_ES_Specification_3.00.4.pdf Signed-off-by: Daniel Kurtz djku...@chromium.org --- tests/spec/ext_texture_array/compressed.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Chad Versace chad.vers...@linux.intel.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 5/8] piglit_fbo_framework - don't even try for OpenGL ES 1.X
On Tue, Jan 07, 2014 at 12:02:40AM +0800, Daniel Kurtz wrote: glGenFramebuffers is not supported for OpenGL ES 1.X, so init_gl is hard coded to always fail for ES1. Thus, there is no way to use a fbo_framework w/ ES1. In this case, just fail faster in piglit_fbo_framework_create() instead of first initializing a wfl framework, just to destroy it again in the failure path. Signed-off-by: Daniel Kurtz djku...@chromium.org --- tests/util/piglit-framework-gl/piglit_fbo_framework.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/util/piglit-framework-gl/piglit_fbo_framework.c b/tests/util/piglit-framework-gl/piglit_fbo_framework.c index 219b80d..d27706e 100644 --- a/tests/util/piglit-framework-gl/piglit_fbo_framework.c +++ b/tests/util/piglit-framework-gl/piglit_fbo_framework.c @@ -128,6 +128,9 @@ init_gl(struct piglit_wfl_framework *wfl_fw) struct piglit_gl_framework* piglit_fbo_framework_create(const struct piglit_gl_test_config *test_config) { +#ifdef PIGLIT_USE_OPENGL_ES1 + return false; +#else struct piglit_wfl_framework *wfl_fw; struct piglit_gl_framework *gl_fw; @@ -158,4 +161,5 @@ piglit_fbo_framework_create(const struct piglit_gl_test_config *test_config) fail: destroy(gl_fw); return NULL; +#endif /* PIGLIT_USE_OPENGL_ES1 */ } This makes sense to me. Reviewed-by: Chad Versace chad.vers...@linux.intel.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 7/8] OES_compressed_ETC1_RGB8_texture-basic: fix glCopyTexImage2D error check
On Tue, Jan 07, 2014 at 12:02:42AM +0800, Daniel Kurtz wrote: According to OpenGL ES 1.1 [0] and OpenGL ES 2.0 [1], for glCopyTexImage2D: GL_INVALID_ENUM is generated if internalformat is not an accepted constant. [0] http://www.khronos.org/opengles/sdk/1.1/docs/man/glCopyTexImage2D.xml [1] http://www.khronos.org/opengles/sdk/docs/man/xhtml/glCopyTexImage2D.xml Note: This is *different* than OpenGL [2] and OpenGL ES 3.0 [3], which both specify: GL_INVALID_VALUE is generated if internalformat is not an accepted format. [2] http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage2D.xml [3] http://www.khronos.org/opengles/sdk/docs/man3/xhtml/glCopyTexImage2D.xml Signed-off-by: Daniel Kurtz djku...@chromium.org --- .../oes_compressed_etc1_rgb8_texture-basic.c | 4 1 file changed, 4 insertions(+) Looks good to me. Reviewed-by: Chad Versace chad.vers...@linux.intel.com ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] glsl-fs-lots-of-tex: use a value that is more likely to become 3
The test relies on 0.01 being rounded to 3 in the uniform int texture. However on NVIDIA hardware when using a 2D blit, 2.55 becomes 2, and so the test fails. I don't see anything in the OpenGL spec that guarantees any specific rounding logic (e.g. OpenGL 4.4 section 2.3.4.2) when converting, so this adjusts the value to 0.011 which does get rounded to 3 on both nv50 and nvc0. Signed-off-by: Ilia Mirkin imir...@alum.mit.edu --- tests/shaders/glsl-fs-lots-of-tex.shader_test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/shaders/glsl-fs-lots-of-tex.shader_test b/tests/shaders/glsl-fs-lots-of-tex.shader_test index a31778f..a05d475 100644 --- a/tests/shaders/glsl-fs-lots-of-tex.shader_test +++ b/tests/shaders/glsl-fs-lots-of-tex.shader_test @@ -40,6 +40,6 @@ void main() [test] uniform int tex 0 uniform vec4 cst 0.0 0.0 0.0 0.0 -texture checkerboard 0 0 (8, 8) (0.01, 0.0, 0.0, 0.0) (0.01, 0.0, 0.0, 0.0) +texture checkerboard 0 0 (8, 8) (0.011, 0.0, 0.0, 0.0) (0.011, 0.0, 0.0, 0.0) draw rect -1 -1 2 2 relative probe rgb (0.75, 0.75) (0.4, 0.0, 0.0) -- 1.8.3.2 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 8/8] egl_khr_create_context: Add valid-flag-debug tests to GLES CMakeLists
On Fri, Jan 10, 2014 at 10:50:50AM -0800, Matt Turner wrote: On Fri, Jan 10, 2014 at 10:30 AM, Chad Versace chad.vers...@linux.intel.com wrote: On Tue, Jan 07, 2014 at 12:02:43AM +0800, Daniel Kurtz wrote: Add these gles specific tests to CMakelists so they will be built when targeting GLES. Signed-off-by: Daniel Kurtz djku...@chromium.org --- tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt b/tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt index dde8960..c629888 100644 --- a/tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt +++ b/tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt @@ -27,5 +27,6 @@ piglit_add_executable (egl-create-context-invalid-flag-gles invalid-flag-gles.c # Tests that use ES 1, ES 2, and Desktop GL. piglit_add_executable (egl-create-context-invalid-gl-version invalid-gl-version.c common.c) piglit_add_executable (egl-create-context-verify-gl-flavor verify-gl-flavor.c common.c) +piglit_add_executable (egl-create-context-valid-flag-debug valid-flag-debug.c common.c) NAK This patch breaks the Piglit build. In CMake, it's illegal to for a target name to have multiple definitions. And egl-create-context-valid-flag-debug is already defined in CMakeLists.gl.txt. Isn't this simply fixed by suffixing the executable name with -gles, like we've done for most of the other tests in this directory? Yes, that's a sensible workaround for now. Daniel needs to add the new test executable egl-create-context-valid-flag-debug_gles to all.tests too. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 3/4] arb_viewport_array: Fix uses of gl_ViewportIndex in the fragment shader
From: Ian Romanick ian.d.roman...@intel.com There were two problem here. First, it is illegal in GLSL to redecalre a built-in variable. Section 3.7 (Identifiers) of the GLSL 4.40 spec says: However, as noted in the specification, there are some cases where previously declared variables can be redeclared, and predeclared gl_ names are allowed to be redeclared in a shader only for these specific purposes. More generally, it is a compile-time error to redeclare a variable, including those starting gl_. There is no mention in the spec of any cases where gl_ViewportIndex can be redeclared. Second, gl_ViewportIndex does not exist in the fragment shader without GL_ARB_fragment_layer_viewport or GLSL 4.3. Mesa does not yet support either. Instead, manually pass the viewport index from the geometry shader to the fragment shader. Signed-off-by: Ian Romanick ian.d.roman...@intel.com Cc: Jon Ashburn j...@lunarg.com Cc: Courtney Goeltzenleuchter court...@lunarg.com --- tests/spec/arb_viewport_array/render_depthrange.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/spec/arb_viewport_array/render_depthrange.c b/tests/spec/arb_viewport_array/render_depthrange.c index f274e3e..4c1e463 100644 --- a/tests/spec/arb_viewport_array/render_depthrange.c +++ b/tests/spec/arb_viewport_array/render_depthrange.c @@ -64,10 +64,12 @@ const char *gsSource = { layout(triangles) in;\n layout(triangle_strip, max_vertices = 3) out;\n uniform int idx;\n + flat out int ViewportIndex;\n \n void main()\n {\n gl_ViewportIndex = idx;\n + ViewportIndex = idx;\n for(int i = 0; i gl_in.length(); i++) {\n gl_Position = gl_in[i].gl_Position;\n EmitVertex();\n @@ -80,9 +82,9 @@ const char *fsSource = { #version 150\n #extension GL_ARB_viewport_array : enable\n uniform vec3 color;\n - in int gl_ViewportIndex;\n + flat in int ViewportIndex;\n void main() {\n - float idx = gl_ViewportIndex / 10.0;\n + float idx = ViewportIndex / 10.0;\n gl_FragColor = vec4(gl_FragCoord.z, gl_DepthRange.far, idx, 1.0);\n }\n }; -- 1.8.1.4 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/4] minmax: Detect cases where errors are generated or values not written
From: Ian Romanick ian.d.roman...@intel.com Any minmax test should fail if the query either generates an error or doesn't write a value to the destination. To facilitate this, the storage location is initialized to a value that is unlikely to be generated by the GL (0xDEADBEEF) instead of . This caused some additional failures arb_viewport_array-minmax to be flagged while the extension was being developed. Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- tests/util/minmax-test.c | 66 +++- 1 file changed, 48 insertions(+), 18 deletions(-) diff --git a/tests/util/minmax-test.c b/tests/util/minmax-test.c index 1cb8ab9..ef98a8f 100644 --- a/tests/util/minmax-test.c +++ b/tests/util/minmax-test.c @@ -99,30 +99,42 @@ piglit_report_float(const char *name, GLfloat limit, GLfloat val, bool pass) } } +#define SENTINEL 0xDEADBEEF + static void piglit_test_int(GLenum token, GLint limit, bool max) { const char *name = piglit_get_gl_enum_name(token); - GLint val = ; + GLint val = SENTINEL; + bool pass; glGetIntegerv(token, val); + pass = piglit_check_gl_error(GL_NO_ERROR); + piglit_report_int(name, limit, val, - (max val = limit) || - (!max val = limit)); + pass + val != SENTINEL + ((max val = limit) || + (!max val = limit))); } static void piglit_test_uint(GLenum token, GLuint limit, bool max) { const char *name = piglit_get_gl_enum_name(token); - GLuint val = ; + GLuint val = SENTINEL; + bool pass; glGetIntegerv(token, (GLint*) val); + pass = piglit_check_gl_error(GL_NO_ERROR); + piglit_report_uint(name, limit, val, - (max val = limit) || - (!max val = limit)); + pass + val != SENTINEL + ((max val = limit) || + (!max val = limit))); } #if !defined(PIGLIT_USE_OPENGL_ES2) @@ -130,20 +142,26 @@ static void piglit_test_int64(GLenum token, GLint64 limit, bool max) { const char *name = piglit_get_gl_enum_name(token); - GLint64 val = ; + GLint64 val = SENTINEL; + bool pass; glGetInteger64v(token, val); + pass = piglit_check_gl_error(GL_NO_ERROR); + piglit_report_int64(name, limit, val, - (max val = limit) || - (!max val = limit)); + pass + val != SENTINEL + ((max val = limit) || +(!max val = limit))); } static void piglit_test_uint64(GLenum token, GLuint64 limit, bool max) { const char *name = piglit_get_gl_enum_name(token); - GLuint64 val; + GLuint64 val = SENTINEL; + bool pass; /* To obtain GLuint64 values, we must use glGetInteger64v. * Justification is found in the GL_ARB_sync spec: @@ -160,9 +178,13 @@ piglit_test_uint64(GLenum token, GLuint64 limit, bool max) glGetInteger64v(token, (GLint64*) val); + pass = piglit_check_gl_error(GL_NO_ERROR); + piglit_report_uint64(name, limit, val, -(max val = limit) || -(!max val = limit)); +pass +val != SENTINEL +((max val = limit) || + (!max val = limit))); } #endif /* !PIGLIT_USE_OPENGL_ES2 */ @@ -212,13 +234,18 @@ static void piglit_test_float(GLenum token, GLfloat limit, bool max) { const char *name = piglit_get_gl_enum_name(token); - GLfloat val = -; + GLfloat val = -SENTINEL; + bool pass; glGetFloatv(token, val); + pass = piglit_check_gl_error(GL_NO_ERROR); + piglit_report_float(name, limit, val, - (max val = limit) || - (!max val = limit)); + pass + val != SENTINEL + ((max val = limit) || +(!max val = limit))); } void piglit_test_min_float(GLenum token, GLfloat min) @@ -236,16 +263,19 @@ void piglit_test_range_float(GLenum token, GLfloat low, GLfloat high) { const char *name = piglit_get_gl_enum_name(token); char *temp; - GLfloat vals[2] = {, }; + GLfloat vals[2] = {SENTINEL, SENTINEL}; + bool pass; glGetFloatv(token, vals); + pass = piglit_check_gl_error(GL_NO_ERROR); + asprintf(temp, %s[0], name); - piglit_report_float(temp, low, vals[0], vals[0] = low); + piglit_report_float(temp, low, vals[0], pass
[Piglit] [PATCH 2/4] arb_viewport_array: Move error detection closer to the causes
From: Ian Romanick ian.d.roman...@intel.com This made it a bit easier to notice which cases were actually failing. Signed-off-by: Ian Romanick ian.d.roman...@intel.com Cc: Jon Ashburn j...@lunarg.com Cc: Courtney Goeltzenleuchter court...@lunarg.com --- tests/spec/arb_viewport_array/minmax.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/spec/arb_viewport_array/minmax.c b/tests/spec/arb_viewport_array/minmax.c index d176d22..c2fdca0 100644 --- a/tests/spec/arb_viewport_array/minmax.c +++ b/tests/spec/arb_viewport_array/minmax.c @@ -83,6 +83,9 @@ piglit_init(int argc, char **argv) *LAST_VERTEX_CONVENTION, PROVOKING_VERTEX, UNDEFINED_VERTEX. */ glGetIntegerv(GL_LAYER_PROVOKING_VERTEX, layer); + piglit_minmax_pass = piglit_check_gl_error(GL_NO_ERROR) +piglit_minmax_pass; + switch (layer) { case GL_FIRST_VERTEX_CONVENTION: case GL_LAST_VERTEX_CONVENTION: @@ -99,6 +102,9 @@ piglit_init(int argc, char **argv) } glGetIntegerv(GL_VIEWPORT_INDEX_PROVOKING_VERTEX, index); + piglit_minmax_pass = piglit_check_gl_error(GL_NO_ERROR) +piglit_minmax_pass; + switch (index) { case GL_FIRST_VERTEX_CONVENTION: case GL_LAST_VERTEX_CONVENTION: @@ -114,8 +120,5 @@ piglit_init(int argc, char **argv) break; } - if (!piglit_check_gl_error(GL_NO_ERROR)) - piglit_report_result(PIGLIT_FAIL); - piglit_report_result(piglit_minmax_pass ? PIGLIT_PASS : PIGLIT_FAIL); } -- 1.8.1.4 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 4/4] arb-fragment-coord-conventions: Move the GL requirement from piglit_init to the config section
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- tests/shaders/glsl-arb-fragment-coord-conventions.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/shaders/glsl-arb-fragment-coord-conventions.c b/tests/shaders/glsl-arb-fragment-coord-conventions.c index 297b0e8..51feae9 100644 --- a/tests/shaders/glsl-arb-fragment-coord-conventions.c +++ b/tests/shaders/glsl-arb-fragment-coord-conventions.c @@ -35,7 +35,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN - config.supports_gl_compat_version = 10; + config.supports_gl_compat_version = 20; config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE; @@ -242,8 +242,6 @@ static void key_func(unsigned char key, int x, int y) void piglit_init(int argc, char **argv) { - piglit_require_gl_version(20); - piglit_require_extension(GL_ARB_fragment_coord_conventions); if (!piglit_automatic) { -- 1.8.1.4 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [ANNOUNCE] waffle = 1.3 required, you may need to rerun CMake
(If you don't use Piglit's Waffle backend, then you can safely ignore this announcement). (If commit dca9752 from 2014-01-10 didn't break your build, then you too can safely this announcement). A recent commit, dca9752, bumped Piglit's Waffle requirement from 1.2 to 1.3. This was required to add Piglit support for forward-compatible and debug contexts. Because CMake and pkgconfig do not get along as well as we like, the new requirement may require your manual intervention even if waffle = 1.3 is installed on your system. If commit dca9752 broke your build, *and* waffle = 1.3 is installed onto your system, then here are three ways to fix your problem, in order of increasing invasiveness: 1. Manually update the value of WAFFLE_VERSION in CMakeCache.txt to the version installed on your system, according to `pkg-config --modversion waffle-1`. 2. Or... Remove CMakeCache.txt and rerun cmake. 3. Or... Start with a clean slate. `rm -r` Piglit's build directory and rerun cmake. Apologies for any invconveniences. I'd like to see patches to change Piglit's CMake so that it never cached pkg-config results, but that's quite low on my todo list right now. -Chad ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] fbo-rg: Silence uninitialized variable warning.
Fix GCC maybe-uninitialized warning. fbo-rg.c:485:34: warning: 'internal_format' may be used uninitialized in this function [-Wmaybe-uninitialized] pass = render_and_check_textures(internal_format); ^ Signed-off-by: Vinson Lee v...@freedesktop.org --- tests/fbo/fbo-rg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fbo/fbo-rg.c b/tests/fbo/fbo-rg.c index fd20064..ca5042a 100644 --- a/tests/fbo/fbo-rg.c +++ b/tests/fbo/fbo-rg.c @@ -409,7 +409,7 @@ usage(const char *name) void piglit_init(int argc, char **argv) { - GLenum internal_format; + GLenum internal_format = GL_NONE; const char *fmt; if ((argc == 1) || (strncmp(argv[1], GL_R, 4) != 0)) -- 1.8.4.2 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] fbo-scissor-blit: Silence uninitialized variable warning.
Fix GCC maybe-uninitialized warning. fbo-scissor-blit.c:109:5: warning: 'blit_to_fbo' may be used uninitialized in this function [-Wmaybe-uninitialized] if (blit_to_fbo) ^ Signed-off-by: Vinson Lee v...@freedesktop.org --- tests/fbo/fbo-scissor-blit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/fbo/fbo-scissor-blit.c b/tests/fbo/fbo-scissor-blit.c index 844e062..0a792eb 100644 --- a/tests/fbo/fbo-scissor-blit.c +++ b/tests/fbo/fbo-scissor-blit.c @@ -99,8 +99,10 @@ piglit_init(int argc, char **argv) blit_to_fbo = false; else if (strcmp(argv[1], fbo) == 0) blit_to_fbo = true; - else + else { + blit_to_fbo = false; print_usage_and_exit(argv[0]); + } piglit_require_extension(GL_ARB_framebuffer_object); -- 1.8.4.2 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] fbo-stencil: Silence uninitialized warning.
Fix GCC maybe-uninitialized warning. fbo-stencil.c:332:2: warning: 'res' may be used uninitialized in this function [-Wmaybe-uninitialized] return res; ^ Signed-off-by: Vinson Lee v...@freedesktop.org --- tests/fbo/fbo-stencil.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/fbo/fbo-stencil.c b/tests/fbo/fbo-stencil.c index ccd46b2..a743173 100644 --- a/tests/fbo/fbo-stencil.c +++ b/tests/fbo/fbo-stencil.c @@ -319,6 +319,7 @@ enum piglit_result piglit_display(void) break; default: assert(0); + res = PIGLIT_SKIP; } /* Cleanup. */ -- 1.8.4.2 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] primitive-restart: Fix GCC warnings.
This patch fixes these GCC warnings. primitive-restart.c: In function 'read_index_value': primitive-restart.c:253:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ primitive-restart.c: In function 'test_draw_by_index': primitive-restart.c:445:18: warning: 'restart_index' may be used uninitialized in this function [-Wmaybe-uninitialized] enable_restart(restart_index); ^ Signed-off-by: Vinson Lee v...@freedesktop.org --- tests/general/primitive-restart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/general/primitive-restart.c b/tests/general/primitive-restart.c index 5cff163..0674c11 100644 --- a/tests/general/primitive-restart.c +++ b/tests/general/primitive-restart.c @@ -249,6 +249,7 @@ static GLuint read_index_value(const GLvoid *indices, GLenum type, GLuint index) return ((GLuint*)indices)[index]; default: assert(0); + return 0; } } @@ -337,6 +338,7 @@ test_draw_by_index(VBO_CFG vbo_cfg, GLboolean one_by_one, GLenum primMode, GLenu break; default: assert(0); + restart_index = 0; } x = 0.0; -- 1.8.4.2 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] glslparsertest: Silence uninitialized variable warnings.
Fix GCC maybe-uninitialized warnings. glslparsertest.c: In function 'attach_dummy_shader': glslparsertest.c:153:9: warning: 'shader_template' may be used uninitialized in this function [-Wmaybe-uninitialized] sprintf(shader_text, ^ glslparsertest.c: In function 'piglit_init': glslparsertest.c:221:5: warning: 'type' may be used uninitialized in this function [-Wmaybe-uninitialized] if (type == GL_COMPUTE_SHADER) { ^ glslparsertest.c:199:9: note: 'type' was declared here GLenum type; ^ Signed-off-by: Vinson Lee v...@freedesktop.org --- tests/glslparsertest/glslparsertest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/glslparsertest/glslparsertest.c b/tests/glslparsertest/glslparsertest.c index fbfbb16..5957144 100644 --- a/tests/glslparsertest/glslparsertest.c +++ b/tests/glslparsertest/glslparsertest.c @@ -145,6 +145,7 @@ attach_dummy_shader(GLuint shader_prog, GLenum type) void main() { }; break; default: + shader_template = NULL; printf(No dummy shader available for this shader type\n); piglit_report_result(PIGLIT_FAIL); break; @@ -210,6 +211,7 @@ test(void) type = GL_COMPUTE_SHADER; #endif else { + type = GL_NONE; fprintf(stderr, Couldn't determine type of program %s\n, filename); piglit_report_result(PIGLIT_FAIL); -- 1.8.4.2 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] asmparsertest: Silence uninitialized variable warning.
Fix GCC maybe-uninitialized warning. asmparsertest.c: In function 'piglit_init': asmparsertest.c:243:10: warning: 'target' may be used uninitialized in this function [-Wmaybe-uninitialized] compile(argv[i], target, use_ARB); ^ Signed-off-by: Vinson Lee v...@freedesktop.org --- tests/asmparsertest/asmparsertest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/asmparsertest/asmparsertest.c b/tests/asmparsertest/asmparsertest.c index 9b99e71..16ed0df 100644 --- a/tests/asmparsertest/asmparsertest.c +++ b/tests/asmparsertest/asmparsertest.c @@ -236,6 +236,7 @@ piglit_init(int argc, char **argv) piglit_require_extension(GL_NV_fragment_program); use_ARB = 0; } else { + target = GL_NONE; piglit_report_result(PIGLIT_FAIL); } -- 1.8.4.2 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] glsl-link-test: Silence uninitialized variable warning.
Fix GCC maybe-uninitialized warning. glsl-link-test.c: In function 'piglit_init': glsl-link-test.c:124:10: warning: 'expect' may be used uninitialized in this function [-Wmaybe-uninitialized] fprintf(stderr, ^ Signed-off-by: Vinson Lee v...@freedesktop.org --- tests/shaders/glsl-link-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/shaders/glsl-link-test.c b/tests/shaders/glsl-link-test.c index 6b5c2f9..d4faeae 100644 --- a/tests/shaders/glsl-link-test.c +++ b/tests/shaders/glsl-link-test.c @@ -47,7 +47,7 @@ piglit_display(void) void piglit_init(int argc, char **argv) { GLint program; - bool expect; + bool expect = false; bool result; unsigned i; const char *invalid_file = NULL; -- 1.8.4.2 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] shader_runner: Fix GCC warnings.
This patch fixes these GCC warnings. shaders/shader_runner.c: In function 'compare': shader_runner.c:376:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ shader_runner.c: In function 'comparison_string': shader_runner.c:395:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ shader_runner.c: In function 'piglit_display': shader_runner.c:1628:8: warning: 'parameter_name' may be used uninitialized in this function [-Wmaybe-uninitialized] value = lookup_enum_string(strings, line, parameter_name); ^ shader_runner.c:1572:14: note: 'parameter_name' was declared here const char *parameter_name; ^ shader_runner.c:1629:17: warning: 'parameter' may be used uninitialized in this function [-Wmaybe-uninitialized] glTexParameteri(target, parameter, value); ^ shader_runner.c:1571:9: note: 'parameter' was declared here GLenum parameter; ^ Signed-off-by: Vinson Lee v...@freedesktop.org --- tests/shaders/shader_runner.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index d78514b..018b143 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -373,6 +373,7 @@ compare(float ref, float value, enum comparison cmp) } assert(!Should not get here.); + return false; } @@ -392,6 +393,7 @@ comparison_string(enum comparison cmp) } assert(!Should not get here.); + return false; } @@ -1568,8 +1570,8 @@ handle_texparameter(const char *line) { alpha, GL_ALPHA }, }; GLenum target = 0; - GLenum parameter; - const char *parameter_name; + GLenum parameter = GL_NONE; + const char *parameter_name = NULL; const struct string_to_enum *strings = NULL; GLenum value; -- 1.8.4.2 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit