Re: [Piglit] [PATCH] arb_copy_image: if formats different, make sure they can be reinterpreted
On 10/28/2015 12:55 PM, Ilia Mirkin wrote: This prevents the test from trying to copy compressed formats to depth textures and vice-versa. Signed-off-by: Ilia Mirkin --- tests/spec/arb_copy_image/formats.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/spec/arb_copy_image/formats.c b/tests/spec/arb_copy_image/formats.c index 8aa3658..a4c027e 100644 --- a/tests/spec/arb_copy_image/formats.c +++ b/tests/spec/arb_copy_image/formats.c @@ -273,6 +273,9 @@ are_formats_compatible(struct texture_format *f1, struct texture_format *f2) if (f1 == f2) return true; + if (!f1->can_be_reinterpreted || !f2->can_be_reinterpreted) + return false; + if (is_format_compressed(f1)) { if (is_format_compressed(f2)) /* Compressed-to-compressed copies are not supported */ @@ -282,8 +285,7 @@ are_formats_compatible(struct texture_format *f1, struct texture_format *f2) } else if (is_format_compressed(f2)) { return f1->bytes == f2->bytes; } else { - return f1->can_be_reinterpreted && f2->can_be_reinterpreted && - f1->bytes == f2->bytes; + return f1->bytes == f2->bytes; } } Looks good to me. Plus, it allows llvmpipe to pass with my arb_copy_image changes. -Brian ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] khr_texture_compression_astc: Enable subtest reports
From: Nanley Chery Enable Piglit to report the result of each individual subtest for the array and miptree ASTC tests. Modify the miptree test to only run one subset of ASTC formats at a time. v2. Modify miptree test to only check the given subtest. Use the -subtest option to run a specific subtest. Signed-off-by: Nanley Chery --- tests/all.py | 12 ++- .../khr_compressed_astc-miptree.c | 90 +- 2 files changed, 45 insertions(+), 57 deletions(-) diff --git a/tests/all.py b/tests/all.py index 82e6311..c63cf15 100644 --- a/tests/all.py +++ b/tests/all.py @@ -4182,12 +4182,16 @@ with profile.group_manager( PiglitGLTest, grouptools.join('spec', 'khr_texture_compression_astc')) as g: g(['arb_texture_compression-invalid-formats', 'astc'], 'invalid formats') -g(['khr_compressed_astc-array_gl'], 'array-gl') -g(['khr_compressed_astc-array_gles3'], 'array-gles') g(['khr_compressed_astc-basic_gl'], 'basic-gl') g(['khr_compressed_astc-basic_gles2'], 'basic-gles') -g(['khr_compressed_astc-miptree_gl'], 'miptree-gl') -g(['khr_compressed_astc-miptree_gles2'], 'miptree-gles') + +for subtest in ('odd', 'even'): +g(['khr_compressed_astc-array_gl', '-subtest', subtest]) +g(['khr_compressed_astc-array_gles3', '-subtest', subtest]) + +for subtest in ('ldr', 'srgb', 'hdr'): +g(['khr_compressed_astc-miptree_gl', '-subtest', subtest]) +g(['khr_compressed_astc-miptree_gles2', '-subtest', subtest]) with profile.group_manager( PiglitGLTest, diff --git a/tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c b/tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c index 20f2415..20d1c79 100644 --- a/tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c +++ b/tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c @@ -222,10 +222,9 @@ bool draw_compare_levels(bool check_error, bool check_srgb, enum piglit_result test_miptrees(void* input_type) { - int subtest = 0; - enum test_type * type = (enum test_type*) input_type; - bool is_srgb_test = *type == TEST_TYPE_SRGB; - bool is_hdr_test = *type == TEST_TYPE_HDR; + const enum test_type subtest = *(enum test_type*) input_type; + const bool is_srgb_test = subtest == TEST_TYPE_SRGB; + const bool is_hdr_test = subtest == TEST_TYPE_HDR; static const char * tests[3] = {"hdr", "ldrl", "ldrs"}; static const char * block_dim_str[14] = { @@ -245,62 +244,47 @@ test_miptrees(void* input_type) "12x12" }; - bool has_hdr = piglit_is_extension_supported( - "GL_KHR_texture_compression_astc_hdr"); - - /* If testing sRGB mode, fast-forward to the srgb test. */ - if (is_srgb_test) { - subtest = TEST_TYPE_SRGB; - } else { - /* Skip if on an HDR system not running the HDR test -* or if on an LDR system running the HDR test. -*/ - if (has_hdr != is_hdr_test) - return PIGLIT_SKIP; + if (!is_srgb_test) piglit_require_extension("GL_EXT_texture_sRGB_decode"); - } - GLint pixel_offset_loc = glGetUniformLocation(prog, "pixel_offset"); GLint level_pixel_size_loc = glGetUniformLocation(prog, "level_pixel_size"); - /* Test each submode */ - for (; subtest < ARRAY_SIZE(tests); ++subtest) { - - /* Check for error color if an LDR-only sys reading an HDR -* texture. No need to draw a reference mipmap in this case. -*/ - int check_error = !has_hdr && subtest == TEST_TYPE_HDR; - int block_dims = 0; - for (; block_dims < ARRAY_SIZE(block_dim_str); ++block_dims) { - - /* Texture objects. */ - GLuint tex_compressed; - GLuint tex_decompressed; - - /* Load texture for current submode and block size */ - load_texture("compressed", tests[subtest], - block_dim_str[block_dims], - &tex_compressed); - if (!check_error) { - load_texture("decompressed", tests[subtest], - block_dim_str[block_dims], - &tex_decompressed); - } + /* Check for error color if an LDR-only sys reading an HDR +* texture. No need to draw a reference mipmap in this case. +*/ + const bool has_hdr = piglit_is_extension_supported( + "GL_KHR_texture_compression_astc_hdr"); + const int check_error
Re: [Piglit] [PATCH] framework: resmove es3conform support
On 27 October 2015 at 22:38, wrote: > From: Dylan Baker > > This is the old Khronos suite, which has been superseded by CTS. Since > piglit can wrap cts it seems rather silly to have both CTS and > es3conform support. > > cc: Eric Anholt > Signed-off-by: Dylan Baker > --- > > Eric, I thought I'd ping you to see if you still needed this. If it's > still useful just let me know and I'll drop this, but I just wanted to > make sure we weren't carrying it around when CTS was sufficient. > In case there's no objection: - s/resmove/remove/ in the commit title - framework/tests/test_lists.py contains a reference to es3conform. While in there, the comment has typos -> s/piiglit/piglit/ and s/oglconfrom/oglconform/ -Emil ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] arb_copy_image: if formats different, make sure they can be reinterpreted
This prevents the test from trying to copy compressed formats to depth textures and vice-versa. Signed-off-by: Ilia Mirkin --- tests/spec/arb_copy_image/formats.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/spec/arb_copy_image/formats.c b/tests/spec/arb_copy_image/formats.c index 8aa3658..a4c027e 100644 --- a/tests/spec/arb_copy_image/formats.c +++ b/tests/spec/arb_copy_image/formats.c @@ -273,6 +273,9 @@ are_formats_compatible(struct texture_format *f1, struct texture_format *f2) if (f1 == f2) return true; + if (!f1->can_be_reinterpreted || !f2->can_be_reinterpreted) + return false; + if (is_format_compressed(f1)) { if (is_format_compressed(f2)) /* Compressed-to-compressed copies are not supported */ @@ -282,8 +285,7 @@ are_formats_compatible(struct texture_format *f1, struct texture_format *f2) } else if (is_format_compressed(f2)) { return f1->bytes == f2->bytes; } else { - return f1->can_be_reinterpreted && f2->can_be_reinterpreted && - f1->bytes == f2->bytes; + return f1->bytes == f2->bytes; } } -- 2.4.10 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] arb_texture_view: Check source tex in failure
While debugging a problem on gen8, I added this code to verify the contents of the 2d texture array in order to narrow down the failure. It seemed useful and worth keeping to me. Cc: Glenn Kennard Signed-off-by: Ben Widawsky --- .../sampling-2d-array-as-2d-layer.c| 29 +- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/tests/spec/arb_texture_view/sampling-2d-array-as-2d-layer.c b/tests/spec/arb_texture_view/sampling-2d-array-as-2d-layer.c index 8189044..7a741e5 100644 --- a/tests/spec/arb_texture_view/sampling-2d-array-as-2d-layer.c +++ b/tests/spec/arb_texture_view/sampling-2d-array-as-2d-layer.c @@ -122,7 +122,34 @@ test_single_layer(const Params* p, int layer) pass = piglit_probe_rect_rgba(0, 0, piglit_width, piglit_height, green); if (!pass) { - printf("layer %d failed\n", layer); + GLenum status; + GLuint temp_fbo; + + glClearColor(0, 0, 1, 1); + glClear(GL_COLOR_BUFFER_BIT); + + glGenFramebuffers(1, &temp_fbo); + glBindFramebuffer(GL_FRAMEBUFFER, temp_fbo); + glFramebufferTextureLayer(GL_FRAMEBUFFER, + GL_COLOR_ATTACHMENT0, + tex_src, 0, layer); + status = glCheckFramebufferStatus(GL_FRAMEBUFFER); + if (status != GL_FRAMEBUFFER_COMPLETE) { + printf("Framebuffer Status: %s\n", + piglit_get_gl_enum_name(status)); + } + + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo); + glBindFramebuffer(GL_READ_FRAMEBUFFER, temp_fbo); + glBlitFramebuffer(0, 0, p->width, p->height, + 0, 0, piglit_width, piglit_height, + GL_COLOR_BUFFER_BIT, GL_NEAREST); + + printf("layer %d failed. Source image was %s\n", + layer, piglit_probe_pixel_rgba(0, 0, green) ? + "correct" : "incorrect"); + + glDeleteFramebuffers(1, &temp_fbo); } glDeleteTextures(1, &tex_view); -- 2.6.1 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit