<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 27, 2016 at 4:24 PM, Nanley Chery <span dir="ltr"><<a href="mailto:nanleychery@gmail.com" target="_blank">nanleychery@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">On Fri, Jul 22, 2016 at 02:01:37PM -0700, Anuj Phogat wrote:<br>
> V2:  Loosen up the tolerence for sRGB tests. This will allow testing sRGB<br>
>      formats which have known precision issues in astcenc in void extent<br>
>      blocks. See khronos bug#11294 for details.<br>
>      Run each subtest separately in all.py<br>
><br>
> Cc: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
> Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br>
> Acked-by: Ben Widawsky <<a href="mailto:ben@bwidawsk.net">ben@bwidawsk.net</a>><br>
> ---<br>
> Patch is trimmed to keep the size under limit.<br>
> See full patch at: <a href="https://github.com/aphogat/piglit.git" rel="noreferrer" target="_blank">https://github.com/aphogat/piglit.git</a>, branch: review<br>
><br>
>  tests/all.py                                       |   5 +<br>
>  .../khr_texture_compression_astc/CMakeLists.gl.txt |   1 +<br>
>  .../CMakeLists.gles3.txt                           |   1 +<br>
><br>
> diff --git a/tests/all.py b/tests/all.py<br>
> index e2998d0..063453d 100644<br>
> --- a/tests/all.py<br>
> +++ b/tests/all.py<br>
> @@ -4360,6 +4360,11 @@ with profile.group_manager(<br>
>             'miptree-gl {}'.format(subtest))<br>
>          g(['khr_compressed_astc-miptree_gles2', '-subtest', subtest],<br>
>             'miptree-gles {}'.format(subtest))<br>
> +    for subtest in ('hdr', 'ldr', 'srgb'):<br>
> +        g(['khr_compressed_astc-sliced-3d-miptree_gl', '-subtest', subtest],<br>
> +           'sliced-3d-miptree-gl {}'.format(subtest))<br>
> +        g(['khr_compressed_astc-sliced-3d-miptree_gles3', '-subtest', subtest],<br>
> +           'sliced-3d-miptree-gles {}'.format(subtest))<br>
><br>
>  with profile.group_manager(<br>
>           PiglitGLTest,<br>
> diff --git a/tests/spec/khr_texture_compression_astc/CMakeLists.gl.txt b/tests/spec/khr_texture_compression_astc/CMakeLists.gl.txt<br>
> index a70a3ed..089da84 100644<br>
> --- a/tests/spec/khr_texture_compression_astc/CMakeLists.gl.txt<br>
> +++ b/tests/spec/khr_texture_compression_astc/CMakeLists.gl.txt<br>
> @@ -3,6 +3,7 @@ link_libraries (<br>
>  )<br>
><br>
>  piglit_add_executable(khr_compressed_astc-miptree_${piglit_target_api} khr_compressed_astc-miptree.c)<br>
> +piglit_add_executable(khr_compressed_astc-sliced-3d-miptree_${piglit_target_api} khr_compressed_astc-sliced-3d-miptree.c)<br>
>  piglit_add_executable(khr_compressed_astc-array_${piglit_target_api} khr_compressed_astc-miptree-array.c)<br>
>  piglit_add_executable(khr_compressed_astc-basic_${piglit_target_api} khr_compressed_astc-basic.c)<br>
><br>
> diff --git a/tests/spec/khr_texture_compression_astc/CMakeLists.gles3.txt b/tests/spec/khr_texture_compression_astc/CMakeLists.gles3.txt<br>
> index 60147b2..dfc34e5 100644<br>
> --- a/tests/spec/khr_texture_compression_astc/CMakeLists.gles3.txt<br>
> +++ b/tests/spec/khr_texture_compression_astc/CMakeLists.gles3.txt<br>
> @@ -1,4 +1,5 @@<br>
>  link_libraries(piglitutil_${piglit_target_api})<br>
>  piglit_add_executable(khr_compressed_astc-array_${piglit_target_api} khr_compressed_astc-miptree-array.c)<br>
> +piglit_add_executable(khr_compressed_astc-sliced-3d-miptree_${piglit_target_api} khr_compressed_astc-sliced-3d-miptree.c)<br>
><br>
> diff --git a/tests/spec/khr_texture_compression_astc/khr_compressed_astc-sliced-3d-miptree.c b/tests/spec/khr_texture_compression_astc/khr_compressed_astc-sliced-3d-miptree.c<br>
> new file mode 100644<br>
> index 0000000..53f0529<br>
> --- /dev/null<br>
> +++ b/tests/spec/khr_texture_compression_astc/khr_compressed_astc-sliced-3d-miptree.c<br>
> @@ -0,0 +1,409 @@<br>
> +/*<br>
> + * Copyright 2016 Intel Corporation<br>
> + *<br>
> + * Permission is hereby granted, free of charge, to any person obtaining a<br>
> + * copy of this software and associated documentation files (the "Software"),<br>
> + * to deal in the Software without restriction, including without limitation<br>
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,<br>
> + * and/or sell copies of the Software, and to permit persons to whom the<br>
> + * Software is furnished to do so, subject to the following conditions:<br>
> + *<br>
> + * The above copyright notice and this permission notice (including the next<br>
> + * paragraph) shall be included in all copies or substantial portions of the<br>
> + * Software.<br>
> + *<br>
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br>
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br>
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL<br>
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING<br>
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER<br>
> + * DEALINGS IN THE SOFTWARE.<br>
> + */<br>
> +<br>
> +/**<br>
> + * \file<br>
> + * \brief Test texturing from an ASTC miptree of a real image.<br>
> + *<br>
> + * The files under compressed/SLICED3D/{hdr, ldrl, ldrs} contain full miptrees,<br>
> + * in the GL_*_ASTC_* formats, of a sliced 3D texture of waffles and fruit [1].<br>
> + * The base level size was shrunken to 160x106 pixels. The files under the<br>
> + * decompressed/SLICED3D/{hdr, ldrl, ldrs} directory contain the same miptree in<br>
> + * GL_RGBA format. Each miplevel was obtained by decompressing the corresponding<br>
> + * ASTC texture with astcenc [2].<br>
> + *<br>
<br>
</div></div>I think this description should mention the depth of the 3D textures.<br>
<div><div class="gmail-h5"><br>
> + * This test draws miplevels of the compressed textures in a space-efficient<br>
> + * manner. It does the same when drawing the decompressed texture on the right.<br>
> + * Each miplevel of both images are compared for equality after being drawn.<br>
> + *<br>
> + * [1] The reference image is located at:<br>
> + *     <a href="http://people.freedesktop.org/~chadversary/permalink/2012-07-09/1574cff2-d091-4421-a3cf-b56c7943d060.jpg" rel="noreferrer" target="_blank">http://people.freedesktop.org/~chadversary/permalink/2012-07-09/1574cff2-d091-4421-a3cf-b56c7943d060.jpg</a>.<br>
> + * [2] astcenc is the reference ASTC compression tool, available at:<br>
> + *     <a href="http://malideveloper.arm.com/develop-for-mali/tools/software-tools/astc-evaluation-codec/" rel="noreferrer" target="_blank">http://malideveloper.arm.com/develop-for-mali/tools/software-tools/astc-evaluation-codec/</a>.<br>
> + */<br>
> +<br>
> +#include "piglit-util-gl.h"<br>
> +#include "piglit_ktx.h"<br>
> +<br>
> +#define NUM_LEVELS 3<br>
> +#define LEVEL0_WIDTH 160<br>
> +#define LEVEL0_HEIGHT 106<br>
> +#define LEVEL0_DEPTH 8<br>
> +<br>
> +#define NUM_VERTICES 4<br>
> +<br>
> +static GLuint prog;<br>
> +<br>
> +static struct piglit_gl_test_config *piglit_config;<br>
> +<br>
> +enum test_type<br>
> +{<br>
> +     TEST_TYPE_HDR,<br>
> +     TEST_TYPE_LDR,<br>
> +     TEST_TYPE_SRGB,<br>
> +     TEST_TYPE_SRGB_FP,<br>
> +};<br>
<br>
</div></div>Since the srgb-fp test won't be executed, I think we should remove the<br>
enum and related references.<br>
<div><div class="gmail-h5"><br>
> +<br>
> +enum piglit_result<br>
> +test_miptrees(void* input_type);<br>
> +<br>
> +static enum test_type ldr_test  = TEST_TYPE_LDR;<br>
> +static enum test_type hdr_test  = TEST_TYPE_HDR;<br>
> +static enum test_type srgb_test = TEST_TYPE_SRGB;<br>
> +static enum test_type srgb_fp_test = TEST_TYPE_SRGB_FP;<br>
> +static const struct piglit_subtest subtests[] = {<br>
> +     {<br>
> +             "LDR Profile",<br>
> +             "ldr",<br>
> +             test_miptrees,<br>
> +             &ldr_test,<br>
> +     },<br>
> +     {<br>
> +             "HDR Profile",<br>
> +             "hdr",<br>
> +             test_miptrees,<br>
> +             &hdr_test,<br>
> +     },<br>
> +     {<br>
> +             "sRGB decode",<br>
> +             "srgb",<br>
> +             test_miptrees,<br>
> +             &srgb_test,<br>
> +     },<br>
> +     {<br>
> +             "sRGB decode full precision",<br>
> +             "srgb-fp",<br>
> +             test_miptrees,<br>
> +             &srgb_fp_test,<br>
> +     },<br>
> +     {NULL},<br>
> +};<br>
> +<br>
> +PIGLIT_GL_TEST_CONFIG_BEGIN<br>
> +<br>
> +     piglit_config = &config;<br>
> +     config.supports_gl_compat_version = 11;<br>
> +     config.supports_gl_es_version = 30;<br>
> +<br>
> +     config.window_width = 2 * LEVEL0_WIDTH;<br>
> +     config.window_height = LEVEL0_HEIGHT + (LEVEL0_HEIGHT >> 1);<br>
> +     config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;<br>
> +<br>
> +     config.subtests = subtests;<br>
> +<br>
> +PIGLIT_GL_TEST_CONFIG_END<br>
> +<br>
> +/**<br>
> + * The \a filename is relative to the current test's source directory.<br>
> + *<br>
> + * A new texture is created and returned in \a tex_name.<br>
> + */<br>
> +static void<br>
> +load_texture(const char *dir1, const char *dir2,<br>
> +          const char *block_dim_str, GLuint *tex_name)<br>
> +{<br>
> +     struct piglit_ktx *ktx;<br>
> +     const struct piglit_ktx_info *info;<br>
> +     char filepath[4096];<br>
> +     char cur_file[20];<br>
> +     bool ok = true;<br>
> +<br>
> +     /* Generate filename for compressed texture */<br>
> +     snprintf(cur_file, sizeof(cur_file), "waffles-%s.ktx",<br>
> +              block_dim_str);<br>
> +<br>
> +     piglit_join_paths(filepath, sizeof(filepath), 7,<br>
> +                       piglit_source_dir(),<br>
> +                       "tests",<br>
> +                       "spec",<br>
> +                       "khr_texture_compression_astc",<br>
> +                       dir1,<br>
> +                       dir2,<br>
> +                       cur_file);<br>
> +<br>
> +     ktx = piglit_ktx_read_file(filepath);<br>
> +     if (ktx == NULL)<br>
> +             piglit_report_result(PIGLIT_FAIL);<br>
> +<br>
> +     info = piglit_ktx_get_info(ktx);<br>
> +     assert(info->num_miplevels == NUM_LEVELS);<br>
> +     assert(info->target == GL_TEXTURE_3D);<br>
> +     assert(info->pixel_width == LEVEL0_WIDTH);<br>
> +     assert(info->pixel_height == LEVEL0_HEIGHT);<br>
> +<br>
<br>
</div></div>I think we might as well assert the pixel depth here.<br>
<div><div class="gmail-h5"><br>
> +     *tex_name = 0;<br>
> +     ok = piglit_ktx_load_texture(ktx, tex_name, NULL);<br>
> +     if (!ok)<br>
> +             piglit_report_result(PIGLIT_FAIL);<br>
> +<br>
> +     piglit_ktx_destroy(ktx);<br>
> +}<br>
> +<br>
> +/** Compares the compressed texture against the decompressed texture */<br>
> +bool draw_compare_levels(bool check_error,<br>
> +                      GLint level_pixel_size_loc, GLint pixel_offset_loc,<br>
> +                      GLint slice_loc, GLint depth_loc, GLint slice,<br>
> +                      GLuint compressed_tex, GLuint decompressed_tex)<br>
> +{<br>
> +     /* Fully-saturated magenta */<br>
> +     static const float error_color[4] = {1.0, 0.0, 1.0, 1.0};<br>
> +<br>
> +     unsigned y = 0;<br>
> +     unsigned x = 0;<br>
> +     bool pass = true;<br>
> +     int level = 0;<br>
> +<br>
> +     for (; level < NUM_LEVELS; ++level) {<br>
> +             int w = LEVEL0_WIDTH >> level;<br>
> +             int h = LEVEL0_HEIGHT >> level;<br>
> +             int d = LEVEL0_DEPTH >> level;<br>
> +             pass = true;<br>
<br>
</div></div>Setting pass to true here seems dangerous. I can imagine a case in which<br>
level 1 comparison fails, but level 2 passes. An error would be printed,<br>
but the test wouldn't fail.<br>
<div><div class="gmail-h5"><br>
> +             glUniform2f(level_pixel_size_loc, (float) w, (float) h);<br>
> +             glUniform1f(slice_loc, slice);<br>
> +             glUniform1f(depth_loc, d);<br>
> +<br>
> +             /* Draw miplevel of compressed texture. */<br>
> +             glBindTexture(GL_TEXTURE_3D, compressed_tex);<br>
> +             glUniform2f(pixel_offset_loc, x, y);<br>
> +             glDrawArrays(GL_TRIANGLE_FAN, 0, NUM_VERTICES);<br>
> +<br>
> +             /* Draw miplevel of decompressed texture. */<br>
> +             if (!check_error) {<br>
> +                     glBindTexture(GL_TEXTURE_3D, decompressed_tex);<br>
> +                     glUniform2f(pixel_offset_loc, LEVEL0_WIDTH + x, y);<br>
> +                     glDrawArrays(GL_TRIANGLE_FAN, 0, NUM_VERTICES);<br>
> +             }<br>
> +<br>
> +             /* Check the textures (or error-colors) for equivalence. */<br>
> +             if (pass) {<br>
> +                     if (check_error) {<br>
> +                             pass = piglit_probe_rect_rgba(x, y, w, h,<br>
> +                                                           error_color);<br>
> +                     } else {<br>
> +                             pass = piglit_probe_rects_equal(x, y,<br>
> +                                                     LEVEL0_WIDTH + x, y,<br>
> +                                                     w, h, GL_RGBA);<br>
> +                     }<br>
> +<br>
> +                     if (!pass)<br>
> +                             piglit_loge("Slice: %d, Miplevel: %d",<br>
> +                                         slice, level);<br>
> +             }<br>
> +<br>
> +             /* Update the next miplevel arrangement */<br>
> +             if (level == 1)<br>
> +                     x += w;<br>
> +             else<br>
> +                     y += h;<br>
> +     }<br>
> +<br>
> +     /* Delete bound textures */<br>
> +     glDeleteTextures(1, &compressed_tex);<br>
> +     glDeleteTextures(1, &decompressed_tex);<br>
> +<br>
> +     piglit_present_results();<br>
> +     return pass;<br>
> +}<br>
> +<br>
> +enum piglit_result<br>
> +test_miptrees(void* input_type)<br>
> +{<br>
> +     GLint slice_loc, depth_loc, pixel_offset_loc, level_pixel_size_loc;<br>
> +     const enum test_type subtest = *(enum test_type*) input_type;<br>
> +     const bool is_srgb_test = subtest == TEST_TYPE_SRGB;<br>
> +     const bool is_hdr_test  = subtest == TEST_TYPE_HDR;<br>
> +<br>
> +     static const char * tests[4] = {"hdr", "ldrl", "ldrs", "ldrs"};<br>
> +     static const char * block_dim_str[14] = {<br>
> +             "4x4",<br>
> +             "5x4",<br>
> +             "5x5",<br>
> +             "6x5",<br>
> +             "6x6",<br>
> +             "8x5",<br>
> +             "8x6",<br>
> +             "8x8",<br>
> +             "10x5",<br>
> +             "10x6",<br>
> +             "10x8",<br>
> +             "10x10",<br>
> +             "12x10",<br>
> +             "12x12"<br>
> +     };<br>
> +<br>
> +     piglit_require_extension("GL_KHR_texture_compression_astc_ldr");<br>
> +<br>
> +     pixel_offset_loc = glGetUniformLocation(prog, "pixel_offset");<br>
> +     level_pixel_size_loc = glGetUniformLocation(prog, "level_pixel_size");<br>
> +     slice_loc = glGetUniformLocation(prog, "slice");<br>
> +     depth_loc = glGetUniformLocation(prog, "depth");<br>
> +<br>
> +     /*  Check for error color if an LDR-only sys reading an HDR<br>
> +      *  texture. No need to draw a reference mipmap in this case.<br>
> +      */<br>
> +     const bool has_hdr = piglit_is_extension_supported(<br>
> +                             "GL_KHR_texture_compression_astc_hdr");<br>
> +     const bool check_error = is_hdr_test && !has_hdr;<br>
> +     int slice, block_dims = 0;<br>
> +<br>
> +     if (!has_hdr)<br>
> +             piglit_require_extension(<br>
> +                     "GL_KHR_texture_compression_astc_sliced_3d");<br>
> +<br>
> +     if (is_srgb_test)<br>
> +             /* Loosen up the tolerence for sRGB tests. This will allow testing<br>
> +              * sRGB formats which have known precision issues in void extent<br>
> +              * blocks. See khronos bug#11294 for details.<br>
> +              */<br>
> +             piglit_set_tolerance_for_bits(7, 7, 7, 7);<br>
> +     else<br>
> +             piglit_set_tolerance_for_bits(8, 8, 8, 8);<br>
> +<br>
> +     for ( ; block_dims < ARRAY_SIZE(block_dim_str); block_dims++) {<br>
> +             for (slice = 0 ; slice < LEVEL0_DEPTH; slice++) {<br>
<br>
</div></div>I think the slice for loop should be moved further down so that we don't<br>
reload the same textures unnecessarily.<br></blockquote><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">​All your comments are valid. But I've already landed this patch :(.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">So, I'll send out another patch fixing these issues. Some of these</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">comments are also valid for oes_compressed_astc-miptree-3d</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">test. Thanks.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><span style="font-family:arial,sans-serif"> </span><br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
- Nanley<br>
<div><div class="gmail-h5"><br>
> +<br>
> +                     /* Texture objects. */<br>
> +                     GLuint tex_compressed = 0;<br>
> +                     GLuint tex_decompressed = 0;<br>
> +<br>
> +                     /* Load texture for current submode and block size */<br>
> +                     load_texture("compressed/SLICED3D", tests[subtest],<br>
> +                                     block_dim_str[block_dims],<br>
> +                                     &tex_compressed);<br>
> +                     if (!check_error) {<br>
> +                             load_texture("decompressed/SLICED3D",<br>
> +                                          tests[subtest],<br>
> +                                          block_dim_str[block_dims],<br>
> +                                          &tex_decompressed);<br>
> +                     }<br>
> +<br>
> +                     /* Draw and compare each level of the two textures */<br>
> +                     glClear(GL_COLOR_BUFFER_BIT);<br>
> +                     if (!draw_compare_levels(check_error,<br>
> +                                              level_pixel_size_loc,<br>
> +                                              pixel_offset_loc,<br>
> +                                              slice_loc, depth_loc,<br>
> +                                              slice,<br>
> +                                              tex_compressed,<br>
> +                                              tex_decompressed)) {<br>
> +                             piglit_loge("Mode: %s Block: %s.",<br>
> +                                         tests[subtest],<br>
> +                                         block_dim_str[block_dims]);<br>
> +                             return PIGLIT_FAIL;<br>
> +                     }<br>
> +             }<br>
> +             block_dims++;<br>
> +     }<br>
> +     return PIGLIT_PASS;<br>
> +}<br>
> +<br>
> +void<br>
> +piglit_init(int argc, char **argv)<br>
> +{<br>
> +     static const char vs_source[] =<br>
> +             "#version 300 es\n"<br>
> +             "\n"<br>
> +             "uniform vec2 window_pixel_size;\n"<br>
> +             "uniform vec2 level_pixel_size;\n"<br>
> +             "uniform vec2 pixel_offset;\n"<br>
> +             "\n"<br>
> +             "// vertex is some corner of the unit square [0,1]^2 \n"<br>
> +             "in vec2 vertex;\n"<br>
> +             "out vec2 tex_coord;\n"<br>
> +             "\n"<br>
> +             "void main()\n"<br>
> +             "{\n"<br>
> +             "    vec2 pos = vertex;\n"<br>
> +             "    pos *= level_pixel_size;\n"<br>
> +             "    pos += pixel_offset;\n"<br>
> +             "    pos /= 0.5 * window_pixel_size;\n"<br>
> +             "    pos -= vec2(1, 1);\n"<br>
> +             "    gl_Position = vec4(pos.xy, 0.0, 1.0);\n"<br>
> +             "\n"<br>
> +             "    tex_coord = vertex;\n"<br>
> +             "}\n";<br>
> +<br>
> +     static const char fs_source[] =<br>
> +             "#version 300 es\n"<br>
> +             "precision highp float;\n"<br>
> +             "\n"<br>
> +             "uniform highp sampler3D tex;\n"<br>
> +             "uniform float slice;\n"<br>
> +             "uniform float depth;\n"<br>
> +             "in vec2 tex_coord;\n"<br>
> +             "out vec4 fragment_color;\n"<br>
> +             "\n"<br>
> +             "void main()\n"<br>
> +             "{\n"<br>
> +             "    vec4 t = texture(tex, vec3(tex_coord.x, tex_coord.y,\n"<br>
> +             "                     slice / (depth - 1.0)));\n"<br>
> +             "    fragment_color = vec4(t.rgb, 1.0);\n"<br>
> +             "}\n";<br>
> +<br>
> +     /* Vertices to draw a square triangle strip. */<br>
> +     static const GLfloat vertices[2 * NUM_VERTICES] = {<br>
> +             0, 0,<br>
> +             1, 0,<br>
> +             1, 1,<br>
> +             0, 1,<br>
> +     };<br>
> +<br>
> +     GLint vertex_loc;<br>
> +     GLuint vertex_buf;<br>
> +     GLuint vao;<br>
> +<br>
> +     if (!piglit_is_gles())<br>
> +             piglit_require_extension("GL_ARB_ES3_compatibility");<br>
> +<br>
> +     glClearColor(0.9098, 0.8314, 0.7843, 1.0);<br>
> +     glViewport(0, 0, piglit_width, piglit_height);<br>
> +<br>
> +     glGenBuffers(1, &vertex_buf);<br>
> +     glBindBuffer(GL_ARRAY_BUFFER, vertex_buf);<br>
> +<br>
> +     glGenVertexArrays(1, &vao);<br>
> +     glBindVertexArray(vao);<br>
> +<br>
> +     prog = piglit_build_simple_program(vs_source, fs_source);<br>
> +     glReleaseShaderCompiler();<br>
> +     glUseProgram(prog);<br>
> +<br>
> +     vertex_loc = glGetAttribLocation(prog, "vertex");<br>
> +     glEnableVertexAttribArray(vertex_loc);<br>
> +     glVertexAttribPointer(vertex_loc, 2, GL_FLOAT, GL_FALSE, 0, NULL);<br>
> +     glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices,<br>
> +                  GL_STATIC_DRAW);<br>
> +<br>
> +     glUniform1i(glGetUniformLocation(prog, "tex"), 0);<br>
> +     glUniform2f(glGetUniformLocation(prog, "window_pixel_size"),<br>
> +                 piglit_width, piglit_height);<br>
> +}<br>
> +<br>
> +enum piglit_result<br>
> +piglit_display(void)<br>
> +{<br>
> +     return piglit_run_selected_subtests(piglit_config->subtests,<br>
> +                                   piglit_config->selected_subtests,<br>
> +                                   piglit_config->num_selected_subtests,<br>
> +                                   PIGLIT_SKIP);<br>
> +}<br>
> --<br>
> 2.5.5<br>
><br>
</div></div>> _______________________________________________<br>
> Piglit mailing list<br>
> <a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/piglit" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</blockquote></div><br></div></div>