On 2 November 2011 02:07, Zhao, Jian J <span dir="ltr">&lt;<a href="mailto:jian.j.zhao@intel.com">jian.j.zhao@intel.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div link="blue" vlink="purple" lang="ZH-CN"><div><p class="MsoNormal"><span style="font-size:10.5pt;color:#1F497D" lang="EN-US">Hi Paul, <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.5pt;color:#1F497D" lang="EN-US">  Thanks for your suggestion.  My answer is inline. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;color:#1F497D" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.5pt;color:#1F497D" lang="EN-US">Best regards<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;color:#1F497D" lang="EN-US">ZhaoJian<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.5pt;color:#1F497D" lang="EN-US"><u></u> <u></u></span></p><div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span style="font-size:10.0pt" lang="EN-US">From:</span></b><span style="font-size:10.0pt" lang="EN-US"> Paul Berry [mailto:<a href="mailto:stereotype441@gmail.com" target="_blank">stereotype441@gmail.com</a>] <br>
<b>Sent:</b> Wednesday, November 02, 2011 12:20 AM<br><b>To:</b> Zhao, Jian J<br><b>Cc:</b> <a href="mailto:piglit@lists.freedesktop.org" target="_blank">piglit@lists.freedesktop.org</a><br><b>Subject:</b> Re: [Piglit] [PATCH] Test case on rendering with only fragment shader but no vertex shader.<u></u><u></u></span></p>
</div></div><div class="im"><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Before I get to specific comments, are you familiar with Piglit&#39;s &quot;shader runner&quot; framework (look at any of the Piglit files that end in &quot;.shader_test&quot;).  It seems like this test could be rewritten as a shader runner test--that would make it shorter and more readable, and save a compilation step.<span style="color:#1F497D"><u></u><u></u></span></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;color:#1F497D" lang="EN-US"><u></u> <u></u></span></p></div><p class="MsoNormal"><span style="font-size:10.5pt;color:#1F497D" lang="EN-US">It’s a good idea. But unfortunately I can’t reproduce it with shader_runner, I have a look and find it is because it uses glDrawArraysInstancedARB instead of glDrawArrays or just simple glBegin and glEnd. I don’t know what is glDrawArraysInstancedARB. What’s it difference from glDrawArrays? So I just updated my original patch file. <u></u><u></u></span></p>
<div class="im"><p class="MsoNormal"><span lang="EN-US"><br></span></p></div></div></div></div></blockquote><div><br>You&#39;re right that it doesn&#39;t make sense to use glDrawArraysInstancedARB--that function is only available if your GL implementation supports the ARB_draw_instanced extension, or GL 3.1, and there&#39;s no good reason to make your test dependent on those.  (If you&#39;re curious, you can find documentation for the extension in <a href="http://www.opengl.org/registry/specs/ARB/draw_instanced.txt">http://www.opengl.org/registry/specs/ARB/draw_instanced.txt</a>.  When the extension was folded into GL 3.1, it was renamed to glDrawArraysInstanced).<br>
<br>But shader_runner only tries to use glDrawArraysInstancedARB if your shader_test file contains the command &quot;draw instanced rect&quot;.  You should be able to do the testing you need by just drawing a simple rectangle using the &quot;draw rect&quot; command, which works on GL 2.1.<br>
<br>For an example of how this sort of test is typically written using shader_runner, see for instance tests/spec/glsl-1.10/execution/fs-inline-notequal.shader_test.<br><br>Thanks very much for your patience with this--I really want to avoid having to add more compiled C programs to piglit if at all possible.<br>
</div></div>