[Mesa-dev] [PATCH] glsl: allow conservative depth qualifiers in GLSL 420

Ilia Mirkin imirkin at alum.mit.edu
Wed Apr 6 00:32:08 UTC 2016


On Mon, Apr 4, 2016 at 2:33 PM, Matt Turner <mattst88 at gmail.com> wrote:
> On Sat, Apr 2, 2016 at 6:12 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>> ---
>>
>> Noticed by inspection.
>>
>>  src/compiler/glsl/ast_to_hir.cpp | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
>> index a609ff9..259bec9 100644
>> --- a/src/compiler/glsl/ast_to_hir.cpp
>> +++ b/src/compiler/glsl/ast_to_hir.cpp
>> @@ -3326,6 +3326,7 @@ apply_layout_qualifier_to_variable(const struct ast_type_qualifier *qual,
>>        + qual->flags.q.depth_less
>>        + qual->flags.q.depth_unchanged;
>>     if (depth_layout_count > 0
>> +       && !state->is_version(420, 0)
>>         && !state->AMD_conservative_depth_enable
>>         && !state->ARB_conservative_depth_enable) {
>>         _mesa_glsl_error(loc, state,
>
> There's an error message starting on the next line that should be updated.
>
> I checked around and didn't see any other places that should be
> updated. Looks like 4b15cb6da already handled one, while missing these
> two.

Yeah, I think I was updating that one file rather than doing a scan of
everything. My more recent pass through was of everything.

>
> With the error message updated:

The message currently reads:

       _mesa_glsl_error(loc, state,
                        "extension GL_AMD_conservative_depth or "
                        "GL_ARB_conservative_depth must be enabled "
                        "to use depth layout qualifiers");

Do you have a specific suggestion for alternate wording? I assume you
want to work "or version 420" somewhere in there? I'm happy to put
whatever in and send it out, or you can give it a crack yourself.

>
> Reviewed-by: Matt Turner <mattst88 at gmail.com>

Thanks! As you probably noticed, I had already pushed the patches
before you sent the reviews (Dave gave me a in-irc r-b), so that won't
be making it into the commit message.

  -ilia


More information about the mesa-dev mailing list