/[packages]/cauldron/mesa/current/SOURCES/0056-anv-android-Do-not-reject-storage-images.patch
ViewVC logotype

Contents of /cauldron/mesa/current/SOURCES/0056-anv-android-Do-not-reject-storage-images.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1355920 - (show annotations) (download)
Sun Jan 13 14:22:00 2019 UTC (5 years, 3 months ago) by tmb
File size: 2708 byte(s)
add current fixes from upstream staging/18.3 branch
1 From 2f2e8cc2c5e49f72b45e302fad25ab7ae2917480 Mon Sep 17 00:00:00 2001
2 From: Bas Nieuwenhuizen <basni@chromium.org>
3 Date: Wed, 5 Dec 2018 11:28:12 +0100
4 Subject: [PATCH 56/78] anv/android: Do not reject storage images.
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 We do the ImageFormatProperties check already, and rejecting an usage
10 flag when both ImageFormatProperties and the WSI (which is Android)
11 support it is not allowed.
12
13 Intel does support storage for some of the support WSI formats, such
14 as R8G8B8A8_UNORM, and looking at the ISL_SURF_USAGE_DISABLE_AUX_BIT,
15 the imported images do not have any form of compression that would
16 prevent this fix.
17
18 v2: Also consider STORAGE bit for Gralloc usage bits.
19 (From Kevin Strasser <kevin.strasser@intel.com>)
20
21 Fixes: 053d4c328fa "anv: Implement VK_ANDROID_native_buffer (v9)"
22 Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
23 (cherry picked from commit 110564fdecd0948e7aa9b1a607af7631430092ff)
24 ---
25 src/intel/vulkan/anv_android.c | 10 ++--------
26 1 file changed, 2 insertions(+), 8 deletions(-)
27
28 diff --git a/src/intel/vulkan/anv_android.c b/src/intel/vulkan/anv_android.c
29 index 916e76c93f..cdca9f95ca 100644
30 --- a/src/intel/vulkan/anv_android.c
31 +++ b/src/intel/vulkan/anv_android.c
32 @@ -234,7 +234,7 @@ VkResult anv_GetSwapchainGrallocUsageANDROID(
33 *grallocUsage = 0;
34 intel_logd("%s: format=%d, usage=0x%x", __func__, format, imageUsage);
35
36 - /* WARNING: Android Nougat's libvulkan.so hardcodes the VkImageUsageFlags
37 + /* WARNING: Android's libvulkan.so hardcodes the VkImageUsageFlags
38 * returned to applications via VkSurfaceCapabilitiesKHR::supportedUsageFlags.
39 * The relevant code in libvulkan/swapchain.cpp contains this fun comment:
40 *
41 @@ -268,19 +268,13 @@ VkResult anv_GetSwapchainGrallocUsageANDROID(
42 "inside %s", __func__);
43 }
44
45 - /* Reject STORAGE here to avoid complexity elsewhere. */
46 - if (imageUsage & VK_IMAGE_USAGE_STORAGE_BIT) {
47 - return vk_errorf(device->instance, device, VK_ERROR_FORMAT_NOT_SUPPORTED,
48 - "VK_IMAGE_USAGE_STORAGE_BIT unsupported for gralloc "
49 - "swapchain");
50 - }
51 -
52 if (unmask32(&imageUsage, VK_IMAGE_USAGE_TRANSFER_DST_BIT |
53 VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT))
54 *grallocUsage |= GRALLOC_USAGE_HW_RENDER;
55
56 if (unmask32(&imageUsage, VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
57 VK_IMAGE_USAGE_SAMPLED_BIT |
58 + VK_IMAGE_USAGE_STORAGE_BIT |
59 VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT))
60 *grallocUsage |= GRALLOC_USAGE_HW_TEXTURE;
61
62 --
63 2.20.1
64

  ViewVC Help
Powered by ViewVC 1.1.30