[Mesa-dev] [PATCH] Revert "glsl/es31: precision qualifier doesn't need to match in shader interface block members"
Rob Clark
robdclark at gmail.com
Fri Nov 25 20:19:57 UTC 2016
no worries.. I can keep the reverts locally (it is marginally easier
than rebuilding glmark2 and I only really care until I get far enough
with $new_hw to advertise desktop gl 2.0+.. otherwise I wouldn't be
using glmark2-es)
BR,
-R
On Fri, Nov 25, 2016 at 3:10 PM, Ian Romanick <idr at freedesktop.org> wrote:
> When I have a computer in front of me, I can look it up, but the GLSL ES
> 1.00 spec is quite clear on the topic. There was a bug a couple months ago
> where we discussed this to death.
>
>
>
> On November 25, 2016 9:44:10 AM Rob Clark <robdclark at gmail.com> wrote:
>
>> hmm, that is annoying.. but is it required for gles2 as well? or just
>> glsl 300+ shaders?
>>
>> maybe if CTS wasn't required in gles2 days, that is why ever other
>> driver let it slide..
>>
>> BR,
>> -R
>>
>> On Fri, Nov 25, 2016 at 12:39 PM, Ian Romanick <idr at freedesktop.org>
>> wrote:
>>>
>>> The glmark tests are broken and not our problem. The spec has always
>>> required that precision qualifiers match. This patch is required to pass
>>> conformance. We absolutely cannot revert it.
>>>
>>>
>>>
>>> On November 25, 2016 6:37:47 AM Rob Clark <robdclark at gmail.com> wrote:
>>>
>>>> hmm, actually looks like we need to revert
>>>> 259fc505454ea6a67aeacf6cdebf1398d9947759 ("glsl/linker: Fail linking
>>>> on ES if uniform precision qualifiers don't match") too
>>>>
>>>> On Fri, Nov 25, 2016 at 9:32 AM, Rob Clark <robdclark at gmail.com> wrote:
>>>>>
>>>>>
>>>>> fwiw, issue is that a bunch (all) have "precision mediump float;" in
>>>>> frag shader, and list some uniforms in both frag and vert shader. I'm
>>>>> not a spec lawyer, but pretty sure we should allow that.
>>>>>
>>>>> note that these are all gles2 shaders (not glsl 300 or 310)
>>>>>
>>>>> BR,
>>>>> -R
>>>>>
>>>>> On Fri, Nov 25, 2016 at 9:30 AM, Rob Clark <robdclark at gmail.com> wrote:
>>>>>>
>>>>>>
>>>>>> This breaks a whole bunch of gles2 glmark2 "tests"..
>>>>>>
>>>>>> This reverts commit b50b82b8a553f93b4ee9ace734e4c53d5a388a35.
>>>>>> ---
>>>>>> src/compiler/glsl/link_interface_blocks.cpp | 7 ++-----
>>>>>> src/compiler/glsl/linker.cpp | 10 +---------
>>>>>> 2 files changed, 3 insertions(+), 14 deletions(-)
>>>>>>
>>>>>> diff --git a/src/compiler/glsl/link_interface_blocks.cpp
>>>>>> b/src/compiler/glsl/link_interface_blocks.cpp
>>>>>> index 4e91abc..abcc841 100644
>>>>>> --- a/src/compiler/glsl/link_interface_blocks.cpp
>>>>>> +++ b/src/compiler/glsl/link_interface_blocks.cpp
>>>>>> @@ -112,11 +112,8 @@ intrastage_match(ir_variable *a,
>>>>>> * don't force their types to match. They might mismatch due
>>>>>> to
>>>>>> the two
>>>>>> * shaders using different GLSL versions, and that's ok.
>>>>>> */
>>>>>> - if ((a->data.how_declared != ir_var_declared_implicitly ||
>>>>>> - b->data.how_declared != ir_var_declared_implicitly) &&
>>>>>> - (!prog->IsES || prog->Version != 310 ||
>>>>>> - interstage_member_mismatch(prog, a->get_interface_type(),
>>>>>> - b->get_interface_type())))
>>>>>> + if (a->data.how_declared != ir_var_declared_implicitly ||
>>>>>> + b->data.how_declared != ir_var_declared_implicitly)
>>>>>> return false;
>>>>>> }
>>>>>>
>>>>>> diff --git a/src/compiler/glsl/linker.cpp
>>>>>> b/src/compiler/glsl/linker.cpp
>>>>>> index cc28b26..e925d79 100644
>>>>>> --- a/src/compiler/glsl/linker.cpp
>>>>>> +++ b/src/compiler/glsl/linker.cpp
>>>>>> @@ -1081,15 +1081,7 @@ cross_validate_globals(struct gl_shader_program
>>>>>> *prog,
>>>>>> return;
>>>>>> }
>>>>>>
>>>>>> - /* Only in GLSL ES 3.10, the precision qualifier should not
>>>>>> match
>>>>>> - * between block members defined in matched block names
>>>>>> within
>>>>>> a
>>>>>> - * shader interface.
>>>>>> - *
>>>>>> - * In GLSL ES 3.00 and ES 3.20, precision qualifier for each
>>>>>> block
>>>>>> - * member should match.
>>>>>> - */
>>>>>> - if (prog->IsES && (prog->Version != 310 ||
>>>>>> !var->get_interface_type()) &&
>>>>>> - existing->data.precision != var->data.precision) {
>>>>>> + if (prog->IsES && existing->data.precision !=
>>>>>> var->data.precision) {
>>>>>> linker_error(prog, "declarations for %s `%s` have "
>>>>>> "mismatching precision qualifiers\n",
>>>>>> mode_string(var), var->name);
>>>>>> --
>>>>>> 2.7.4
>>>>>>
>>>
>>>
>
>
More information about the mesa-dev
mailing list