[Mesa-dev] [PATCH V2] mesa: validate sampler type across the whole program

Tapani Pälli tapani.palli at intel.com
Fri Apr 21 08:08:26 UTC 2017


On 04/21/2017 10:33 AM, Timothy Arceri wrote:
> 
> 
> On 21/04/17 17:31, Timothy Arceri wrote:
>>
>>
>> On 21/04/17 17:08, Timothy Arceri wrote:
>>> Currently we were only making sure types were the same within a
>>> single stage. This looks to have regressed with 953a0af8e3f73.
>>>
>>> V2: move the SamplersValidated reset into the common linker
>>>      code.
>>>
>>> https://bugs.freedesktop.org/show_bug.cgi?id=97524
>>> Cc: Tapani Pälli <tapani.palli at intel.com>
>>> ---
>>>   src/mesa/main/uniform_query.cpp |  2 ++
>>>   src/mesa/main/uniforms.c        | 26 +++++++++++++++++++++-----
>>>   src/mesa/program/ir_to_mesa.cpp |  5 +++++
>>>   3 files changed, 28 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/src/mesa/main/uniform_query.cpp 
>>> b/src/mesa/main/uniform_query.cpp
>>> index c648832..e400d0e 100644
>>> --- a/src/mesa/main/uniform_query.cpp
>>> +++ b/src/mesa/main/uniform_query.cpp
>>> @@ -965,20 +965,22 @@ _mesa_uniform(GLint location, GLsizei count, 
>>> const GLvoid *values,
>>>         }
>>>      }
>>>      _mesa_propagate_uniforms_to_driver_storage(uni, offset, count);
>>>      /* If the uniform is a sampler, do the extra magic necessary to 
>>> propagate
>>>       * the changes through.
>>>       */
>>>      if (uni->type->is_sampler()) {
>>>         bool flushed = false;
>>> +      shProg->SamplersValidated = GL_TRUE;
>>> +
>>
>> Sorry typo here. Should be:
>>
>>     prog->SamplersValidated = GL_TRUE;
>>
>> Fixed locally.
> 
> Whoops again. Typo was in this code, not the above code:
> 
> 
>  >      if (prog->data->LinkStatus) {
>  > +      /* Reset sampler validated to true, validation happends via the
>  > +       * LinkShader call below.
>  > +       */
>  > +      shProg->SamplersValidated = GL_TRUE;

Yeah, with this;
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

// Tapani


More information about the mesa-dev mailing list