[Mesa-dev] [PATCH 1/4] anv/gen10: Emit CS stall and mark push constants dirty.
Jason Ekstrand
jason at jlekstrand.net
Fri Jan 26 19:45:01 UTC 2018
rb
On Fri, Jan 26, 2018 at 11:32 AM, Rafael Antognolli <
rafael.antognolli at intel.com> wrote:
> I got reviews and fixed the patches locally, but ended up merging the
> ones that I sent originally to the list. This patch fixes those
> mistakes.
>
> Fixes: 78c125af3904c539ea69bec2dd9fdf7a5162854f
> Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>
> Cc: Jason Ekstrand <jason at jlekstrand.net>
> ---
> src/intel/vulkan/anv_private.h | 1 -
> src/intel/vulkan/genX_cmd_buffer.c | 18 ++++++++++++------
> 2 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_
> private.h
> index 9d452de85e8..3cf37dd6bee 100644
> --- a/src/intel/vulkan/anv_private.h
> +++ b/src/intel/vulkan/anv_private.h
> @@ -1477,7 +1477,6 @@ enum anv_pipe_bits {
> ANV_PIPE_CONSTANT_CACHE_INVALIDATE_BIT = (1 << 3),
> ANV_PIPE_VF_CACHE_INVALIDATE_BIT = (1 << 4),
> ANV_PIPE_DATA_CACHE_FLUSH_BIT = (1 << 5),
> - ANV_PIPE_ISP_DISABLE_BIT = (1 << 9),
> ANV_PIPE_TEXTURE_CACHE_INVALIDATE_BIT = (1 << 10),
> ANV_PIPE_INSTRUCTION_CACHE_INVALIDATE_BIT = (1 << 11),
> ANV_PIPE_RENDER_TARGET_CACHE_FLUSH_BIT = (1 << 12),
> diff --git a/src/intel/vulkan/genX_cmd_buffer.c
> b/src/intel/vulkan/genX_cmd_buffer.c
> index e8d44d0ad90..3691b4bdec9 100644
> --- a/src/intel/vulkan/genX_cmd_buffer.c
> +++ b/src/intel/vulkan/genX_cmd_buffer.c
> @@ -969,6 +969,15 @@ genX(BeginCommandBuffer)(
> if (cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY)
> cmd_buffer->state.pending_pipe_bits |=
> ANV_PIPE_VF_CACHE_INVALIDATE_BIT;
>
> + /* We send an "Indirect State Pointers Disable" packet at
> + * EndCommandBuffer, so all push contant packets are ignored during a
> + * context restore. Documentation says after that command, we need to
> + * emit push constants again before any rendering operation. So we
> + * flag them dirty here to make sure they get emitted.
> + */
> + if (GEN_GEN == 10)
> + cmd_buffer->state.push_constants_dirty |=
> VK_SHADER_STAGE_ALL_GRAPHICS;
> +
> VkResult result = VK_SUCCESS;
> if (cmd_buffer->usage_flags &
> VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT) {
> @@ -1008,8 +1017,7 @@ genX(BeginCommandBuffer)(
> return result;
> }
>
> -/**
> - * From the PRM, Volume 2a:
> +/* From the PRM, Volume 2a:
> *
> * "Indirect State Pointers Disable
> *
> @@ -1039,16 +1047,14 @@ genX(BeginCommandBuffer)(
> * hardware to ignore previous 3DSTATE_CONSTANT_* packets during a
> * context restore, so the mentioned hang doesn't happen. However,
> * software must program push constant commands for all stages prior to
> - * rendering anything, so we flag them as dirty.
> + * rendering anything. So we flag them dirty in BeginCommandBuffer.
> */
> static void
> emit_isp_disable(struct anv_cmd_buffer *cmd_buffer)
> {
> anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) {
> pc.IndirectStatePointersDisable = true;
> - pc.PostSyncOperation = WriteImmediateData;
> - pc.Address =
> - (struct anv_address) { &cmd_buffer->device->workaround_bo, 0
> };
> + pc.CommandStreamerStallEnable = true;
> }
> }
>
> --
> 2.14.3
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180126/e0186b2f/attachment-0001.html>
More information about the mesa-dev
mailing list