Re: [Piglit] [PATCH] khr_debug: fix invalid enum usage on gles3
Reviewed-by: Tapani Pälli On 11/8/18 12:09 PM, Erik Faye-Lund wrote: GL_SAMPLES_PASSED isn't allowed on gles3, so doing a quiery with it isn't going to work. But GL_ANY_SAMPLES_PASSED is allowed, so so let's use that one instead on gles. Signed-off-by: Erik Faye-Lund --- This bug came up while testing this mesa patch-series: https://patchwork.freedesktop.org/series/52169/ tests/spec/khr_debug/debug-object-label.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/spec/khr_debug/debug-object-label.c b/tests/spec/khr_debug/debug-object-label.c index e9617d719..f9c7eac5a 100644 --- a/tests/spec/khr_debug/debug-object-label.c +++ b/tests/spec/khr_debug/debug-object-label.c @@ -236,8 +236,13 @@ test_object_label_types() piglit_get_gl_version() >= 30) { /* Test QUERY */ glGenQueries(1, ); - glBeginQuery(GL_SAMPLES_PASSED, query); - glEndQuery(GL_SAMPLES_PASSED); + if (piglit_is_gles()) { + glBeginQuery(GL_ANY_SAMPLES_PASSED, query); + glEndQuery(GL_ANY_SAMPLES_PASSED); + } else { + glBeginQuery(GL_SAMPLES_PASSED, query); + glEndQuery(GL_SAMPLES_PASSED); + } ObjectLabel(GL_QUERY, query, -1, TestLabel); GetObjectLabel(GL_QUERY, query, TestLabelLen + 1, [QUERY_IDX], label[QUERY_IDX]); ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] python: add explicit utf-8 encoding
yeah, python's pretty liberal in what it accepts. Quoting Eric Engestrom (2018-11-08 11:05:33) > I went with `# coding=utf-8` as it was the most common format in the > existing code: > 24 # coding=utf-8 > 21 ## coding=utf-8 > 19 # encoding=utf-8 > 9 ## encoding=utf-8 > 6 # -*- coding: utf-8 -*- > > I added it as the first line after the shebang, if any. perfect, that's the right thing to do. Reviewed-by: Dylan Baker > > Suggested-by: Dylan Baker > Signed-off-by: Eric Engestrom > --- > framework/__init__.py | 1 + > framework/backends/__init__.py | 1 + > framework/backends/abstract.py | 1 + > framework/backends/compression.py | 1 + > framework/backends/json.py | 1 + > framework/backends/junit.py | 1 + > framework/backends/register.py | 1 + > framework/compat.py | 1 + > framework/core.py | 1 + > framework/dmesg.py | 1 + > framework/driver_classifier.py | 1 + > framework/exceptions.py | 1 + > framework/grouptools.py | 1 + > framework/log.py| 1 + > framework/monitoring.py | 1 + > framework/options.py| 1 + > framework/profile.py| 1 + > framework/programs/parsers.py | 1 + > framework/programs/print_commands.py| 1 + > framework/programs/run.py | 1 + > framework/programs/summary.py | 1 + > framework/results.py| 1 + > framework/status.py | 1 + > framework/summary/__init__.py | 1 + > framework/summary/common.py | 1 + > framework/summary/console_.py | 1 + > framework/summary/feature.py| 1 + > framework/summary/html_.py | 1 + > framework/test/__init__.py | 1 + > framework/test/base.py | 1 + > framework/test/deqp.py | 1 + > framework/test/glsl_parser_test.py | 1 + > framework/test/gtest.py | 1 + > framework/test/oclconform.py| 1 + > framework/test/opencv.py| 1 + > framework/test/opengl.py| 1 + > framework/test/piglit_test.py | 1 + > framework/test/shader_test.py | 1 + > framework/wflinfo.py| 1 + > generated_tests/gen_cl_common_builtins.py | 1 + > generated_tests/gen_cl_int_builtins.py | 1 + > generated_tests/gen_cl_math_builtins.py | 1 + > generated_tests/gen_cl_relational_builtins.py | 1 + > generated_tests/gen_cl_shuffle2_builtins.py | 1 + > generated_tests/gen_cl_shuffle_builtins.py | 1 + > generated_tests/gen_cl_store_tests.py | 1 + > generated_tests/gen_cl_vload_tests.py | 1 + > generated_tests/gen_cl_vstore_tests.py | 1 + > generated_tests/gen_const_builtin_equal_tests.py| 1 + > generated_tests/gen_outerproduct_invalid_params.py | 1 + > generated_tests/gen_outerproduct_tests.py | 1 + > generated_tests/gen_texture_lod_tests.py| 1 + > generated_tests/gen_variable_index_read_tests.py| 1 + > generated_tests/gen_variable_index_write_tests.py | 1 + > generated_tests/genclbuiltins.py| 1 + > generated_tests/modules/__init__.py | 1 + > generated_tests/modules/utils.py| 1 + > generated_tests/random_ubo-arb_uniform_buffer_object.py | 1 + > generated_tests/random_ubo.py | 1 + > generated_tests/random_ubo_trim.py | 1 + > generated_tests/templates/__init__.py | 1 + > piglit-print-commands.py| 1 + > piglit-resume.py| 1 + > piglit-run.py | 1 + > piglit-summary-html.py | 1 + > piglit-summary.py | 1 + > registry/gl.py | 1 + > tests/apitrace/test-trace.py| 1 + > tests/crucible.py
[Piglit] [PATCH] EGL_EXT_image_dma_buf_import: add AYUV format support
Signed-off-by: Lionel Landwerlin --- .../ext_image_dma_buf_import/sample_yuv.c | 33 ++- .../piglit-framework-gl/piglit_drm_dma_buf.c | 1 + 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/tests/spec/ext_image_dma_buf_import/sample_yuv.c b/tests/spec/ext_image_dma_buf_import/sample_yuv.c index a314bc56f..b909221ee 100644 --- a/tests/spec/ext_image_dma_buf_import/sample_yuv.c +++ b/tests/spec/ext_image_dma_buf_import/sample_yuv.c @@ -77,9 +77,30 @@ piglit_display(void) /* U */ 120, 140, 120, 140, + }, ayuv[] = { + /* AYUV (TODO: find a way to test alpha channel) */ + 130, 120, 50, 255, + 130, 127, 70, 255, + 130, 133, 90, 255, + 130, 140, 110, 255, + + 140, 120, 50, 255, + 140, 127, 70, 255, + 140, 133, 90, 255, + 140, 140, 110, 255, + + 150, 120, 50, 255, + 150, 127, 70, 255, + 150, 133, 90, 255, + 150, 140, 110, 255, + + 160, 120, 50, 255, + 160, 127, 70, 255, + 160, 133, 90, 255, + 160, 140, 110, 255, }; - static const unsigned char expected[4 * 4 * 4] = { + unsigned char expected[4 * 4 * 4] = { 44, 41, 25, 255, 67, 64, 48, 255, 90, 79, 111, 255, @@ -114,6 +135,16 @@ piglit_display(void) case DRM_FORMAT_YVU420: t = yvu420; break; + case DRM_FORMAT_AYUV: + t = ayuv; + /* Override the alpha channel. */ + for (int y = 0; y < 4; y++) { + for (int x = 0; x < 4; x++) { + expected[y * 4 * 4 + x * 4 + 3] = + ayuv[y * 4 * 4 + x * 4 + 3]; + } + } + break; default: return PIGLIT_SKIP; } diff --git a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c index 869d9db7d..13bf883f2 100644 --- a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c +++ b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c @@ -154,6 +154,7 @@ piglit_intel_buf_create(unsigned w, unsigned h, unsigned fourcc, case DRM_FORMAT_ABGR: case DRM_FORMAT_RGBA: case DRM_FORMAT_BGRA: + case DRM_FORMAT_AYUV: cpp = 4; break; case DRM_FORMAT_NV12: -- 2.19.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] framework: fix python2
Quoting Eric Engestrom (2018-11-08 09:37:22) > On Thursday, 2018-11-08 17:34:33 +, Dylan Baker wrote: > > Quoting Eric Engestrom (2018-11-08 09:23:51) > > > The non-ascii char broke the python2 CI: > > > https://travis-ci.org/mesa3d/piglit/jobs/452170869 > > > > > > Fixes: 221d924689e3bb2796ce "framework: Add a vulkan tests profile" > > > Cc: Neil Roberts > > > Cc: Samuel Iglesias Gonsálvez > > > Cc: Dylan Baker > > > Signed-off-by: Eric Engestrom > > > --- > > > framework/test/piglit_test.py | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py > > > index c80e355d184fb46ef0d8..83398bf6a719ade2e32c 100644 > > > --- a/framework/test/piglit_test.py > > > +++ b/framework/test/piglit_test.py > > > @@ -248,7 +248,7 @@ def __init__(self, filename): > > > > > > @PiglitBaseTest.command.getter > > > def command(self): > > > -# This is overriden because we don\u2019t want PiglitBaseTest to > > > +# This is overriden because we don't want PiglitBaseTest to > > > > That should just be a plain ', not a unicode, so we should fix that > > That is precisely what this patch is doing :) Doh! I misread the - and +, my bad :) Reviewed-by: Dylan Baker signature.asc Description: signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] framework: fix python2
Quoting Eric Engestrom (2018-11-08 09:23:51) > The non-ascii char broke the python2 CI: > https://travis-ci.org/mesa3d/piglit/jobs/452170869 > > Fixes: 221d924689e3bb2796ce "framework: Add a vulkan tests profile" > Cc: Neil Roberts > Cc: Samuel Iglesias Gonsálvez > Cc: Dylan Baker > Signed-off-by: Eric Engestrom > --- > framework/test/piglit_test.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py > index c80e355d184fb46ef0d8..83398bf6a719ade2e32c 100644 > --- a/framework/test/piglit_test.py > +++ b/framework/test/piglit_test.py > @@ -248,7 +248,7 @@ def __init__(self, filename): > > @PiglitBaseTest.command.getter > def command(self): > -# This is overriden because we don\u2019t want PiglitBaseTest to > +# This is overriden because we don't want PiglitBaseTest to That should just be a plain ', not a unicode, so we should fix that Also, just adding: #encoding=utf-8 to the top will ifx that as well. If we're not doing that to all of the piglit scripts we should. Dylan signature.asc Description: signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 0/4] Support serialization of VkRunner tests
Quoting Neil Roberts (2018-11-07 16:52:00) > As requested by Dylan in the review for the patch series to add > VkRunner as an external dependency¹, this series adds the missing > serialization support. > > 1. https://lists.freedesktop.org/archives/piglit/2018-November/025336.html > > Neil Roberts (4): > Cmake: Install vk_shader_test files > framework/test: Set the filename property on VkRunnerTest > framework/test: Use relative paths in the filename for VkRunnerTest > framework: Add support for serializing VkRunner tests > > CMakeLists.txt| 4 ++-- > framework/profile.py | 4 +++- > framework/test/piglit_test.py | 10 ++ > tests/CMakeLists.no_api.txt | 11 +++ > tests/find_static_tests.py| 5 - > tests/serializer.py | 7 ++- > tests/vulkan.py | 3 ++- > 7 files changed, 34 insertions(+), 10 deletions(-) > > -- > 2.17.1 > Thanks! for the series: Reviewed-by: Dylan Baker signature.asc Description: signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [Bug 108537] The fs-frexp-dvec4-only-exponent.shader_test test fails
https://bugs.freedesktop.org/show_bug.cgi?id=108537 asimiklit changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. You are the QA Contact for the bug.___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] vulkan: Add tests for block layout location calculations
On 08/11/18 13:24, Neil Roberts wrote: > All but one of these are currently broken on anv. > > See: https://patchwork.freedesktop.org/series/40797/ FWIW, the first patch of that series is outdated, due all the changes on master since then. A updated version was included on the ubo/ssbo support series for ARB_gl_spirv: https://github.com/Igalia/mesa/commit/0e933ed9848c6eea7ad1d664ec3aacbdba111b41 Don't know about the status of the other two. > --- > .../block-layout-location.vk_shader_test | 117 + > ...lock-member-layout-location.vk_shader_test | 68 ++ > ...block-mixed-layout-location.vk_shader_test | 120 ++ > .../double-vertex-input-block.vk_shader_test | 98 ++ > 4 files changed, 403 insertions(+) > create mode 100644 tests/vulkan/shaders/block-layout-location.vk_shader_test > create mode 100644 > tests/vulkan/shaders/block-member-layout-location.vk_shader_test > create mode 100644 > tests/vulkan/shaders/block-mixed-layout-location.vk_shader_test > create mode 100644 > tests/vulkan/shaders/double-vertex-input-block.vk_shader_test > > diff --git a/tests/vulkan/shaders/block-layout-location.vk_shader_test > b/tests/vulkan/shaders/block-layout-location.vk_shader_test > new file mode 100644 > index 0..2c81375d8 > --- /dev/null > +++ b/tests/vulkan/shaders/block-layout-location.vk_shader_test > @@ -0,0 +1,117 @@ > +# Test that interface block members are correctly matched by explicit > +# location. > + > +[vertex shader spirv] > + OpCapability Shader > + %1 = OpExtInstImport "GLSL.std.450" > + OpMemoryModel Logical GLSL450 > + OpEntryPoint Vertex %main "main" %name %_ %piglit_vertex > + OpSource GLSL 440 > + OpName %main "main" > + OpName %block "block" > + OpMemberName %block 0 "a" > + OpMemberName %block 1 "b" > + OpMemberName %block 2 "c" > + OpMemberName %block 3 "d" > + OpName %name "name" > + OpName %gl_PerVertex "gl_PerVertex" > + OpMemberName %gl_PerVertex 0 "gl_Position" > + OpMemberName %gl_PerVertex 1 "gl_PointSize" > + OpMemberName %gl_PerVertex 2 "gl_ClipDistance" > + OpName %_ "" > + OpName %piglit_vertex "piglit_vertex" > + OpDecorate %block Block > +; Only the main name variable has a location. The locations of the members > +; should be derived from this. > + OpDecorate %name Location 0 > + OpMemberDecorate %gl_PerVertex 0 BuiltIn Position > + OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize > + OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance > + OpDecorate %gl_PerVertex Block > + OpDecorate %piglit_vertex Location 0 > + %void = OpTypeVoid > + %3 = OpTypeFunction %void > + %float = OpTypeFloat 32 > +%v4float = OpTypeVector %float 4 > + %block = OpTypeStruct %v4float %v4float %v4float %v4float > +%_ptr_Output_block = OpTypePointer Output %block > + %name = OpVariable %_ptr_Output_block Output > +%int = OpTypeInt 32 1 > + %int_0 = OpConstant %int 0 > +%float_1 = OpConstant %float 1 > +%float_0 = OpConstant %float 0 > + %15 = OpConstantComposite %v4float %float_1 %float_0 %float_0 > %float_1 > +%_ptr_Output_v4float = OpTypePointer Output %v4float > + %int_1 = OpConstant %int 1 > + %19 = OpConstantComposite %v4float %float_0 %float_1 %float_0 > %float_1 > + %int_2 = OpConstant %int 2 > + %22 = OpConstantComposite %v4float %float_0 %float_0 %float_1 > %float_1 > + %int_3 = OpConstant %int 3 > + %25 = OpConstantComposite %v4float %float_1 %float_1 %float_1 > %float_1 > + %uint = OpTypeInt 32 0 > + %uint_1 = OpConstant %uint 1 > +%_arr_float_uint_1 = OpTypeArray %float %uint_1 > +%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 > +%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex > + %_ = OpVariable %_ptr_Output_gl_PerVertex Output > +%_ptr_Input_v4float = OpTypePointer Input %v4float > +%piglit_vertex = OpVariable %_ptr_Input_v4float Input > + %main = OpFunction %void None %3 > + %5 = OpLabel > + %17 = OpAccessChain %_ptr_Output_v4float %name %int_0 > + OpStore %17 %15 > + %20 = OpAccessChain %_ptr_Output_v4float %name %int_1 > + OpStore %20 %19 > + %23 = OpAccessChain %_ptr_Output_v4float %name %int_2 > + OpStore %23 %22 > + %26 = OpAccessChain %_ptr_Output_v4float %name %int_3 > + OpStore %26 %25 > + %35 = OpLoad %v4float %piglit_vertex > + %36 = OpAccessChain %_ptr_Output_v4float %_ %int_0 > + OpStore %36 %35 > + OpReturn > + OpFunctionEnd > + > +[fragment
[Piglit] [PATCH] vulkan/shader_draw_parameters: Add a test for gl_BaseVertex
gl_BaseVertex has slightly different semantics under Vulkan and GL so this is worth testing. --- .../base-vertex.vk_shader_test| 66 +++ 1 file changed, 66 insertions(+) create mode 100644 tests/vulkan/shader_draw_parameters/base-vertex.vk_shader_test diff --git a/tests/vulkan/shader_draw_parameters/base-vertex.vk_shader_test b/tests/vulkan/shader_draw_parameters/base-vertex.vk_shader_test new file mode 100644 index 0..c4c8c3e32 --- /dev/null +++ b/tests/vulkan/shader_draw_parameters/base-vertex.vk_shader_test @@ -0,0 +1,66 @@ +# Tests that gl_BaseVertex is firstVertex for non-indexed calls or +# vertexOffset for indexed ones. + +[require] +framebuffer R32G32B32A32_SFLOAT +VK_KHR_shader_draw_parameters + +[vertex shader] +#version 450 +#extension GL_ARB_shader_draw_parameters: require + +layout(location = 0) in vec4 piglit_vertex; +layout(location = 0) out vec4 color; + +layout(std140, push_constant) uniform block { +uint expected_base_vertex; +}; + +void +main() +{ +if (gl_BaseVertexARB == expected_base_vertex) + color = vec4(0.0, 1.0, 0.0, 1.0); +else + color = vec4(1.0, gl_BaseVertexARB / 255.0, 0.0, 1.0); + +gl_Position = piglit_vertex; +} + +[fragment shader] +#version 450 + +layout(location = 0) in vec4 color_in; +layout(location = 0) out vec4 color_out; + +void +main() +{ +color_out = color_in; +} + +[indices] +0 1 2 3 + +[vertex data] +0/R32G32_SFLOAT +-1 -1 +-1 -1 +-1 -1 +-1 -1 +-1 -1 +1 -1 +-1 1 +1 1 + +[test] +clear color 0.8 0.0 0.0 0.0 +clear + +uniform uint 0 4 + +draw arrays GL_TRIANGLE_STRIP 4 4 +probe all rgba 0.0 1.0 0.0 1.0 + +draw arrays indexed GL_TRIANGLE_STRIP 4 4 +probe all rgba 0.0 1.0 0.0 1.0 -- 2.17.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] vulkan: Add tests for block layout location calculations
All but one of these are currently broken on anv. See: https://patchwork.freedesktop.org/series/40797/ --- .../block-layout-location.vk_shader_test | 117 + ...lock-member-layout-location.vk_shader_test | 68 ++ ...block-mixed-layout-location.vk_shader_test | 120 ++ .../double-vertex-input-block.vk_shader_test | 98 ++ 4 files changed, 403 insertions(+) create mode 100644 tests/vulkan/shaders/block-layout-location.vk_shader_test create mode 100644 tests/vulkan/shaders/block-member-layout-location.vk_shader_test create mode 100644 tests/vulkan/shaders/block-mixed-layout-location.vk_shader_test create mode 100644 tests/vulkan/shaders/double-vertex-input-block.vk_shader_test diff --git a/tests/vulkan/shaders/block-layout-location.vk_shader_test b/tests/vulkan/shaders/block-layout-location.vk_shader_test new file mode 100644 index 0..2c81375d8 --- /dev/null +++ b/tests/vulkan/shaders/block-layout-location.vk_shader_test @@ -0,0 +1,117 @@ +# Test that interface block members are correctly matched by explicit +# location. + +[vertex shader spirv] + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %name %_ %piglit_vertex + OpSource GLSL 440 + OpName %main "main" + OpName %block "block" + OpMemberName %block 0 "a" + OpMemberName %block 1 "b" + OpMemberName %block 2 "c" + OpMemberName %block 3 "d" + OpName %name "name" + OpName %gl_PerVertex "gl_PerVertex" + OpMemberName %gl_PerVertex 0 "gl_Position" + OpMemberName %gl_PerVertex 1 "gl_PointSize" + OpMemberName %gl_PerVertex 2 "gl_ClipDistance" + OpName %_ "" + OpName %piglit_vertex "piglit_vertex" + OpDecorate %block Block +; Only the main name variable has a location. The locations of the members +; should be derived from this. + OpDecorate %name Location 0 + OpMemberDecorate %gl_PerVertex 0 BuiltIn Position + OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize + OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance + OpDecorate %gl_PerVertex Block + OpDecorate %piglit_vertex Location 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %float = OpTypeFloat 32 +%v4float = OpTypeVector %float 4 + %block = OpTypeStruct %v4float %v4float %v4float %v4float +%_ptr_Output_block = OpTypePointer Output %block + %name = OpVariable %_ptr_Output_block Output +%int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 +%float_1 = OpConstant %float 1 +%float_0 = OpConstant %float 0 + %15 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 + %int_2 = OpConstant %int 2 + %22 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_1 + %int_3 = OpConstant %int 3 + %25 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %uint = OpTypeInt 32 0 + %uint_1 = OpConstant %uint 1 +%_arr_float_uint_1 = OpTypeArray %float %uint_1 +%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 +%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex + %_ = OpVariable %_ptr_Output_gl_PerVertex Output +%_ptr_Input_v4float = OpTypePointer Input %v4float +%piglit_vertex = OpVariable %_ptr_Input_v4float Input + %main = OpFunction %void None %3 + %5 = OpLabel + %17 = OpAccessChain %_ptr_Output_v4float %name %int_0 + OpStore %17 %15 + %20 = OpAccessChain %_ptr_Output_v4float %name %int_1 + OpStore %20 %19 + %23 = OpAccessChain %_ptr_Output_v4float %name %int_2 + OpStore %23 %22 + %26 = OpAccessChain %_ptr_Output_v4float %name %int_3 + OpStore %26 %25 + %35 = OpLoad %v4float %piglit_vertex + %36 = OpAccessChain %_ptr_Output_v4float %_ %int_0 + OpStore %36 %35 + OpReturn + OpFunctionEnd + +[fragment shader] +#version 440 + +layout(location = 0) in vec4 a; +layout(location = 1) in vec4 b; +layout(location = 2) in vec4 c; +layout(location = 3) in vec4 d; + +layout(std140, push_constant) uniform block { +int i; +}; + +layout(location = 0) out vec4 color; + +void main() +{ +if (i == 0) { +color = a; +} else if (i == 1) { +color = b; +} else if (i == 2) { +color = c; +} else if (i == 3) { +color = d; +} +} + +[test] +uniform int 0 0
[Piglit] [PATCH] vulkan: Add a test for the OpFUnord* comparisons
These are unique to SPIR-V so they are interesting to test. --- .../unordered-comparison.vk_shader_test | 780 ++ 1 file changed, 780 insertions(+) create mode 100644 tests/vulkan/shaders/unordered-comparison.vk_shader_test diff --git a/tests/vulkan/shaders/unordered-comparison.vk_shader_test b/tests/vulkan/shaders/unordered-comparison.vk_shader_test new file mode 100644 index 0..9d6906bac --- /dev/null +++ b/tests/vulkan/shaders/unordered-comparison.vk_shader_test @@ -0,0 +1,780 @@ +# Tests the various OpFUnord* comparisons. These opcodes are not +# available in GLSL so they are interesting to test in SPIR-V. They +# are supposed to evaluate to true if the operands are unordered (ie, +# they are NaN). Apparently GLSL implementations are not required to +# generate NaN values so to cope with implementations that don’t this +# test tries to generates a NaN value by takning the square root of -1 +# and then checking whether it actually did generate a NaN with +# isnan(). + +[vertex shader passthrough] + +[fragment shader spirv] +; SPIR-V +; Version: 1.0 +; Generator: Khronos Glslang Reference Front End; 6 +; Bound: 179 +; Schema: 0 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %color_out + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 450 + OpName %main "main" + OpName %i "i" + OpName %operands "operands" + OpName %block "block" + OpMemberName %block 0 "operands_squared" + OpMemberName %block 1 "operator" + OpMemberName %block 2 "expected_value" + OpName %_ "" + OpName %result "result" + OpName %test_passes "test_passes" + OpName %color_out "color_out" + OpDecorate %_arr_float_uint_2_0 ArrayStride 16 + OpMemberDecorate %block 0 Offset 0 + OpMemberDecorate %block 1 Offset 32 + OpMemberDecorate %block 2 Offset 36 + OpDecorate %block Block + OpDecorate %color_out Location 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void +%int = OpTypeInt 32 1 +%_ptr_Function_int = OpTypePointer Function %int + %int_0 = OpConstant %int 0 + %int_2 = OpConstant %int 2 + %bool = OpTypeBool + %float = OpTypeFloat 32 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 +%_arr_float_uint_2 = OpTypeArray %float %uint_2 +%_ptr_Function__arr_float_uint_2 = OpTypePointer Function %_arr_float_uint_2 +%_arr_float_uint_2_0 = OpTypeArray %float %uint_2 + %block = OpTypeStruct %_arr_float_uint_2_0 %uint %uint +%_ptr_PushConstant_block = OpTypePointer PushConstant %block + %_ = OpVariable %_ptr_PushConstant_block PushConstant +%_ptr_PushConstant_float = OpTypePointer PushConstant %float +%_ptr_Function_float = OpTypePointer Function %float + %int_1 = OpConstant %int 1 +%_ptr_Function_bool = OpTypePointer Function %bool + %true = OpConstantTrue %bool +%_ptr_PushConstant_uint = OpTypePointer PushConstant %uint + %false = OpConstantFalse %bool +%float_0 = OpConstant %float 0 + %uint_0 = OpConstant %uint 0 +%v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float + %color_out = OpVariable %_ptr_Output_v4float Output +%float_1 = OpConstant %float 1 +%176 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 +%178 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 + %main = OpFunction %void None %3 + %5 = OpLabel + %i = OpVariable %_ptr_Function_int Function + %operands = OpVariable %_ptr_Function__arr_float_uint_2 Function + %result = OpVariable %_ptr_Function_bool Function +%test_passes = OpVariable %_ptr_Function_bool Function + OpStore %i %int_0 + OpBranch %10 + %10 = OpLabel + OpLoopMerge %12 %13 None + OpBranch %14 + %14 = OpLabel + %15 = OpLoad %int %i + %18 = OpSLessThan %bool %15 %int_2 + OpBranchConditional %18 %11 %12 + %11 = OpLabel + %25 = OpLoad %int %i + %30 = OpLoad %int %i + %32 = OpAccessChain %_ptr_PushConstant_float %_ %int_0 %30 + %33 = OpLoad %float %32 + %34 = OpExtInst %float %1 Sqrt %33 + %36 = OpAccessChain %_ptr_Function_float %operands %25 + OpStore %36 %34 + OpBranch %13 + %13 = OpLabel + %37 = OpLoad %int %i + %39 = OpIAdd %int %37 %int_1 + OpStore %i %39 + OpBranch %10 + %12 = OpLabel + OpStore %result %true + %44 = OpAccessChain %_ptr_PushConstant_uint %_ %int_1 + %45 = OpLoad %uint %44 +
[Piglit] [PATCH] vulkan: Add tests for interpolateAt*
For a while there was a bug in anv which meant that the interpolate functions wouldn’t work if the thing being interpolated contained a vertex component selector. Adding these tests will help make sure we don’t regress that. See: https://patchwork.freedesktop.org/patch/237095/ --- .../interpolate-aoa-dynamic.vk_shader_test| 84 +++ .../glsl450/interpolate-aoa.vk_shader_test| 69 +++ .../interpolate-at-centroid.vk_shader_test| 68 +++ .../interpolate-at-offset.vk_shader_test | 72 .../interpolate-at-sample.vk_shader_test | 69 +++ 5 files changed, 362 insertions(+) create mode 100644 tests/vulkan/glsl450/interpolate-aoa-dynamic.vk_shader_test create mode 100644 tests/vulkan/glsl450/interpolate-aoa.vk_shader_test create mode 100644 tests/vulkan/glsl450/interpolate-at-centroid.vk_shader_test create mode 100644 tests/vulkan/glsl450/interpolate-at-offset.vk_shader_test create mode 100644 tests/vulkan/glsl450/interpolate-at-sample.vk_shader_test diff --git a/tests/vulkan/glsl450/interpolate-aoa-dynamic.vk_shader_test b/tests/vulkan/glsl450/interpolate-aoa-dynamic.vk_shader_test new file mode 100644 index 0..ad21fc0b4 --- /dev/null +++ b/tests/vulkan/glsl450/interpolate-aoa-dynamic.vk_shader_test @@ -0,0 +1,84 @@ +# GLSL 4.40 changed the relevant language in Section 8.13.2 (Interpolation +# Functions) to: +# +#"Component selection operators (e.g., .xy) may be used when specifying +# interpolant." +# +# Furthermore, GLSL 4.60 clarified that +# +#"(...) interpolant must be an l-value from an in declaration; this can +# include a variable, a block or structure member, an array element, or +# some combination of these." +# +# which means array subscripts on vectors should also be allowed. +# + +[vertex shader] +#version 440 + +layout(location = 0) in vec4 piglit_vertex; +layout(location = 1) in uvec2 indices_in; + +layout(location = 0) out vec2 a[2]; +layout(location = 2) flat out uvec2 indices_out; + +void main() +{ +gl_Position = piglit_vertex; + +a[0] = vec2(0.25, 0.5); +a[1] = vec2(0.75, 1.0); +indices_out = indices_in; +} + +[fragment shader] +#version 440 + +layout(location = 0) in vec2 a[2]; +layout(location = 2) flat in uvec2 indices; + +layout(location = 0) out vec4 color; + +void main() +{ +color.rgb = vec3(interpolateAtCentroid(a[indices.x][indices.y])); +color.a = 1.0; +} + +[indices] +0 1 2 2 1 3 +4 5 6 6 5 7 +8 9 10 10 9 11 +12 13 14 14 13 15 + +[vertex data] +0/R32G32_SFLOAT 1/R32G32_UINT +-1.0 -1.0 0 0 + 0.0 -1.0 0 0 +-1.0 0.0 0 0 + 0.0 0.0 0 0 + + 0.0 -1.0 0 1 + 1.0 -1.0 0 1 + 0.0 0.0 0 1 + 1.0 0.0 0 1 + +-1.0 0.0 1 0 + 0.0 0.0 1 0 +-1.0 1.0 1 0 + 0.0 1.0 1 0 + + 0.0 0.0 1 1 + 1.0 0.0 1 1 + 0.0 1.0 1 1 + 1.0 1.0 1 1 + +[test] +clear + +draw arrays indexed TRIANGLE_LIST 0 24 + +relative probe rect rgb (0, 0, 0.5, 0.5) (0.25, 0.25, 0.25) +relative probe rect rgb (0.5, 0, 0.5, 0.5) (0.5, 0.5, 0.5) +relative probe rect rgb (0, 0.5, 0.5, 0.5) (0.75, 0.75, 0.75) +relative probe rect rgb (0.5, 0.5, 0.5, 0.5) (1.0, 1.0, 1.0) diff --git a/tests/vulkan/glsl450/interpolate-aoa.vk_shader_test b/tests/vulkan/glsl450/interpolate-aoa.vk_shader_test new file mode 100644 index 0..6ea5f6c04 --- /dev/null +++ b/tests/vulkan/glsl450/interpolate-aoa.vk_shader_test @@ -0,0 +1,69 @@ +# GLSL 4.40 changed the relevant language in Section 8.13.2 (Interpolation +# Functions) to: +# +#"Component selection operators (e.g., .xy) may be used when specifying +# interpolant." +# +# Furthermore, GLSL 4.60 clarified that +# +#"(...) interpolant must be an l-value from an in declaration; this can +# include a variable, a block or structure member, an array element, or +# some combination of these." +# +# which means array subscripts on vectors should also be allowed. +# + +[vertex shader] +#version 440 + +layout(location = 0) in vec4 piglit_vertex; + +layout(location = 0) out vec3 a[2]; + +void main() +{ + gl_Position = piglit_vertex; + + a[0] = piglit_vertex.xyz; + a[1] = vec3(1.0); +} + +[fragment shader] +#version 440 + +layout(location = 0) in vec3 a[2]; + +layout(std140, push_constant) uniform block { +int u_idx; +}; + +layout(location = 0) out vec4 color; + +void main() +{ + vec2 delta1 = a[0].yx - interpolateAtCentroid(a[0].yx); + float delta2 = a[0][2] - interpolateAtCentroid(a[0][2]); + float delta3 = a[0][u_idx] - interpolateAtCentroid(a[0][u_idx]); + + if (delta1 != vec2(0.0)) { + color = vec4(0.1, delta1.x + 0.5, delta1.y + 0.5, 0.0); + } else if (delta2 != 0.0) { + color = vec4(0.2, delta2 + 0.5, 0.0, 0.0); + } else if (delta3 != 0.0) { + color = vec4(0.3, delta3 + 0.5, 0.0, 0.0); + } else { + color = vec4(0.0, 1.0, 0.0, 1.0); + } +} + +[test] +clear color 0.0 0.0
Re: [Piglit] [PATCH] vulkan: test cases for large local arrays
Looks good to me Reviewed-by: Neil Roberts - Neil Alejandro Piñeiro writes: > Equivalent to the GLSL tests added with the series "Test cases for > large GLSL local arrays". Quoting from the cover-letter of that > series: > >"Drivers typically need special handling for local array storage > when arrays exceed a certain size, this adds a few test cases for > exercising some corner cases that were useful when implementing > support for this in the r600g driver." > > Right now only two of the tests included on this series is passing > (local-array and multiple). But all of them were working until the the > following commit: >* b3c6146925595ec3a7eece3afb9ccaad32906d4c ("nir: Copy propagation between > blocks") > > So it is fact, a regression. More info on > https://bugs.freedesktop.org/show_bug.cgi?id=108624 > > Original GLSL series: > https://lists.freedesktop.org/archives/piglit/2017-March/021867.html > --- > .../fs-large-local-array-vec2.vk_shader_test | 38 + > .../fs-large-local-array-vec3.vk_shader_test | 38 + > .../fs-large-local-array-vec4.vk_shader_test | 38 + > .../shaders/fs-large-local-array.vk_shader_test| 47 > ++ > .../fs-multiple-large-local-array.vk_shader_test | 40 ++ > 5 files changed, 201 insertions(+) > create mode 100644 > tests/vulkan/shaders/fs-large-local-array-vec2.vk_shader_test > create mode 100644 > tests/vulkan/shaders/fs-large-local-array-vec3.vk_shader_test > create mode 100644 > tests/vulkan/shaders/fs-large-local-array-vec4.vk_shader_test > create mode 100644 tests/vulkan/shaders/fs-large-local-array.vk_shader_test > create mode 100644 > tests/vulkan/shaders/fs-multiple-large-local-array.vk_shader_test > > diff --git a/tests/vulkan/shaders/fs-large-local-array-vec2.vk_shader_test > b/tests/vulkan/shaders/fs-large-local-array-vec2.vk_shader_test > new file mode 100644 > index 0..6fbf71d50 > --- /dev/null > +++ b/tests/vulkan/shaders/fs-large-local-array-vec2.vk_shader_test > @@ -0,0 +1,38 @@ > +# Tests a large vec2 local array. > +# Vulkan equivalent to > tests/spec/glsl-1.30/execution/fs-large-local-array-vec2.shader_test > + > +[require] > + > +[vertex shader passthrough] > + > +[fragment shader] > +#version 450 > + > +layout (binding = 5) uniform block { > + uint i; > +}; > + > +layout (location = 0) out vec4 out_color; > + > +void main() > +{ > + vec2 A[130]; > + A[20].g = 0; > + A[i].g = 37; > + A[i].r = 1; > +out_color.rba = vec3(0.0, 0.0, 1.0); > + out_color.g = float(A[20].g == 37); > +} > + > +[test] > +clear color 1.0 0.0 0.0 1.0 > +clear > + > +uniform ubo 5 uint 0 19 > +draw rect -1 -1 2 2 > +probe all rgba 0.0 0.0 0.0 1.0 > + > +clear > +uniform ubo 5 uint 0 20 > +draw rect -1 -1 2 2 > +probe all rgba 0.0 1.0 0.0 1.0 > diff --git a/tests/vulkan/shaders/fs-large-local-array-vec3.vk_shader_test > b/tests/vulkan/shaders/fs-large-local-array-vec3.vk_shader_test > new file mode 100644 > index 0..8c00bc720 > --- /dev/null > +++ b/tests/vulkan/shaders/fs-large-local-array-vec3.vk_shader_test > @@ -0,0 +1,38 @@ > +# Tests a large vec3 local array. > +# Vulkan equivalent to > tests/spec/glsl-1.30/execution/fs-large-local-array-vec3.shader_test > + > +[require] > + > +[vertex shader passthrough] > + > +[fragment shader] > +#version 450 > + > +layout (binding = 5) uniform block { > + uint i; > +}; > + > +layout (location = 0) out vec4 out_color; > + > +void main() > +{ > + vec3 A[130]; > + A[20].g = 0; > + A[i].g = 37; > + A[i].r = 1; > +out_color.rba = vec3(0.0, 0.0, 1.0); > + out_color.g = float(A[20].g == 37); > +} > + > +[test] > +clear color 1.0 0.0 0.0 1.0 > +clear > + > +uniform ubo 5 uint 0 19 > +draw rect -1 -1 2 2 > +probe all rgba 0.0 0.0 0.0 1.0 > + > +clear > +uniform ubo 5 uint 0 20 > +draw rect -1 -1 2 2 > +probe all rgba 0.0 1.0 0.0 1.0 > diff --git a/tests/vulkan/shaders/fs-large-local-array-vec4.vk_shader_test > b/tests/vulkan/shaders/fs-large-local-array-vec4.vk_shader_test > new file mode 100644 > index 0..6239bfee6 > --- /dev/null > +++ b/tests/vulkan/shaders/fs-large-local-array-vec4.vk_shader_test > @@ -0,0 +1,38 @@ > +# Tests a large vec4 local array. > +# Vulkan equivalent to > tests/spec/glsl-1.30/execution/fs-large-local-array-vec4.shader_test > + > +[require] > + > +[vertex shader passthrough] > + > +[fragment shader] > +#version 450 > + > +layout (binding = 5) uniform block { > + uint i; > +}; > + > +layout (location = 0) out vec4 out_color; > + > +void main() > +{ > + vec4 A[130]; > + A[20].g = 0; > + A[i].g = 37; > + A[i].r = 1; > +out_color.rba = vec3(0.0, 0.0, 1.0); > + out_color.g = float(A[20].g == 37); > +} > + > +[test] > +clear color 1.0 0.0 0.0 1.0 > +clear > + > +uniform ubo 5 uint 0 19 > +draw rect -1 -1 2 2 > +probe all rgba 0.0 0.0 0.0 1.0 > + > +clear
[Piglit] [PATCH] vulkan: test cases for large local arrays
Equivalent to the GLSL tests added with the series "Test cases for large GLSL local arrays". Quoting from the cover-letter of that series: "Drivers typically need special handling for local array storage when arrays exceed a certain size, this adds a few test cases for exercising some corner cases that were useful when implementing support for this in the r600g driver." Right now only two of the tests included on this series is passing (local-array and multiple). But all of them were working until the the following commit: * b3c6146925595ec3a7eece3afb9ccaad32906d4c ("nir: Copy propagation between blocks") So it is fact, a regression. More info on https://bugs.freedesktop.org/show_bug.cgi?id=108624 Original GLSL series: https://lists.freedesktop.org/archives/piglit/2017-March/021867.html --- .../fs-large-local-array-vec2.vk_shader_test | 38 + .../fs-large-local-array-vec3.vk_shader_test | 38 + .../fs-large-local-array-vec4.vk_shader_test | 38 + .../shaders/fs-large-local-array.vk_shader_test| 47 ++ .../fs-multiple-large-local-array.vk_shader_test | 40 ++ 5 files changed, 201 insertions(+) create mode 100644 tests/vulkan/shaders/fs-large-local-array-vec2.vk_shader_test create mode 100644 tests/vulkan/shaders/fs-large-local-array-vec3.vk_shader_test create mode 100644 tests/vulkan/shaders/fs-large-local-array-vec4.vk_shader_test create mode 100644 tests/vulkan/shaders/fs-large-local-array.vk_shader_test create mode 100644 tests/vulkan/shaders/fs-multiple-large-local-array.vk_shader_test diff --git a/tests/vulkan/shaders/fs-large-local-array-vec2.vk_shader_test b/tests/vulkan/shaders/fs-large-local-array-vec2.vk_shader_test new file mode 100644 index 0..6fbf71d50 --- /dev/null +++ b/tests/vulkan/shaders/fs-large-local-array-vec2.vk_shader_test @@ -0,0 +1,38 @@ +# Tests a large vec2 local array. +# Vulkan equivalent to tests/spec/glsl-1.30/execution/fs-large-local-array-vec2.shader_test + +[require] + +[vertex shader passthrough] + +[fragment shader] +#version 450 + +layout (binding = 5) uniform block { + uint i; +}; + +layout (location = 0) out vec4 out_color; + +void main() +{ + vec2 A[130]; + A[20].g = 0; + A[i].g = 37; + A[i].r = 1; +out_color.rba = vec3(0.0, 0.0, 1.0); + out_color.g = float(A[20].g == 37); +} + +[test] +clear color 1.0 0.0 0.0 1.0 +clear + +uniform ubo 5 uint 0 19 +draw rect -1 -1 2 2 +probe all rgba 0.0 0.0 0.0 1.0 + +clear +uniform ubo 5 uint 0 20 +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/vulkan/shaders/fs-large-local-array-vec3.vk_shader_test b/tests/vulkan/shaders/fs-large-local-array-vec3.vk_shader_test new file mode 100644 index 0..8c00bc720 --- /dev/null +++ b/tests/vulkan/shaders/fs-large-local-array-vec3.vk_shader_test @@ -0,0 +1,38 @@ +# Tests a large vec3 local array. +# Vulkan equivalent to tests/spec/glsl-1.30/execution/fs-large-local-array-vec3.shader_test + +[require] + +[vertex shader passthrough] + +[fragment shader] +#version 450 + +layout (binding = 5) uniform block { + uint i; +}; + +layout (location = 0) out vec4 out_color; + +void main() +{ + vec3 A[130]; + A[20].g = 0; + A[i].g = 37; + A[i].r = 1; +out_color.rba = vec3(0.0, 0.0, 1.0); + out_color.g = float(A[20].g == 37); +} + +[test] +clear color 1.0 0.0 0.0 1.0 +clear + +uniform ubo 5 uint 0 19 +draw rect -1 -1 2 2 +probe all rgba 0.0 0.0 0.0 1.0 + +clear +uniform ubo 5 uint 0 20 +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/vulkan/shaders/fs-large-local-array-vec4.vk_shader_test b/tests/vulkan/shaders/fs-large-local-array-vec4.vk_shader_test new file mode 100644 index 0..6239bfee6 --- /dev/null +++ b/tests/vulkan/shaders/fs-large-local-array-vec4.vk_shader_test @@ -0,0 +1,38 @@ +# Tests a large vec4 local array. +# Vulkan equivalent to tests/spec/glsl-1.30/execution/fs-large-local-array-vec4.shader_test + +[require] + +[vertex shader passthrough] + +[fragment shader] +#version 450 + +layout (binding = 5) uniform block { + uint i; +}; + +layout (location = 0) out vec4 out_color; + +void main() +{ + vec4 A[130]; + A[20].g = 0; + A[i].g = 37; + A[i].r = 1; +out_color.rba = vec3(0.0, 0.0, 1.0); + out_color.g = float(A[20].g == 37); +} + +[test] +clear color 1.0 0.0 0.0 1.0 +clear + +uniform ubo 5 uint 0 19 +draw rect -1 -1 2 2 +probe all rgba 0.0 0.0 0.0 1.0 + +clear +uniform ubo 5 uint 0 20 +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 diff --git a/tests/vulkan/shaders/fs-large-local-array.vk_shader_test b/tests/vulkan/shaders/fs-large-local-array.vk_shader_test new file mode 100644 index 0..c62109ee1 --- /dev/null +++ b/tests/vulkan/shaders/fs-large-local-array.vk_shader_test @@ -0,0 +1,47 @@ +# Tests a large uint local array. +# Vulkan
[Piglit] [PATCH] khr_debug: fix invalid enum usage on gles3
GL_SAMPLES_PASSED isn't allowed on gles3, so doing a quiery with it isn't going to work. But GL_ANY_SAMPLES_PASSED is allowed, so so let's use that one instead on gles. Signed-off-by: Erik Faye-Lund --- This bug came up while testing this mesa patch-series: https://patchwork.freedesktop.org/series/52169/ tests/spec/khr_debug/debug-object-label.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/spec/khr_debug/debug-object-label.c b/tests/spec/khr_debug/debug-object-label.c index e9617d719..f9c7eac5a 100644 --- a/tests/spec/khr_debug/debug-object-label.c +++ b/tests/spec/khr_debug/debug-object-label.c @@ -236,8 +236,13 @@ test_object_label_types() piglit_get_gl_version() >= 30) { /* Test QUERY */ glGenQueries(1, ); - glBeginQuery(GL_SAMPLES_PASSED, query); - glEndQuery(GL_SAMPLES_PASSED); + if (piglit_is_gles()) { + glBeginQuery(GL_ANY_SAMPLES_PASSED, query); + glEndQuery(GL_ANY_SAMPLES_PASSED); + } else { + glBeginQuery(GL_SAMPLES_PASSED, query); + glEndQuery(GL_SAMPLES_PASSED); + } ObjectLabel(GL_QUERY, query, -1, TestLabel); GetObjectLabel(GL_QUERY, query, TestLabelLen + 1, [QUERY_IDX], label[QUERY_IDX]); -- 2.19.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit