Coder Social home page Coder Social logo

Comments (10)

strassek avatar strassek commented on August 15, 2024

It looks like all the subtests are failing in anv_GetSwapchainGrallocUsageANDROID with VK_IMAGE_USAGE_STORAGE_BIT unsupported. Some are failing early in anv_GetPhysicalDeviceImageFormatProperties2 with unsupported format, specifically for VK_FORMAT_R8G8B8A8_SRGB and VK_FORMAT_R5G6B5_UNORM_PACK16.

from external-mesa.

tpalli avatar tpalli commented on August 15, 2024

As a hack you could "imageUsage &= ~VK_IMAGE_USAGE_STORAGE_BIT" in GetSwapChainGrallocUsageANDROID .. this should make some tests pass. Tests failing in GetPhysicalDeviceImageFormatProperties2 will need some investigation if there are some specific flags given why those formats would not work .. IMO they should.

from external-mesa.

strassek avatar strassek commented on August 15, 2024

These 2 hunks seem to be all that is needed to get the tests passing:

diff --git a/src/intel/isl/isl_storage_image.c b/src/intel/isl/isl_storage_image.c
index e2bd4dd..7cafebb 100644
--- a/src/intel/isl/isl_storage_image.c
+++ b/src/intel/isl/isl_storage_image.c
@@ -69,6 +69,8 @@ isl_is_storage_image_format(enum isl_format format)
    case ISL_FORMAT_R16_SNORM:
    case ISL_FORMAT_R8_UNORM:
    case ISL_FORMAT_R8_SNORM:
+   case ISL_FORMAT_R8G8B8A8_UNORM_SRGB:
+   case ISL_FORMAT_B5G6R5_UNORM:
       return true;
    default:
       return false;
diff --git a/src/intel/vulkan/anv_android.c b/src/intel/vulkan/anv_android.c
index 46c41d5..5c41db3 100644
--- a/src/intel/vulkan/anv_android.c
+++ b/src/intel/vulkan/anv_android.c
@@ -268,19 +268,13 @@ VkResult anv_GetSwapchainGrallocUsageANDROID(
                        "inside %s", __func__);
    }
 
-   /* Reject STORAGE here to avoid complexity elsewhere. */
-   if (imageUsage & VK_IMAGE_USAGE_STORAGE_BIT) {
-      return vk_errorf(device->instance, device, VK_ERROR_FORMAT_NOT_SUPPORTED,
-                       "VK_IMAGE_USAGE_STORAGE_BIT unsupported for gralloc "
-                       "swapchain");
-   }
-
    if (unmask32(&imageUsage, VK_IMAGE_USAGE_TRANSFER_DST_BIT |
                              VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT))
       *grallocUsage |= GRALLOC_USAGE_HW_RENDER;
 
    if (unmask32(&imageUsage, VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
                              VK_IMAGE_USAGE_SAMPLED_BIT |
+                             VK_IMAGE_USAGE_STORAGE_BIT |
                              VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT))
       *grallocUsage |= GRALLOC_USAGE_HW_TEXTURE;
 

I would like some more clarity on why storage was being rejected.

from external-mesa.

renchenglei avatar renchenglei commented on August 15, 2024

@strassek & @tpalli , above patch could fix all wsi.android.* failure. Will we have plan to get it merged on github?

from external-mesa.

strassek avatar strassek commented on August 15, 2024

@renchenglei We aren't quite there yet. The above changes seem to be causing or exposing failures in dEQP-VK.subgroups.arithmetic#subgroupinclusive*.

edit: The subgroups.arithmetic failures I saw may have been unrelated, will need to do another test run to be sure. In any case we still need some feedback on the feasibility of adding these formats.

from external-mesa.

renchenglei avatar renchenglei commented on August 15, 2024

@strassek I finished one round of CTS VK test on Android, and with above change all wsi.android.* cases could pass and no regression found. Now, there are only two cases fail(one is #90 and another is #89). #89 should be fixed with @tpalli's patch #96(Thanks @tpalli ).

from external-mesa.

renchenglei avatar renchenglei commented on August 15, 2024

@strassek as this won't cause regression, will we have plan to submit the changes?

from external-mesa.

strassek avatar strassek commented on August 15, 2024

No, we expose formats to Android that can't be used for storage, so the above changes would still be incorrect.

from external-mesa.

strassek avatar strassek commented on August 15, 2024

@jennycao This should now be fixed in master, please retest.

from external-mesa.

jennycao avatar jennycao commented on August 15, 2024

@strassek this issue is fixed by #100, we retest and got pass, Thanks for the fix :)

from external-mesa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.