<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:st="&#1;" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ZH-CN link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Paul, <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;Thanks for your suggestion. &nbsp;My answer is inline. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>Best regards<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>ZhaoJian<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></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 lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Paul Berry [mailto:stereotype441@gmail.com] <br><b>Sent:</b> Wednesday, November 02, 2011 12:20 AM<br><b>To:</b> Zhao, Jian J<br><b>Cc:</b> piglit@lists.freedesktop.org<br><b>Subject:</b> Re: [Piglit] [PATCH] Test case on rendering with only fragment shader but no vertex shader.<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US>Before I get to specific comments, are you familiar with Piglit's &quot;shader runner&quot; framework (look at any of the Piglit files that end in &quot;.shader_test&quot;).&nbsp; 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'><o:p></o:p></span></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>It&#8217;s a good idea. But unfortunately I can&#8217;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&#8217;t know what is glDrawArraysInstancedARB. What&#8217;s it difference from glDrawArrays? So I just updated my original patch file. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><br><br>Other comments follow...<br><br>On 1 November 2011 03:59, &lt;<a href="mailto:jian.j.zhao@intel.com">jian.j.zhao@intel.com</a>&gt; wrote:<o:p></o:p></span></p><div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal><span lang=EN-US>From: Jian Zhao &lt;<a href="mailto:jian.j.zhao@intel.com">jian.j.zhao@intel.com</a>&gt;<br><br>Per the GL C Specification on glLinkProgram, it should use fixed function pipeline if there is no vertex shader or fragment shader. The spec is as following:<br>&nbsp; &nbsp; &nbsp; &nbsp;&quot;If program contains shader objects<br>&nbsp; &nbsp; &nbsp; &nbsp;of type GL_VERTEX_SHADER but does not<br>&nbsp; &nbsp; &nbsp; &nbsp;contain shader objects of type<br>&nbsp; &nbsp; &nbsp; &nbsp;GL_FRAGMENT_SHADER, the vertex shader will<br>&nbsp; &nbsp; &nbsp; &nbsp;be linked against the implicit interface for fixed functionality<br>&nbsp; &nbsp; &nbsp; &nbsp;fragment processing. Similarly, if<br>&nbsp; &nbsp; &nbsp; &nbsp;program contains shader objects of type<br>&nbsp; &nbsp; &nbsp; &nbsp;GL_FRAGMENT_SHADER but it does not contain<br>&nbsp; &nbsp; &nbsp; &nbsp;shader objects of type GL_VERTEX_SHADER,<br>&nbsp; &nbsp; &nbsp; &nbsp;the fragment shader will be linked against the implicit<br>&nbsp; &nbsp; &nbsp; &nbsp;interface for fixed functionality vertex processing.&quot;<o:p></o:p></span></p></blockquote><div><p class=MsoNormal><span lang=EN-US><br>When quoting from the spec, can you site the particular version of the GL spec that you're quoting, and the section number you're quoting from?&nbsp; That will make it easier to figure out what went wrong if this test ever fails.<br>&nbsp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>I quoted this from OpenGL2.1 Reference Page on glLinkProgram at <a href="http://www.opengl.org/sdk/docs/man/">http://www.opengl.org/sdk/docs/man/</a> I will add it. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal><span lang=EN-US>---<br>&nbsp;tests/shaders/CMakeLists.gl.txt &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp;1 +<br>&nbsp;tests/shaders/glsl-no-vertex-shader-compiled.c | &nbsp;165 ++++++++++++++++++++++++<br>&nbsp;2 files changed, 166 insertions(+), 0 deletions(-)<br>&nbsp;create mode 100644 tests/shaders/glsl-no-vertex-shader-compiled.c<br><br>diff --git a/tests/shaders/CMakeLists.gl.txt b/tests/shaders/CMakeLists.gl.txt<br>index 3dce256..d009395 100644<br>--- a/tests/shaders/CMakeLists.gl.txt<br>+++ b/tests/shaders/CMakeLists.gl.txt<br>@@ -28,6 +28,7 @@ add_executable (fp-condition_codes-01 fp-condition_codes-01.c)<br>&nbsp;add_executable (fp-lit-mask fp-lit-mask.c)<br>&nbsp;add_executable (fp-lit-src-equals-dst fp-lit-src-equals-dst.c)<br>&nbsp;add_executable (fp-fog fp-fog.c)<br>+add_executable (glsl-no-vertex-shader-compiled glsl-no-vertex-shader-compiled.c)<br>&nbsp;add_executable (fp-formats fp-formats.c)<br>&nbsp;add_executable (fp-fragment-position fp-fragment-position.c)<br>&nbsp;add_executable (fp-generic fp-generic.c)<br>diff --git a/tests/shaders/glsl-no-vertex-shader-compiled.c b/tests/shaders/glsl-no-vertex-shader-compiled.c<br>new file mode 100644<br>index 0000000..0f90f6b<br>--- /dev/null<br>+++ b/tests/shaders/glsl-no-vertex-shader-compiled.c<br>@@ -0,0 +1,165 @@<br>+/*<br>+ * Copyright &copy; 2011 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 &quot;Software&quot;),<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 &quot;AS IS&quot;, 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. &nbsp;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 DEALINGS<br>+ * IN THE SOFTWARE.<br>+ *<br>+ * Authors:<br>+ * &nbsp; &nbsp;Jian Zhao &lt;<a href="mailto:jian.j.zhao@intel.com">jian.j.zhao@intel.com</a>&gt;<br>+ *<br>+ */<br>+<br>+/** @file glsl-no-vertex-shader-compiled.c<br>+ *<br>+ * Tests that OpenGL shader should work well when only have fragment shader(or vertext shader), but now if without vertext shader it doesn't work.<br>+ &nbsp; In the OpenGL spec for glLinkProgram, as following says:<br>+ &nbsp; &quot;If program contains shader objects<br>+ &nbsp; &nbsp; &nbsp; of type GL_VERTEX_SHADER but does not<br>+ &nbsp; &nbsp; &nbsp; contain shader objects of type<br>+ &nbsp; &nbsp; &nbsp; GL_FRAGMENT_SHADER, the vertex shader will<br>+ &nbsp; &nbsp; &nbsp; be linked against the implicit interface for fixed functionality<br>+ &nbsp; &nbsp; &nbsp; fragment processing. Similarly, if<br>+ &nbsp; &nbsp; &nbsp; program contains shader objects of type<br>+ &nbsp; &nbsp; &nbsp; GL_FRAGMENT_SHADER but it does not contain<br>+ &nbsp; &nbsp; &nbsp; shader objects of type GL_VERTEX_SHADER,<br>+ &nbsp; &nbsp; &nbsp; the fragment shader will be linked against the implicit<br>+ &nbsp; &nbsp; &nbsp; interface for fixed functionality vertex processing.&quot;<br>+ *<br>+ */<br>+<br>+#include &quot;piglit-util.h&quot;<br>+#include &quot;piglit-framework.h&quot;<br>+<br>+int piglit_width = 100, piglit_height = 100;<br>+int piglit_window_mode = GLUT_RGBA | GLUT_DOUBLE;<br>+<br>+static GLint prog;<br>+<br>+static const char fs_vector_template[] =<br>+&quot;#version 120\n&quot;<br>+&quot;void myfunc2(void); \n&quot;<br>+&quot;void myfunc3(void); \n&quot;<br>+&quot;void main() \n&quot;<br>+&quot;{ \n&quot;<br>+&quot; &nbsp; &nbsp;gl_FragColor = gl_Color; \n&quot;<br>+&quot; &nbsp; &nbsp;myfunc2(); \n&quot;<br>+&quot;} \n&quot;<br>+&quot;void myfunc2(void) \n&quot;<br>+&quot;{ \n&quot;<br>+&quot; &nbsp; &nbsp; gl_FragColor = vec4(0.2,0.2,0.2, 1.0); \n&quot;<br>+&quot; &nbsp; &nbsp; myfunc3(); \n&quot;<br>+&quot;} \n&quot;<br>+&quot;void myfunc3(void) \n&quot;<br>+&quot;{ \n&quot;<br>+&quot; &nbsp; &nbsp; gl_FragColor = vec4(0.2,0.8,0.2,1.0); \n&quot;<br>+&quot;} \n&quot;;<br>+<o:p></o:p></span></p></blockquote><div><p class=MsoNormal><span lang=EN-US><br>Are you trying to test something about the behavior of function calls here?&nbsp; If so, that should be split into its own test, with a comment explaining what you're trying to accomplish.&nbsp; If not, we should use the simplest possible fragment shader that allows us to test what we're trying to test, e.g.:<br><br>void main()<br>{<br>&nbsp; gl_FragColor = vec4(0.2, 0.8, 0.2, 1.0);<br>} <br>&nbsp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>Yes. You are right! I will trim it down and send a new version. Thanks very much! <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US>+<br>+enum piglit_result<br>+piglit_display(void)<br>+{<br>+ &nbsp; &nbsp; &nbsp; GLboolean result = PIGLIT_PASS;<br>+ &nbsp; &nbsp; &nbsp; GLfloat expectedColor[4] = {0.2, 0.8, 0.2, 1.0};<br>+<br>+ &nbsp; &nbsp; &nbsp; glClearColor(1.0, 0.1, 0.1, 0.0);<br>+ &nbsp; &nbsp; &nbsp; glClear(GL_COLOR_BUFFER_BIT );<br>+<br>+ &nbsp; &nbsp; &nbsp; glColor4f(0.0, 1.0, 0.0, 0.0);<br>+ &nbsp; &nbsp; &nbsp; glBegin(GL_QUADS);<br>+ &nbsp; &nbsp; &nbsp; glVertex3f(0.0, 0.0, 0.0);<br>+ &nbsp; &nbsp; &nbsp; glVertex3f(0.5, 0.0, 0.0);<br>+ &nbsp; &nbsp; &nbsp; glVertex3f(0.5, 0.5, 0.0);<br>+ &nbsp; &nbsp; &nbsp; glVertex3f(0.0, 0.5, 0.0);<br>+ &nbsp; &nbsp; &nbsp; glEnd();<br>+<br>+ &nbsp; &nbsp; &nbsp; result = piglit_probe_pixel_rgba(piglit_width /2, piglit_height / 2,<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expectedColor) ? PIGLIT_PASS : PIGLIT_FAIL;<br>+ &nbsp; &nbsp; &nbsp; glutSwapBuffers();<br>+<br>+ &nbsp; &nbsp; &nbsp; return result;<br>+}<br>+<br>+static GLuint compile_shader(GLenum shaderType, const char * text)<br>+{<br>+ &nbsp; &nbsp; &nbsp; &nbsp;GLuint shader;<br>+ &nbsp; &nbsp; &nbsp; &nbsp;GLint status;<br>+<br>+ &nbsp; &nbsp; &nbsp; &nbsp;shader = glCreateShaderObjectARB(shaderType);<br>+ &nbsp; &nbsp; &nbsp; &nbsp;glShaderSourceARB(shader, 1, (const GLchar **)&amp;text, NULL);<br>+ &nbsp; &nbsp; &nbsp; &nbsp;glCompileShaderARB(shader);<br>+<br>+ &nbsp; &nbsp; &nbsp; &nbsp;glGetObjectParameterivARB(shader, GL_OBJECT_COMPILE_STATUS_ARB, &amp;status);<br>+ &nbsp; &nbsp; &nbsp; if (!status) {<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GLchar log[1000];<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GLsizei len;<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;glGetInfoLogARB(shader, 1000, &amp;len, log);<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fprintf(stderr, &quot;Error: problem compiling shader: %s\n&quot;, log);<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;piglit_report_result(PIGLIT_FAIL);<br>+ &nbsp; &nbsp; &nbsp; &nbsp;}<br>+<br>+ &nbsp; &nbsp; &nbsp; &nbsp;return shader;<br>+}<br>+<br>+static GLuint link_program(GLuint fs)<br>+{<br>+ &nbsp; &nbsp; &nbsp; &nbsp;GLuint program;<br>+ &nbsp; &nbsp; &nbsp; &nbsp;GLint status;<br>+<br>+ &nbsp; &nbsp; &nbsp; &nbsp;program = glCreateProgramObjectARB();<br>+<br>+ &nbsp; &nbsp; &nbsp; &nbsp;if (fs)<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;glAttachObjectARB(program, fs);<br>+<br>+ &nbsp; &nbsp; &nbsp; &nbsp;glLinkProgramARB(program);<br>+ &nbsp; &nbsp; &nbsp; &nbsp;glGetObjectParameterivARB(program, GL_OBJECT_LINK_STATUS_ARB, &amp;status);<br>+ &nbsp; &nbsp; &nbsp; &nbsp;if (!status) {<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GLchar log[1000];<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GLsizei len;<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;glGetInfoLogARB(program, 1000, &amp;len, log);<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fprintf(stderr, &quot;Error: problem linking program: %s\n&quot;, log);<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;piglit_report_result(PIGLIT_FAIL);<br>+ &nbsp; &nbsp; &nbsp; &nbsp;}<br>+<br>+ &nbsp; &nbsp; &nbsp; &nbsp;return program;<br>+}<br>+<br>+void<br>+piglit_init(int argc, char **argv)<br>+{<br>+ &nbsp; &nbsp; &nbsp; GLint fs;<br>+ &nbsp; &nbsp; &nbsp; char *fs_buffer;<br>+<br>+ &nbsp; &nbsp; &nbsp; if (!GLEW_VERSION_2_0 || !GLEW_ARB_shader_objects || !GLEW_ARB_vertex_shader || !GLEW_ARB_fragment_shader) {<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printf(&quot;Requires ARB_shader_objects and ARB_{vertex,fragment}_shader\n&quot;);<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;piglit_report_result(PIGLIT_SKIP);<br>+ &nbsp; &nbsp; &nbsp; &nbsp;}<br>+<br>+ &nbsp; &nbsp; &nbsp; piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);<br>+<br>+ &nbsp; &nbsp; &nbsp; fs_buffer = (char *) malloc(sizeof(char) * (strlen(fs_vector_template)+1));<br>+ &nbsp; &nbsp; &nbsp; strcpy(fs_buffer, fs_vector_template);<br>+ &nbsp; &nbsp; &nbsp; fs = compile_shader(GL_FRAGMENT_SHADER_ARB, fs_buffer);<br>+<br>+ &nbsp; &nbsp; &nbsp; prog = link_program(fs);<br>+<br>+ &nbsp; &nbsp; &nbsp; glUseProgramObjectARB(prog);<br>+<br>+ &nbsp; &nbsp; &nbsp; if(fs_buffer)<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; free(fs_buffer);<br>+}<br><span style='color:#888888'>--<br>1.7.0.1<br><br></span><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" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><o:p></o:p></span></p></blockquote></div><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p></div></div></body></html>