[Mesa-dev] [PATCH 1/2] spirv: add support for SPV_KHR_post_depth_coverage

Jason Ekstrand jason at jlekstrand.net
Sun Jul 22 21:58:30 UTC 2018


I've added my

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

and pushed the patches.  Thanks, Ilia, for writing them and thanks,
Yunchao, for rebasing them and finding the tests.

--Jason

On Fri, Jul 20, 2018 at 5:16 PM Lionel Landwerlin <
lionel.g.landwerlin at intel.com> wrote:

> Thanks for the changes, this series is :
>
> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
>
> On 20/07/18 22:50, Yunchao He wrote:
> > From: Ilia Mirkin <imirkin at alum.mit.edu>
> >
> > Allow the capability to be exposed, and convert the new execution mode
> > into fs state.
> >
> > Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> > ---
> >   src/compiler/shader_info.h        | 1 +
> >   src/compiler/spirv/spirv_to_nir.c | 9 +++++++++
> >   2 files changed, 10 insertions(+)
> >
> > diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
> > index 3b95d5962c..e9ca222dea 100644
> > --- a/src/compiler/shader_info.h
> > +++ b/src/compiler/shader_info.h
> > @@ -59,6 +59,7 @@ struct spirv_supported_capabilities {
> >      bool stencil_export;
> >      bool atomic_storage;
> >      bool storage_8bit;
> > +   bool post_depth_coverage;
> >   };
> >
> >   typedef struct shader_info {
> > diff --git a/src/compiler/spirv/spirv_to_nir.c
> b/src/compiler/spirv/spirv_to_nir.c
> > index b92197b39b..7ac51a0107 100644
> > --- a/src/compiler/spirv/spirv_to_nir.c
> > +++ b/src/compiler/spirv/spirv_to_nir.c
> > @@ -3542,6 +3542,10 @@ vtn_handle_preamble_instruction(struct
> vtn_builder *b, SpvOp opcode,
> >            spv_check_supported(stencil_export, cap);
> >            break;
> >
> > +      case SpvCapabilitySampleMaskPostDepthCoverage:
> > +         spv_check_supported(post_depth_coverage, cap);
> > +         break;
> > +
> >         default:
> >            vtn_fail("Unhandled capability");
> >         }
> > @@ -3609,6 +3613,11 @@ vtn_handle_execution_mode(struct vtn_builder *b,
> struct vtn_value *entry_point,
> >         b->shader->info.fs.early_fragment_tests = true;
> >         break;
> >
> > +   case SpvExecutionModePostDepthCoverage:
> > +      vtn_assert(b->shader->info.stage == MESA_SHADER_FRAGMENT);
> > +      b->shader->info.fs.post_depth_coverage = true;
> > +      break;
> > +
> >      case SpvExecutionModeInvocations:
> >         vtn_assert(b->shader->info.stage == MESA_SHADER_GEOMETRY);
> >         b->shader->info.gs.invocations = MAX2(1, mode->literals[0]);
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180722/64a38a32/attachment.html>


More information about the mesa-dev mailing list