[Mesa-dev] [PATCH] glsl: Remove texture built-ins with 'bias' from 1.30 VS profile.

Eric Anholt eric at anholt.net
Wed Nov 9 11:08:21 PST 2011


On Wed, 9 Nov 2011 08:36:52 -0800, Paul Berry <stereotype441 at gmail.com> wrote:
Non-text part: multipart/mixed
Non-text part: multipart/alternative
> On 8 November 2011 10:40, Kenneth Graunke <kenneth at whitecape.org> wrote:
> 
> > From the GLSL 1.30 spec, section 8.7 "Texture Lookup Functions":
> > "In all functions below, the bias parameter is optional for fragment
> >  shaders.  The bias parameter is not accepted in a vertex shader."
> >
> > This was a cut and paste mistake.
> >
> > Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> > ---
> >  src/glsl/builtins/profiles/130.vert |  122
> > +---------------------------------
> >  1 files changed, 4 insertions(+), 118 deletions(-)

> > @@ -749,28 +670,6 @@ uvec4 textureProj(usampler3D sampler, vec4 P, ivec3
> > offset);
> >  float textureProj(sampler1DShadow sampler, vec4 P, int offset);
> >  float textureProj(sampler2DShadow sampler, vec4 P, ivec2 offset);
> >
> > -/* textureProjOffset - bias variants */
> > - vec4 textureProj( sampler1D sampler, vec2 P, int offset, float bias);
> > -ivec4 textureProj(isampler1D sampler, vec2 P, int offset, float bias);
> > -uvec4 textureProj(usampler1D sampler, vec2 P, int offset, float bias);
> > - vec4 textureProj( sampler1D sampler, vec4 P, int offset, float bias);
> > -ivec4 textureProj(isampler1D sampler, vec4 P, int offset, float bias);
> > -uvec4 textureProj(usampler1D sampler, vec4 P, int offset, float bias);
> > -
> > - vec4 textureProj( sampler2D sampler, vec3 P, ivec2 offset, float bias);
> > -ivec4 textureProj(isampler2D sampler, vec3 P, ivec2 offset, float bias);
> > -uvec4 textureProj(usampler2D sampler, vec3 P, ivec2 offset, float bias);
> > - vec4 textureProj( sampler2D sampler, vec4 P, ivec2 offset, float bias);
> > -ivec4 textureProj(isampler2D sampler, vec4 P, ivec2 offset, float bias);
> > -uvec4 textureProj(usampler2D sampler, vec4 P, ivec2 offset, float bias);
> > -
> > - vec4 textureProj( sampler3D sampler, vec4 P, ivec3 offset, float bias);
> > -ivec4 textureProj(isampler3D sampler, vec4 P, ivec3 offset, float bias);
> > -uvec4 textureProj(usampler3D sampler, vec4 P, ivec3 offset, float bias);
> > -
> > -float textureProj(sampler1DShadow sampler, vec4 P, int offset, float
> > bias);
> > -float textureProj(sampler2DShadow sampler, vec4 P, ivec2 offset, float
> > bias);
> > -
> >
> 
> I can't help but notice that in the above section, the comment says
> "textureProjOffset", but the function declarations say "textureProj".  Is
> this a bug?  The GLSL spec clearly calls these functions
> "textureProjOffset".  130.frag seems to have a similar problem.
> 
> (Aside: if this is a bug, it makes me worry that these texture lookup
> functions aren't very well tested in Piglit.  Maybe I should go write a
> bunch of generated tests like I did for operators...)

Something that iterated texture calls over texture targets would be
awesome.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111109/6eaf8966/attachment.pgp>


More information about the mesa-dev mailing list