diff --git a/Common/GPU/Vulkan/VulkanImage.cpp b/Common/GPU/Vulkan/VulkanImage.cpp index 054bd59f57..6a29a9fdbb 100644 --- a/Common/GPU/Vulkan/VulkanImage.cpp +++ b/Common/GPU/Vulkan/VulkanImage.cpp @@ -40,12 +40,12 @@ static bool IsDepthStencilFormat(VkFormat format) { bool VulkanTexture::CreateDirect(int w, int h, int depth, int numMips, VkFormat format, VkImageLayout initialLayout, VkImageUsageFlags usage, VulkanBarrierBatch *barrierBatch, const VkComponentMapping *mapping) { if (w == 0 || h == 0 || numMips == 0) { - ERROR_LOG(Log::G3D, "Can't create a zero-size VulkanTexture"); + ERROR_LOG(Log::G3D, "Can't create a zero-size VulkanTexture (tag: '%s')", tag_); return false; } - int maxDim = vulkan_->GetPhysicalDeviceProperties(0).properties.limits.maxImageDimension2D; + int maxDim = vulkan_->GetPhysicalDeviceProperties().properties.limits.maxImageDimension2D; if (w > maxDim || h > maxDim) { - ERROR_LOG(Log::G3D, "Can't create a texture this large"); + ERROR_LOG(Log::G3D, "Can't create a texture with format %s this large (%d > %d or %d > %d) (tag: '%s')", VulkanFormatToString(format), w, maxDim, h, maxDim, tag_); return false; } @@ -87,7 +87,7 @@ bool VulkanTexture::CreateDirect(int w, int h, int depth, int numMips, VkFormat VmaAllocationInfo allocInfo{}; VkResult res = vmaCreateImage(vulkan_->Allocator(), &image_create_info, &allocCreateInfo, &image_, &allocation_, &allocInfo); if (res != VK_SUCCESS) { - ERROR_LOG(Log::G3D, "vmaCreateImage failed: %s. Destroying image.", VulkanResultToString(res)); + ERROR_LOG(Log::G3D, "vmaCreateImage failed: %s. Destroying image (tag: '%s')", VulkanResultToString(res), tag_); _dbg_assert_msg_(res == VK_ERROR_OUT_OF_HOST_MEMORY || res == VK_ERROR_OUT_OF_DEVICE_MEMORY || res == VK_ERROR_TOO_MANY_OBJECTS, "%d", (int)res); view_ = VK_NULL_HANDLE; image_ = VK_NULL_HANDLE; @@ -145,7 +145,7 @@ bool VulkanTexture::CreateDirect(int w, int h, int depth, int numMips, VkFormat res = vkCreateImageView(vulkan_->GetDevice(), &view_info, NULL, &view_); if (res != VK_SUCCESS) { - ERROR_LOG(Log::G3D, "vkCreateImageView failed: %s. Destroying image.", VulkanResultToString(res)); + ERROR_LOG(Log::G3D, "vkCreateImageView failed: %s. Destroying image (tag: '%s')", VulkanResultToString(res), tag_); _assert_msg_(res == VK_ERROR_OUT_OF_HOST_MEMORY || res == VK_ERROR_OUT_OF_DEVICE_MEMORY || res == VK_ERROR_TOO_MANY_OBJECTS, "%d", (int)res); vmaDestroyImage(vulkan_->Allocator(), image_, allocation_); view_ = VK_NULL_HANDLE; @@ -160,7 +160,7 @@ bool VulkanTexture::CreateDirect(int w, int h, int depth, int numMips, VkFormat view_info.viewType = VK_IMAGE_VIEW_TYPE_2D_ARRAY; res = vkCreateImageView(vulkan_->GetDevice(), &view_info, NULL, &arrayView_); // Assume that if the above view creation succeeded, so will this. - _assert_msg_(res == VK_SUCCESS, "View creation failed: %d", (int)res); + _assert_msg_(res == VK_SUCCESS, "View creation failed: %d (tag: '%s')", (int)res, tag_); vulkan_->SetDebugName(arrayView_, VK_OBJECT_TYPE_IMAGE_VIEW, tag_); } diff --git a/Common/GPU/Vulkan/thin3d_vulkan.cpp b/Common/GPU/Vulkan/thin3d_vulkan.cpp index 2035829e9d..5e0dfceaa5 100644 --- a/Common/GPU/Vulkan/thin3d_vulkan.cpp +++ b/Common/GPU/Vulkan/thin3d_vulkan.cpp @@ -836,7 +836,7 @@ bool VKTexture::Create(VkCommandBuffer cmd, VulkanBarrierBatch *postBarriers, Vu } VulkanBarrierBatch barrier; if (!vkTex_->CreateDirect(width_, height_, 1, mipLevels_, vulkanFormat, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, usageBits, &barrier, swizzle)) { - ERROR_LOG(Log::G3D, "Failed to create VulkanTexture: %dx%dx%d fmt %d, %d levels", width_, height_, depth_, (int)vulkanFormat, mipLevels_); + ERROR_LOG(Log::G3D, "Failed to create VKTexture: %dx%dx%d fmt %s, %d levels, tag '%s'", width_, height_, depth_, VulkanFormatToString(vulkanFormat), mipLevels_, desc.tag); return false; } barrier.Flush(cmd); diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp index 2d2eb6c531..3b8378446a 100644 --- a/android/jni/app-android.cpp +++ b/android/jni/app-android.cpp @@ -826,6 +826,8 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeApp_init } } + EARLY_LOG("Calling NativeInit with user_data_path %s, externalStorageDir %s, cacheDir %s", user_data_path.c_str(), externalStorageDir.c_str(), cacheDir.c_str()); + // TODO: We should be able to do the Vulkan init in parallel with NativeInit. NativeInit((int)args.size(), &args[0], user_data_path.c_str(), externalStorageDir.c_str(), cacheDir.c_str());