Hi! I have a broken image during running simple app from:
I have attached apk and screenshot.
tutorial05_triangle.apk.zip (1.9 MB)
Note: You need to fix code to running this sample, because PowerVR GE8100 supports Vulkan 1.0
return false;
}
VkApplicationInfo appInfo = {
.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO,
.pNext = nullptr,
.pApplicationName = "tutorial05_triangle_window",
.applicationVersion = VK_MAKE_VERSION(1, 0, 0),
.pEngineName = "tutorial",
.engineVersion = VK_MAKE_VERSION(1, 0, 0),
.apiVersion = VK_MAKE_VERSION(1, 1, 0),
};
// create a device
CreateVulkanDevice(app->window, &appInfo);
CreateSwapChain();
// -----------------------------------------------------------------
// Create render pass
VkAttachmentDescription attachmentDescriptions{
.apiVersion = VK_MAKE_VERSION(1, 0, 0),
Tytus
August 2, 2023, 11:00am
2
Hello,
Thanks for raising this issue, we will look into it.
1 Like
Tytus
August 4, 2023, 7:22am
3
I tried to run app on couple of devices, but I was not able to replicate the issue. What ddk version are you using? Could you provide us a pvrcarbon recording of the glitch?
Hi @Tytus Thank you for your responce.
Where can I find DDK version ?
I tried to use GL ES viewer:
I Will try pvrcarbon.
Also I tried on Mac OS Ventura:
PRVCarbod apk failed to install
Tytus
August 8, 2023, 9:30am
7
Your DDK version is 1.9, it is under shading language field. We will not be able to reproduce this issue, because ddk and android version is old. I suspect this issue might be happening because this frame buffer format might be not supported on old version of driver. I recommend that you try to run this app on higher driver version. As for the carbon issue, do you maybe have “Wait for debbuger” selected in developer settings? If so, you can try turning it off.
Hi @Tytus
// **********************************************************
// Get the surface capabilities because:
// - It contains the minimal and max length of the chain, we will need it
// - It's necessary to query the supported surface format (R8G8B8A8 for
// instance ...)
VkSurfaceCapabilitiesKHR surfaceCapabilities;
vkGetPhysicalDeviceSurfaceCapabilitiesKHR(device.gpuDevice_, device.surface_,
&surfaceCapabilities);
// Query the list of supported surface format and choose one we like
uint32_t formatCount = 0;
vkGetPhysicalDeviceSurfaceFormatsKHR(device.gpuDevice_, device.surface_,
&formatCount, nullptr);
VkSurfaceFormatKHR* formats = new VkSurfaceFormatKHR[formatCount];
vkGetPhysicalDeviceSurfaceFormatsKHR(device.gpuDevice_, device.surface_,
&formatCount, formats);
LOGI("Got %d formats", formatCount);
uint32_t chosenFormat;
for (chosenFormat = 0; chosenFormat < formatCount; chosenFormat++) {
if (formats[chosenFormat].format == VK_FORMAT_R8G8B8A8_UNORM) break;
}
We have no assert failed:
&formatCount, nullptr);
VkSurfaceFormatKHR* formats = new VkSurfaceFormatKHR[formatCount];
vkGetPhysicalDeviceSurfaceFormatsKHR(device.gpuDevice_, device.surface_,
&formatCount, formats);
LOGI("Got %d formats", formatCount);
uint32_t chosenFormat;
for (chosenFormat = 0; chosenFormat < formatCount; chosenFormat++) {
if (formats[chosenFormat].format == VK_FORMAT_R8G8B8A8_UNORM) break;
}
assert(chosenFormat < formatCount);
swapchain.displaySize_ = surfaceCapabilities.currentExtent;
swapchain.displayFormat_ = formats[chosenFormat].format;
VkSurfaceCapabilitiesKHR surfaceCap;
CALL_VK(vkGetPhysicalDeviceSurfaceCapabilitiesKHR(device.gpuDevice_,
device.surface_, &surfaceCap));
assert(surfaceCap.supportedCompositeAlpha | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR);
// **********************************************************
So, we have a valid supported format. What do you mean ? We have correct result from
vkGetPhysicalDeviceSurfaceFormatsKHR but, even in this case might be not supported on driver?
We cannot update driver separetly, how to update driver for ZTE Blade A530 smartphone ?
It’s already off
Tytus
August 11, 2023, 4:06pm
9
Some issues can apppear and not be catched by assers or validation layers. Could you try to use different VkImageTiling? There are 2 of them, VK_IMAGE_TILING_OPTIMAL and VK_IMAGE_TILING_LINEAR. Could you try change one to another and see if this helps your issue?
As for taking a carbon recoring, please make sure that your adb is working correctly, and usb debbuging is enabled. Follow this steps to take a carbon recording on linux, I verified them on Ubuntu:
Got to Downloads - Imagination Developers
Download PVRCarbon for linux 64 bit
Give download executable permissions: chmod +x PVRCarbonSetup-2023_R1.run-x64
, replace with actuall file name
Run installer with admin privilages: sudo ./PVRCarbonSetup-2023_R1.run-x64
Make sure your adb is working, and you can see device after entering adb devices
Go to location where carbon is installed: `cd “/opt/Imagination Technologies/PowerVR_Graphics/PowerVR_Tools/PVRCarbon/GUI/Linux_x86_64”
run PVRCarbon with: ./PVRCarbonGUI
Click capture
Select your device, as connection set adb.
Select an app to run
Most of the time you do not have to worry about any basic or advanced options, just press start recording
It might be necessary to accept popup message on your phone, just allow it
Press stop recording when part of app you wanted to capture is finished
I hope this helps your issue. When you menage to take a capture, please share it here.
Hi!
We are using is already created VkImage’s list from vkGetSwapchainImagesKHR
vkDestroySwapchainKHR(device.device_, swapchain.swapchain_, nullptr);
}
void CreateFrameBuffers(VkRenderPass& renderPass,
VkImageView depthView = VK_NULL_HANDLE) {
// query display attachment to swapchain
uint32_t SwapchainImagesCount = 0;
CALL_VK(vkGetSwapchainImagesKHR(device.device_, swapchain.swapchain_,
&SwapchainImagesCount, nullptr));
swapchain.displayImages_.resize(SwapchainImagesCount);
CALL_VK(vkGetSwapchainImagesKHR(device.device_, swapchain.swapchain_,
&SwapchainImagesCount,
swapchain.displayImages_.data()));
// create image view for each swapchain image
swapchain.displayViews_.resize(SwapchainImagesCount);
for (uint32_t i = 0; i < SwapchainImagesCount; i++) {
VkImageViewCreateInfo viewCreateInfo = {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.pNext = nullptr,
.flags = 0,
so we cannot change Image tiling for SwapChain images at all.
Tytus
August 16, 2023, 12:27pm
11
Hi,
ah yes, this app is rendering directly to the swapchain.
I noticed that example you are using does not have validation layers enabled. Could you enable validation layers and send me logcat of your app? We could see if some validation errors are accuring on your device.
Alternatively, if you do not have necessity to use google example, there are plenty of repositories, that do similar things. You can check out our example that draws triangle in Vulkan, HelloAPI requires version 1.0: https://github.com/powervr-graphics/Native_SDK/tree/master/examples/Vulkan/01_HelloAPI