[Mesa-dev] [PATCH 2/2] anv: don't require render target isl bit for depth/stencil surfaces

Jason Ekstrand jason at jlekstrand.net
Fri Jan 20 17:07:07 UTC 2017


On Fri, Jan 20, 2017 at 8:45 AM, Lionel Landwerlin <
lionel.g.landwerlin at intel.com> wrote:

> Blorp can deal with depth/stencil surfaces blits/copies without the
> render target requirement. Also having both render target and
> depth/stencil requirement is incompatible from isl's point of view.
>
> This fixes an image creation issue in the high level quality settings
> of the Unity3D player, which requires a depth texture with src/dst
> transfer & 4x multisampling.
>
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
>  src/intel/vulkan/anv_image.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
> index 9e5cebe188..8f738b2042 100644
> --- a/src/intel/vulkan/anv_image.c
> +++ b/src/intel/vulkan/anv_image.c
> @@ -75,8 +75,12 @@ choose_isl_surf_usage(VkImageUsageFlags vk_usage,
>        isl_usage |= ISL_SURF_USAGE_TEXTURE_BIT;
>     }
>
> -   if (vk_usage & VK_IMAGE_USAGE_TRANSFER_DST_BIT) {
> -      /* blorp implements transfers by rendering into the destination
> image. */
> +   if (vk_usage & VK_IMAGE_USAGE_TRANSFER_DST_BIT &&
> +       (aspect & (VK_IMAGE_ASPECT_DEPTH_BIT |
> +                  VK_IMAGE_ASPECT_STENCIL_BIT)) == 0) {
>

How about just "aspect == VK_IMAGE_ASPECT_COLOR_BIT"?  That would be
simpler.  Also, this should get CC'd to stable.


> +      /* blorp implements transfers by rendering into the destination
> image.
> +       * Only request this with color images, as we deal with
> depth/stencil
> +       * formats differently. */
>        isl_usage |= ISL_SURF_USAGE_RENDER_TARGET_BIT;
>     }
>
> --
> 2.11.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/20170120/ac97c786/attachment.html>


More information about the mesa-dev mailing list