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_extras.cpp | |
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_extras.cpp')
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 1e0298eb84e..d1fc98dd14e 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -293,6 +293,7 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, this->in_qualifier = new(this) ast_type_qualifier(); this->out_qualifier = new(this) ast_type_qualifier(); this->fs_early_fragment_tests = false; + this->fs_post_depth_coverage = false; this->fs_blend_support = 0; memset(this->atomic_counter_offsets, 0, sizeof(this->atomic_counter_offsets)); @@ -606,6 +607,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { EXT(ARB_fragment_layer_viewport), EXT(ARB_gpu_shader5), EXT(ARB_gpu_shader_fp64), + EXT(ARB_post_depth_coverage), EXT(ARB_sample_shading), EXT(ARB_separate_shader_objects), EXT(ARB_shader_atomic_counter_ops), @@ -1690,6 +1692,7 @@ set_shader_inout_layout(struct gl_shader *shader, assert(!state->fs_pixel_center_integer); assert(!state->fs_origin_upper_left); assert(!state->fs_early_fragment_tests); + assert(!state->fs_post_depth_coverage); } for (unsigned i = 0; i < MAX_FEEDBACK_BUFFERS; i++) { @@ -1810,6 +1813,7 @@ set_shader_inout_layout(struct gl_shader *shader, shader->info.ARB_fragment_coord_conventions_enable = state->ARB_fragment_coord_conventions_enable; shader->info.EarlyFragmentTests = state->fs_early_fragment_tests; + shader->info.PostDepthCoverage = state->fs_post_depth_coverage; shader->info.BlendSupport = state->fs_blend_support; break; |