summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorPlamena Manolova <plamena.manolova@intel.com>2016-12-06 21:32:36 +0200
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2016-12-07 11:01:50 +0000
commit848138689298c11e7825029484cbaa825cd36b36 (patch)
treed9b0dceea1225203c985e33d7a68c4d5cf7e366e /src/mesa
parentd3931a355fd5d309d5bcfe2655249f029e84d355 (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 <plamena.manolova@intel.com> Reviewed-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/extensions_table.h1
-rw-r--r--src/mesa/main/mtypes.h2
-rw-r--r--src/mesa/main/shaderapi.c1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index d3ec551282c..f215e0a9715 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -93,6 +93,7 @@ EXT(ARB_pipeline_statistics_query , ARB_pipeline_statistics_query
EXT(ARB_pixel_buffer_object , EXT_pixel_buffer_object , GLL, GLC, x , x , 2004)
EXT(ARB_point_parameters , EXT_point_parameters , GLL, x , x , x , 1997)
EXT(ARB_point_sprite , ARB_point_sprite , GLL, GLC, x , x , 2003)
+EXT(ARB_post_depth_coverage , ARB_post_depth_coverage , x , GLC, x , x, 2015)
EXT(ARB_program_interface_query , dummy_true , GLL, GLC, x , x , 2012)
EXT(ARB_provoking_vertex , EXT_provoking_vertex , GLL, GLC, x , x , 2009)
EXT(ARB_query_buffer_object , ARB_query_buffer_object , GLL, GLC, x , x , 2013)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 459725b029c..0123def07eb 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2174,6 +2174,7 @@ struct gl_shader_info
{
bool uses_gl_fragcoord;
bool redeclares_gl_fragcoord;
+ bool PostDepthCoverage;
bool ARB_fragment_coord_conventions_enable;
/**
@@ -3819,6 +3820,7 @@ struct gl_extensions
GLboolean ARB_occlusion_query2;
GLboolean ARB_pipeline_statistics_query;
GLboolean ARB_point_sprite;
+ GLboolean ARB_post_depth_coverage;
GLboolean ARB_query_buffer_object;
GLboolean ARB_robust_buffer_access_behavior;
GLboolean ARB_sample_shading;
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 92bbc743051..064ec4e1ccb 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -2194,6 +2194,7 @@ _mesa_copy_linked_program_data(const struct gl_shader_program *src,
case MESA_SHADER_FRAGMENT: {
dst->info.fs.depth_layout = src->FragDepthLayout;
dst->info.fs.early_fragment_tests = dst_sh->info.EarlyFragmentTests;
+ dst->info.fs.post_depth_coverage = dst_sh->info.PostDepthCoverage;
break;
}
case MESA_SHADER_COMPUTE: {