From 330bdb8be8a1eb5e490f7bc77345892d99745200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 31 Oct 2017 23:48:17 +0100 Subject: [PATCH] Add and update some comments. --- Common/Vulkan/VulkanContext.h | 2 ++ Common/Vulkan/VulkanImage.h | 1 + Core/Core.vcxproj | 5 ++++- GPU/D3D11/TextureCacheD3D11.cpp | 5 ++--- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Common/Vulkan/VulkanContext.h b/Common/Vulkan/VulkanContext.h index 51c46409c9..f647f4d0f2 100644 --- a/Common/Vulkan/VulkanContext.h +++ b/Common/Vulkan/VulkanContext.h @@ -306,6 +306,8 @@ public: return swapchainFormat_; } + // 1 for no frame overlap and thus minimal latency but worst performance. + // 2 is an OK compromise, while 3 performs best but risks slightly higher latency. enum { MAX_INFLIGHT_FRAMES = 3, }; diff --git a/Common/Vulkan/VulkanImage.h b/Common/Vulkan/VulkanImage.h index 51ffbe5e22..7a6bff62f6 100644 --- a/Common/Vulkan/VulkanImage.h +++ b/Common/Vulkan/VulkanImage.h @@ -35,6 +35,7 @@ public: void UploadMip(VkCommandBuffer cmd, int mip, int mipWidth, int mipHeight, VkBuffer buffer, uint32_t offset, size_t rowLength); // rowLength is in pixels void EndCreate(VkCommandBuffer cmd); + // Dangerous. void TransitionForUpload(VkCommandBuffer cmd); int GetNumMips() const { return numMips_; } diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj index dda064edaa..cdb0667fc8 100644 --- a/Core/Core.vcxproj +++ b/Core/Core.vcxproj @@ -236,7 +236,10 @@ - + + MaxSpeed + Default + diff --git a/GPU/D3D11/TextureCacheD3D11.cpp b/GPU/D3D11/TextureCacheD3D11.cpp index 789f3e4450..26744c22b8 100644 --- a/GPU/D3D11/TextureCacheD3D11.cpp +++ b/GPU/D3D11/TextureCacheD3D11.cpp @@ -514,9 +514,6 @@ void TextureCacheD3D11::BuildTexture(TexCacheEntry *const entry, bool replaceIma } } - // If GLES3 is available, we can preallocate the storage, which makes texture loading more efficient. - DXGI_FORMAT dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat()); - int scaleFactor = standardScaleFactor_; // Rachet down scale factor in low-memory mode. @@ -573,6 +570,8 @@ void TextureCacheD3D11::BuildTexture(TexCacheEntry *const entry, bool replaceIma maxLevel = 0; } + DXGI_FORMAT dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat()); + if (IsFakeMipmapChange()) { // NOTE: Since the level is not part of the cache key, we assume it never changes. u8 level = std::max(0, gstate.getTexLevelOffset16() / 16);