No subject


Mon Nov 7 10:13:54 PST 2011


 * \bug
 * Locations set via \c glBindFragDataLocation are not currently supported.
 * Only locations assigned automatically by the linker, explicitly set by a
 * layout qualifier, or explicitly set by a built-in variable (e.g., \c
 * gl_FragColor) are supported for fragment shaders.

And from the "Operate in a total of four passes" comment, step 2:

    * 2. Assign locations for inputs that have user-defined (via
    *    glBindVertexAttribLocation) locations.

should be updated to mention glBindFragDataLocation.

Other than those nit-picks, this series is:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>

--00151747c152f51ef004b1297ee3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 4 November 2011 16:40, Ian Romanick <span dir=3D"ltr">&lt;<a href=3D"mai=
lto:idr at freedesktop.org">idr at freedesktop.org</a>&gt;</span> wrote:<br><div =
class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
From: Ian Romanick &lt;<a href=3D"mailto:ian.d.romanick at intel.com">ian.d.ro=
manick at intel.com</a>&gt;<br>
<br>
Fixes piglit&#39;s bindfragdata-link-error.<br>
<br>
Signed-off-by: Ian Romanick &lt;<a href=3D"mailto:ian.d.romanick at intel.com"=
>ian.d.romanick at intel.com</a>&gt;<br>
---<br>
=A0src/glsl/linker.cpp | =A0 =A07 +++++++<br>
=A01 files changed, 7 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp<br>
index 915d5bb..3492045 100644<br>
--- a/src/glsl/linker.cpp<br>
+++ b/src/glsl/linker.cpp<br>
@@ -1381,6 +1381,13 @@ assign_attribute_or_color_locations(gl_shader_progra=
m *prog,<br>
 =A0 =A0 =A0 =A0 =A0 =A0assert(binding &gt;=3D VERT_ATTRIB_GENERIC0);<br>
 =A0 =A0 =A0 =A0 =A0 =A0var-&gt;location =3D binding;<br>
 =A0 =A0 =A0 =A0 }<br>
+ =A0 =A0 =A0} else if (target_index =3D=3D MESA_SHADER_FRAGMENT) {<br>
+ =A0 =A0 =A0 =A0unsigned binding;<br>
+<br>
+ =A0 =A0 =A0 =A0if (prog-&gt;FragDataBindings-&gt;get(binding, var-&gt;nam=
e)) {<br>
+ =A0 =A0 =A0 =A0 =A0 assert(binding &gt;=3D FRAG_RESULT_DATA0);<br>
+ =A0 =A0 =A0 =A0 =A0 var-&gt;location =3D binding;<br>
+ =A0 =A0 =A0 =A0}<br>
 =A0 =A0 =A0 }<br>
<br>
 =A0 =A0 =A0 /* If the variable is not a built-in and has a location static=
ally<br>
<span class=3D"HOEnZb"><font color=3D"#888888">--<br>
1.7.6.4<br>
<br></font></span></blockquote><div><br>There are a few comments in this fu=
nction that could use updating:<br><br>From the doxygen block above the fun=
ction, this should be deleted:<br><br>=A0* \bug<br>=A0* Locations set via \=
c glBindFragDataLocation are not currently supported.<br>
=A0* Only locations assigned automatically by the linker, explicitly set by=
 a<br>=A0* layout qualifier, or explicitly set by a built-in variable (e.g.=
, \c<br>=A0* gl_FragColor) are supported for fragment shaders.<br><br>And f=
rom the &quot;Operate in a total of four passes&quot; comment, step 2:<br>
<br>=A0=A0=A0 * 2. Assign locations for inputs that have user-defined (via<=
br>=A0=A0=A0 *=A0=A0=A0 glBindVertexAttribLocation) locations.<br><br>shoul=
d be updated to mention glBindFragDataLocation.<br><br>Other than those nit=
-picks, this series is:<br>
<br>Reviewed-by: Paul Berry &lt;<a href=3D"mailto:stereotype441 at gmail.com">=
stereotype441 at gmail.com</a>&gt;<br></div></div>

--00151747c152f51ef004b1297ee3--


More information about the mesa-dev mailing list