[Mesa-dev] [PATCH] anv/cmd_buffer: Use the proper depth input attachment surface state
Jason Ekstrand
jason at jlekstrand.net
Mon Jan 30 23:50:17 UTC 2017
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
On Mon, Jan 30, 2017 at 2:37 PM, Nanley Chery <nanleychery at gmail.com> wrote:
> Commit 2852efcda40274acf3272611c6a3b7731523a72d moved the location of
> the depth input attachment surface state from the render pass to the
> image view, but failed to update the surface state location used when
> emitting the binding table. Fix this by loading the surface state from
> the correct location.
>
> Cc: "17.0" <mesa-stable at lists.freedesktop.org>
> Cc: Iago Toral <itoral at igalia.com>
> Cc: Jason Ekstrand <jason at jlekstrand.net>
> Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> ---
> src/intel/vulkan/genX_cmd_buffer.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/src/intel/vulkan/genX_cmd_buffer.c
> b/src/intel/vulkan/genX_cmd_buffer.c
> index f7894a0574..d93d377055 100644
> --- a/src/intel/vulkan/genX_cmd_buffer.c
> +++ b/src/intel/vulkan/genX_cmd_buffer.c
> @@ -1177,9 +1177,9 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
>
> case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:
> assert(stage == MESA_SHADER_FRAGMENT);
> - if (desc->image_view->aspect_mask ==
> VK_IMAGE_ASPECT_STENCIL_BIT) {
> - /* For stencil input attachments, we treat it like any old
> texture
> - * that a user may have bound.
> + if (desc->image_view->aspect_mask != VK_IMAGE_ASPECT_COLOR_BIT) {
> + /* For depth and stencil input attachments, we treat it like
> any
> + * old texture that a user may have bound.
> */
> surface_state = desc->image_view->sampler_surface_state;
> assert(surface_state.alloc_size);
> @@ -1187,9 +1187,9 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
> desc->image_view->image->aux_usage,
> surface_state);
> } else {
> - /* For depth and color input attachments, we create the
> surface
> - * state at vkBeginRenderPass time so that we can include aux
> - * and clear color information.
> + /* For color input attachments, we create the surface state at
> + * vkBeginRenderPass time so that we can include aux and clear
> + * color information.
> */
> assert(binding->input_attachment_index <
> subpass->input_count);
> const unsigned subpass_att = binding->input_attachment_index;
> --
> 2.11.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170130/9b47356d/attachment.html>
More information about the mesa-dev
mailing list