<div dir="ltr"><div><div><div>Hello Brian,<br><br></div>Thanks for the reply. I will clean up the patch making all the recommended corrections and pushing to the mailist.<br><br></div>Regards,<br></div>Juliet<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 28, 2015 at 3:40 PM, Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 08/28/2015 02:43 AM, Juliet Fru wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello Brian,<br>
<br>
<br>
The subject line should probably be something like "port Glean paths<br>
test to piglit".<br>
<br>
<br>
I will add the subject line to the next patch.<br>
<br>
<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>
<br>
<br>
I think you want width=2, height=2 to fill the viewport. Also, we<br>
usually put a space after commas.<br>
<br>
<br>
Could you please give me the sample piglit_draw_rect() call here.<br>
</blockquote>
<br></div></div>
piglit_draw_rect(-1, -1, 2, 2);<span class=""><br>
<br>
<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 ||<br>
pixel[2] != 1.0) {<br>
<br>
<br>
You could use piglit_probe_rect_rgb() here.<br>
<br>
<br>
I was a bit confused with the piglit_probe_rect_rgb() use here. It seems<br>
like I have to create an array to place the expected values to be probed<br>
when I pass the argument arguments for the piglit_draw_rect(). I will<br>
appreciate a simple float array I could pass as the last argument for<br>
piglit_probe_rect_rgb.<br>
</blockquote>
<br></span>
At the top of the function declare:<br>
<br>
static const float white[3] = {1.0, 1.0, 1.0};<br>
<br>
Then,<br>
<br>
if (!piglit_probe_pixel_rgb(4, 4, white)) {<br>
<br>
The original code only read one pixel (I misread it as 4x4 pixels earlier) so piglit_probe_pixel_rgb() is the appropriate replacement.<span class=""><br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Looks like you still have some space indentation, rather than tabs.<br>
<br>
I initially used piglit_probe_rect_rgb, but was a bit confused. So I<br>
reverted to the original, it might have introduced the whitespaces.<br>
Thanks,<br>
Juliet<br>
</blockquote>
<br></span>
You could probably run your code through 'indent' to clean it up. Though, I don't know the proper indent arguments off-hand.<span class="HOEnZb"><font color="#888888"><br>
<br>
-Brian<br>
<br>
</font></span></blockquote></div><br></div>