<div dir="ltr">Hello Brian,<br><br><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The subject line should probably be something like "port Glean paths test to piglit".<div><div class="h5"><br>
<br></div></div></blockquote><div>I will add the subject line to the next patch.<br></div><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
+ SCISSOR,<br>
+ STENCIL,<br>
+ STIPPLE,<br>
+ TEXTURE,<br>
+ ZZZ /* end-of-list token */<br>
+};<br>
+<br>
<br>
+<br>
+enum piglit_result<br>
+piglit_display(void)<br>
+{<br>
+ bool pass = true;<br>
+ enum path p, paths[10];<br>
+ int i, num_paths = 0;<br>
+<br>
+ /* draw 10x10 pixel quads */<br>
+ glViewport(0, 0, 10, 10);<br>
+<br>
+ glDisable(GL_DITHER);<br>
+<br>
+ /* Build the list of paths to exercise */<br>
+ for (p = ALPHA; p != ZZZ; p = (enum path) (p + 1)) {<br>
+ paths[num_paths++] = p;<br>
+ }<br>
+<br>
+ /* test always-pass paths */<br>
+ for (i = 0; i < num_paths; i++) {<br>
+ glClear(GL_COLOR_BUFFER_BIT);<br>
+<br>
+ set_path_state(paths[i], ALWAYS_PASS);<br>
+<br>
+ /* draw polygon */<br>
+ piglit_draw_rect(-1,-1,1,1);<br>
</blockquote>
<br></div></div>
I think you want width=2, height=2 to fill the viewport. Also, we usually put a space after commas.<span class=""><br></span></blockquote><div><br></div><div>Could you please give me the sample piglit_draw_rect() call here. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+ set_path_state(paths[i], DISABLE);<br>
+<br>
+ /* test buffer */<br>
+ GLfloat pixel[3];<br>
+ glReadPixels(4, 4, 1, 1, GL_RGB, GL_FLOAT, pixel);<br>
+ if (pixel[0] != 1.0 || pixel[1] != 1.0 || pixel[2] != 1.0) {<br>
</blockquote>
<br></span>
You could use piglit_probe_rect_rgb() here.<br></blockquote><div><br></div><div>I was a bit confused with the piglit_probe_rect_rgb() use here. It seems like I have to create an array to place the expected values to be probed when I pass the argument arguments for the piglit_draw_rect(). I will appreciate a simple float array I could pass as the last argument for piglit_probe_rect_rgb.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Looks like you still have some space indentation, rather than tabs.<br></blockquote><div>I initially used piglit_probe_rect_rgb, but was a bit confused. So I reverted to the original, it might have introduced the whitespaces.<br></div><div> </div>Thanks,<br></div><div class="gmail_quote">Juliet<br></div></div></div>