[Mesa-dev] [PATCH 3/4] st/mesa: Add support for ARB_post_depth_coverage
Lyude Paul
lyude at redhat.com
Tue May 23 19:27:48 UTC 2017
On Tue, 2017-05-23 at 15:19 -0400, Ilia Mirkin wrote:
> On Tue, May 23, 2017 at 3:00 PM, Lyude <lyude at redhat.com> wrote:
> > Signed-off-by: Lyude <lyude at redhat.com>
> > ---
> > src/mesa/state_tracker/st_extensions.c | 1 +
> > src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 6 +++++-
> > 2 files changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/mesa/state_tracker/st_extensions.c
> > b/src/mesa/state_tracker/st_extensions.c
> > index f3db702..7674156 100644
> > --- a/src/mesa/state_tracker/st_extensions.c
> > +++ b/src/mesa/state_tracker/st_extensions.c
> > @@ -600,6 +600,7 @@ void st_init_extensions(struct pipe_screen
> > *screen,
> > {
> > o(ARB_occlusion_query2), PIPE_CAP_OCCLUSION_QUERY
> > },
> > {
> > o(ARB_pipeline_statistics_query), PIPE_CAP_QUERY_PIPELINE_STATIS
> > TICS },
> > {
> > o(ARB_point_sprite), PIPE_CAP_POINT_SPRITE
> > },
> > + {
> > o(ARB_post_depth_coverage), PIPE_CAP_POST_DEPTH_COVERAGE
> > },
> > {
> > o(ARB_query_buffer_object), PIPE_CAP_QUERY_BUFFER_OBJECT
> > },
> > { o(ARB_robust_buffer_access_behavior),
> > PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR },
> > {
> > o(ARB_sample_shading), PIPE_CAP_SAMPLE_SHADING
> > },
> > diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> > b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> > index 76cd4dc..e038206 100644
> > --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> > +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> > @@ -6376,9 +6376,13 @@ st_translate_program(
> > }
> >
> > if (procType == PIPE_SHADER_FRAGMENT) {
> > - if (program->shader->Program->info.fs.early_fragment_tests)
> > + if (program->shader->Program->info.fs.early_fragment_tests)
> > {
> > ureg_property(ureg, TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL,
> > 1);
> >
> > + if (program->shader->Program-
> > >info.fs.post_depth_coverage)
> > + ureg_property(ureg,
> > TGSI_PROPERTY_FS_POST_DEPTH_COVERAGE, 1);
>
> From the spec,
>
> "Use of this feature implicitly enables early fragment tests."
>
> However I see nothing that would force early_fragment_tests to be
> enabled when post_depth_coverage is enabled.
Nice catch. I had assumed intel would have already added this into the
GL/GLSL plumbing for this but looking at their commits they never added
anything either...
will fixup for the next rev
>
> > + }
> > +
> > if (proginfo->info.inputs_read & VARYING_BIT_POS) {
> > /* Must do this after setting up t->inputs. */
> > emit_wpos(st_context(ctx), t, proginfo, ureg,
> > --
> > 2.9.4
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
--
Cheers,
Lyude
More information about the mesa-dev
mailing list