[Mesa-dev] [PATCH 1/3] anv/gen8: Stall when needed in Cmd(Set|Reset)Event

Jason Ekstrand jason at jlekstrand.net
Fri Nov 4 04:03:43 UTC 2016


On Thu, Nov 3, 2016 at 10:42 AM, Chad Versace <chadversary at chromium.org>
wrote:

> On Wed 02 Nov 2016, Jason Ekstrand wrote:
> > ---
> >  src/intel/vulkan/gen8_cmd_buffer.c | 29 +++++++++++++++++++++++++++++
> >  1 file changed, 29 insertions(+)
> >
> > diff --git a/src/intel/vulkan/gen8_cmd_buffer.c
> b/src/intel/vulkan/gen8_cmd_buffer.c
> > index 0548a5e..5df2e50 100644
> > --- a/src/intel/vulkan/gen8_cmd_buffer.c
> > +++ b/src/intel/vulkan/gen8_cmd_buffer.c
> > @@ -513,6 +513,25 @@ genX(cmd_buffer_emit_hz_op)(struct anv_cmd_buffer
> *cmd_buffer,
> >     }
> >  }
> >
> > +/* Set of stage bits for which are pipelined, i.e. they get queued by
> the
> > + * command streamer for later execution.
> > + */
> > +#define PIPELINE_STAGE_PIPELINED_BITS \
>
> Small nit. Please prefix this with ANV_. Otherwise, where it's used
> below, it looks like a genxml-defined token instead of an anvil-defined
> token.
>

Done.


> > +   (VK_PIPELINE_STAGE_VERTEX_INPUT_BIT | \
> > +    VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | \
> > +    VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT | \
> > +    VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT | \
> > +    VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT | \
> > +    VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | \
> > +    VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | \
> > +    VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT | \
> > +    VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | \
> > +    VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT | \
> > +    VK_PIPELINE_STAGE_TRANSFER_BIT | \
> > +    VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT | \
> > +    VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT | \
> > +    VK_PIPELINE_STAGE_ALL_COMMANDS_BIT)
> > +
> >  void genX(CmdSetEvent)(
> >      VkCommandBuffer                             commandBuffer,
> >      VkEvent                                     _event,
> > @@ -522,6 +541,11 @@ void genX(CmdSetEvent)(
> >     ANV_FROM_HANDLE(anv_event, event, _event);
> >
> >     anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) {
> > +      if (stageMask & PIPELINE_STAGE_PIPELINED_BITS) {
> > +         pc.StallAtPixelScoreboard = true;
> > +         pc.CommandStreamerStallEnable = true;
> > +      }
> > +
> >        pc.DestinationAddressType  = DAT_PPGTT,
> >        pc.PostSyncOperation       = WriteImmediateData,
> >        pc.Address = (struct anv_address) {
> > @@ -541,6 +565,11 @@ void genX(CmdResetEvent)(
> >     ANV_FROM_HANDLE(anv_event, event, _event);
> >
> >     anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) {
> > +      if (stageMask & PIPELINE_STAGE_PIPELINED_BITS) {
> > +         pc.StallAtPixelScoreboard = true;
> > +         pc.CommandStreamerStallEnable = true;
> > +      }
> > +
> >        pc.DestinationAddressType  = DAT_PPGTT;
> >        pc.PostSyncOperation       = WriteImmediateData;
> >        pc.Address = (struct anv_address) {
>
> Either way,
> Reviewed-by: Chad Versace <chadversary at chromium.org>
>
>
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161103/535ea8a9/attachment.html>


More information about the mesa-dev mailing list