<div dir="ltr"><div>Both are<br><br></div>Reviewed-by: Chris Forbes <<a href="mailto:chrisf@ijw.co.nz">chrisf@ijw.co.nz</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 2, 2015 at 1:31 PM, Ilia Mirkin <span dir="ltr"><<a href="mailto:imirkin@alum.mit.edu" target="_blank">imirkin@alum.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We bind a GL_R8UI texture, which means that we must use usamplerBuffer.<br>
<br>
Signed-off-by: Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu">imirkin@alum.mit.edu</a>><br>
---<br>
 tests/spec/arb_texture_buffer_range/ranges.c | 22 +++++++++++-----------<br>
 1 file changed, 11 insertions(+), 11 deletions(-)<br>
<br>
diff --git a/tests/spec/arb_texture_buffer_range/ranges.c b/tests/spec/arb_texture_buffer_range/ranges.c<br>
index 92f641e..c37c97a 100644<br>
--- a/tests/spec/arb_texture_buffer_range/ranges.c<br>
+++ b/tests/spec/arb_texture_buffer_range/ranges.c<br>
@@ -52,7 +52,7 @@ GLint vertex_location;<br>
 #define WIN_HEIGHT (TBO_WIDTH / WIN_WIDTH)<br>
<br>
 enum piglit_result<br>
-test_range(GLint offset, GLint size)<br>
+test_range(GLuint offset, GLuint size)<br>
 {<br>
        const float green[4] = { 0, 1, 0, 0 };<br>
<br>
@@ -62,8 +62,8 @@ test_range(GLint offset, GLint size)<br>
        glTexBufferRange(GL_TEXTURE_BUFFER, GL_R8UI, tbo, offset, size);<br>
<br>
        glUniform1i(glGetUniformLocation(prog, "buf"), 0);<br>
-       glUniform1i(glGetUniformLocation(prog, "offset"), offset);<br>
-       glUniform1i(glGetUniformLocation(prog, "size"), size);<br>
+       glUniform1ui(glGetUniformLocation(prog, "offset"), offset);<br>
+       glUniform1ui(glGetUniformLocation(prog, "size"), size);<br>
<br>
        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);<br>
<br>
@@ -135,18 +135,18 @@ static char *vs_source =<br>
<br>
 static char *fs_source =<br>
        "#version 140\n"<br>
-       "#define WIN_WIDTH 32\n"<br>
-       "uniform isamplerBuffer buf;\n"<br>
-       "uniform int offset;\n"<br>
-       "uniform int size;\n"<br>
+       "#define WIN_WIDTH 32u\n"<br>
+       "uniform usamplerBuffer buf;\n"<br>
+       "uniform uint offset;\n"<br>
+       "uniform uint size;\n"<br>
        "\n"<br>
        "void main()\n"<br>
        "{\n"<br>
-       "  int pos = int(gl_FragCoord.x) + int(gl_FragCoord.y) * WIN_WIDTH;\n"<br>
-       "  int expected = ((pos + offset) | 1) & 0xff;\n"<br>
+       "  uint pos = uint(gl_FragCoord.x) + uint(gl_FragCoord.y) * WIN_WIDTH;\n"<br>
+       "  uint expected = ((pos + offset) | 1u) & 0xffu;\n"<br>
        "  if (pos >= size)\n"<br>
-       "    expected = 0;\n"<br>
-       "  float ok = float(texelFetch(buf, pos).r == expected);\n"<br>
+       "    expected = 0u;\n"<br>
+       "  float ok = float(texelFetch(buf, int(pos)).r == expected);\n"<br>
        "  gl_FragColor = vec4(1.0 - ok, ok, 0.0, 0.0);\n"<br>
        "}\n";<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.4.10<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</font></span></blockquote></div><br></div>