diff options
author | Plamena Manolova <[email protected]> | 2016-12-06 21:32:36 +0200 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2016-12-07 11:01:50 +0000 |
commit | 848138689298c11e7825029484cbaa825cd36b36 (patch) | |
tree | d9b0dceea1225203c985e33d7a68c4d5cf7e366e /src/compiler/glsl/glsl_parser.yy | |
parent | d3931a355fd5d309d5bcfe2655249f029e84d355 (diff) |
mesa: Add GL and GLSL plumbing for ARB_post_depth_coverage for i965 (gen9+).
This extension allows the fragment shader to control whether values in
gl_SampleMaskIn[] reflect the coverage after application of the early
depth and stencil tests.
Signed-off-by: Plamena Manolova <[email protected]>
Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_parser.yy')
-rw-r--r-- | src/compiler/glsl/glsl_parser.yy | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_parser.yy b/src/compiler/glsl/glsl_parser.yy index 0c3781c3361..09b7e79c40b 100644 --- a/src/compiler/glsl/glsl_parser.yy +++ b/src/compiler/glsl/glsl_parser.yy @@ -1392,6 +1392,24 @@ layout_qualifier_id: $$.flags.q.early_fragment_tests = 1; } + + if (!$$.flags.i && + match_layout_qualifier($1, "post_depth_coverage", state) == 0) { + if (state->stage != MESA_SHADER_FRAGMENT) { + _mesa_glsl_error(& @1, state, + "post_depth_coverage layout qualifier only " + "valid in fragment shaders"); + } + + if (state->ARB_post_depth_coverage_enable) { + $$.flags.q.post_depth_coverage = 1; + } else { + _mesa_glsl_error(& @1, state, + "post_depth_coverage layout qualifier present, " + "but the GL_ARB_post_depth_coverage extension " + "is not enabled."); + } + } } /* Layout qualifiers for tessellation evaluation shaders. */ |