Commit 788ea9f7 by Hernan Liatis

Add Gralloc usage flags

Bug: b/122837237 Change-Id: Ic2643d288dd8d217d68cda44ec291c0ea810d4d8 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30369Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarHernan Liatis <hliatis@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 82ae7cbc
......@@ -48,6 +48,7 @@
#ifdef __ANDROID__
#include <vulkan/vk_android_native_buffer.h>
#include <hardware/gralloc1.h>
#endif
#include "WSI/VkSwapchainKHR.hpp"
......@@ -2526,6 +2527,9 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainGrallocUsage2ANDROID(VkDevice devic
TRACE("(VkDevice device = 0x%X, VkFormat format = 0x%X, VkImageUsageFlags imageUsage = 0x%X, VkSwapchainImageUsageFlagsANDROID swapchainUsage = 0x%X, uint64_t* grallocConsumerUsage = 0x%X, uin64_t* grallocProducerUsage = 0x%X)",
device, format, imageUsage, swapchainUsage, grallocConsumerUsage, grallocProducerUsage);
*grallocConsumerUsage = 0;
*grallocProducerUsage = GRALLOC1_PRODUCER_USAGE_CPU_WRITE_OFTEN;
return VK_SUCCESS;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment