[Mesa-dev] GLSL 1.40 and fixed function
idr at freedesktop.org
Tue Apr 17 08:57:13 PDT 2012
On 04/16/2012 12:00 PM, nobled wrote:
> On Mon, Apr 16, 2012 at 1:01 PM, Paul Berry<stereotype441 at gmail.com> wrote:
>> On 16 April 2012 09:44, Ian Romanick<idr at freedesktop.org> wrote:
>>> Here's my new proposal:
>>> * Don't generate a linker error or warning for incomplete programs.
>>> * For draw calls that use incomplete programs, drop the rendering on
>>> the floor and emit a message to the debug log.
> That makes sense as a conservative approach. If it's truly undefined
> behaviour, then emitting INVALID_OPERATION would also be legal. I'm
> surprised that isn't required, since there's already something
> *almost* like that anyway in the standard for *other* conditions that
> make a program non useable--
> "validation is done when the first rendering command is issued,
> to determine if the currently active program object can be executed.
> If it cannot be
> executed then no fragments will be rendered, and the error INVALID_OPERATION
> will be generated."
We generally avoid Begin-time error checks. People rarely check for
them (though GL_ARB_debug changes this a bit), and they add cost in
cases where the programmer hasn't made an error. The error that you've
quoted, IIRC, refers to checking sampler settings. The driver has to do
that check (or make the GPU crash), so generating the error causes no
>> A point of clarification: if the program is incomplete because it lacks a
>> fragment shader, is transform feedback expected to work? My read of the
>> spec is that the phrase "the results of fragment shader execution are
>> undefined" means that transform feedback is still expected to work in this
>> situation. So we need to make sure that we only drop fragments on the
>> floor, not vertices.
> page 71/84 section 2.11.7 "Shader Execution":
> "Undefined behavior results if the program object in use has no fragment shader
> unless transform feedback is enabled, in which case only a vertex shader is re-
More information about the mesa-dev