[Mesa-dev] [PATCH 2/7] mesa: add KHR_no_error support for glUseProgramStages()

Eric Anholt eric at anholt.net
Thu May 4 17:51:15 UTC 2017


Eric Anholt <eric at anholt.net> writes:

> [ Unknown signature status ]
> Timothy Arceri <tarceri at itsqueeze.com> writes:
>
>> ---
>> +void GLAPIENTRY
>> +_mesa_UseProgramStages_no_error(GLuint pipeline, GLbitfield stages,
>> +                                GLuint prog)
>> +{
>> +   GET_CURRENT_CONTEXT(ctx);
>> +
>> +   struct gl_pipeline_object *pipe =
>> +      _mesa_lookup_pipeline_object(ctx, pipeline);
>> +   struct gl_shader_program *shProg = NULL;
>> +
>> +   if (prog)
>> +      _mesa_lookup_shader_program(ctx, prog);
>> +
>> +   /* Object is created by any Pipeline call but glGenProgramPipelines,
>> +    * glIsProgramPipeline and GetProgramPipelineInfoLog
>> +    */
>> +   pipe->EverBound = GL_TRUE;
>> +
>> +   use_program_stages(ctx, shProg, stages, pipe);
>> +}
>
> Does EverBound need to be set before the validation in the other path?
> Wondering if we can just move EverBound setting to use_program_stages().

That said, it fits with the pattern of the other no_error functions in
the file, so either way, patches 1-4 and 6 are:

Reviewed-by: Eric Anholt <eric at anholt.net>

Patch 5 I'm kind of ambivalent -- I like having the compile paths for
debug and non-debug as close as possible, and have compiler
optimizations removing the debug code.  I don't know of a good way to do
that when we have DEBUG #defined or #undef, rather than true or false,
though.

Patch 7, I had the same response to the macro as others.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170504/bbfc9937/attachment.sig>


More information about the mesa-dev mailing list