[Mesa-dev] [PATCH] mesa: expand the fragprog_inputs_read bitfield in ffvertex_prog.c

Brian Paul brianp at vmware.com
Fri Nov 9 13:34:58 PST 2012


On 11/09/2012 10:45 AM, Eric Anholt wrote:
> Brian Paul<brianp at vmware.com>  writes:
>
>> On 11/07/2012 10:18 AM, Eric Anholt wrote:
>>> Brian Paul<brianp at vmware.com>   writes:
>>>
>>>> The glean glsl1 test was failing an assertion because FRAG_ATTRIB_FACE
>>>> (and FRAG_ATTRIB_PNTC) doesn't fit in a 12-bit field.
>>>>
>>>> In the failing case we're using a fragment shader with fixed-function
>>>> vertex processing.
>>>
>>> What about if they have an FS reading generic attribs, and forget to
>>> bind a VS.  Should they still assertion fail?
>>
>> I modified the glean test to also read a 'foo' varying var in the FS
>> and I didn't see a failure.
>
> FRAG_BIT_VAR0 is 1<<16, so I don't see how you got this result if the
> assertion is working like you intend.
>
> The code before was implicitly truncating to the 12 bits it cared about,
> and this assertion seems to just be getting in the way.  If you want to
> explicitly mask to 12 bits to shut up a static analysis tool, or also
> static assert that FRAT_ATTRIB_TEX7<  12 for safety or something, I
> guess that's fine, but the assertion can't just be looking at
> fs->InputsRead, and there's no reason to extend the bitfield to 14 but
> not FRAG_ATTRIB_MAX.

Yeah, for some reason I was thinking the VS needed to see the 
FACE/PNTC bits but it doesn't.  I'll just revert the commit for now.

-Brian


More information about the mesa-dev mailing list