[Mesa-dev] [PATCH v2 2/5] main: do nothing in the ff fragment shader when using the core profile.
Paul Berry
stereotype441 at gmail.com
Tue Jul 16 11:03:00 PDT 2013
On 15 July 2013 15:50, Ian Romanick <idr at freedesktop.org> wrote:
> On 07/12/2013 06:25 PM, Paul Berry wrote:
>
>> When the core profile is active, there is no fixed function fragment
>> shader functionality. However, we still need to generate a dummy
>> fragment shader program in case the back-end expects it (e.g. to cover
>> the case where GL_RASTERIZER_DISCARD is active and the client hasn't
>> supplied a fragment shader).
>>
>> This patch makes the dummy fragment shader program do nothing when the
>> core profile is active. This will prevent breakages in later patches,
>> when we stop exposing compatibility-only builtin variables in the core
>> profile.
>>
>
> Does this have potential interactions with meta?
Shoot, I bet it does. That's a problem.
In addition, you and Chad brought up some other points in person yesterday,
specifically regarding the questions:
(a) In a core context, is it legal to compile a GLSL 1.30 shader that tries
to use compatibility-only features like gl_FrontColor or ftransform()?
(b) If so, are the results of running that shader well-defined?
Currently in Mesa, the answer to (a) is "yes", and the answer to (b) is
"probably" (while coding, we have assumed that since we don't support
compatibility contexts or the ARB_compatibility extension, so we haven't
thought too carefully about the interaction between OpenGL 3.1+ and
compatibility-only features; so there may well be bugs). My patches would
make the answer to (a) "no" (and then of course (b) becomes irrelevant).
IIRC, you thought that the spec definitively answered (a) with "yes" and
(b) with "no" (which would make current Mesa behaviour correct), but we
weren't able to find any text to back that up.
There were also some concerns that if if the Nvidia or AMD proprietary
drivers answer either (a) or (b) with "yes", then Mesa may need to as well,
to avoid breaking apps. We haven't done any checking to see what those
drivers do.
I don't think I have time to follow up on these questions right now--I'm
too behind on geometry shaders. So unless someone else wants to pick up
the thread, I'll just archive the patches in a branch in the hopes that
we'll have times to address them later.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130716/c94a3dd6/attachment-0001.html>
More information about the mesa-dev
mailing list