[Mesa-dev] [PATCH] glsl: don't generate extra errors in ValidateProgramPipeline
Tapani Pälli
tapani.palli at intel.com
Thu Nov 26 04:37:22 PST 2015
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
comment below;
On 11/26/2015 01:01 PM, Timothy Arceri wrote:
> On Thu, 2015-11-26 at 21:50 +1100, Timothy Arceri wrote:
>> From Section 11.1.3.11 (Validation) of the GLES 3.1 spec:
>>
>> "An INVALID_OPERATION error is generated by any command that trans
>> -
>> fers vertices to the GL or launches compute work if the current
>> set
>> of active program objects cannot be executed, for reasons
>> including:"
>>
>> It then goes on to list the rules we validate in the
>> _mesa_validate_program_pipeline() function.
>>
>> For ValidateProgramPipeline the only meantion of generating an error
>> is:
mention
>>
>> "An INVALID_OPERATION error is generated if pipeline is not a name
>> re-
>> turned from a previous call to GenProgramPipelines or if such a
>> name has
>> since been deleted by DeleteProgramPipelines,"
>>
>> Which we handle separately.
>>
>> This fixes:
>> ES31-CTS.sepshaderobjs.PipelineApi
>>
>> No regressions on the eEQP 3.1 tests.
>>
>> Cc: Gregory Hainaut <gregory.hainaut at gmail.com>
>> Cc: Tapani Pälli <tapani.palli at intel.com>
>> ---
>> src/mesa/main/pipelineobj.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/src/mesa/main/pipelineobj.c
>> b/src/mesa/main/pipelineobj.c
>> index 0439129..285fc2f 100644
>> --- a/src/mesa/main/pipelineobj.c
>> +++ b/src/mesa/main/pipelineobj.c
>> @@ -928,8 +928,7 @@ _mesa_ValidateProgramPipeline(GLuint pipeline)
>> return;
>> }
>>
>> - _mesa_validate_program_pipeline(ctx, pipe,
>> - (ctx->_Shader->Name == pipe
>> ->Name));
>
> I'll also add and extra comment here:
>
> /* We pass false for IsBound because we don't want a validation
> * failure to trigger an error.
> */
Maybe it would be good to state something like "ValidateProgramPipeline
should not throw errors when pipeline validation fails but only update
validation status".
It's bad that spec does not state this explicitly, this is quite clear
difference in draw-time vs. ValidateProgramPipeline validation.
>> + _mesa_validate_program_pipeline(ctx, pipe, false);
>>
>> /* Validate inputs against outputs, this cannot be done during
>> linking
>> * since programs have been linked separately from each other.
More information about the mesa-dev
mailing list