From bddd3c2a309c2f2e1b5fc552fa026d0493eaf845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 17 Apr 2025 18:45:55 +0200 Subject: [PATCH] Minor stuff --- Common/GPU/Vulkan/VulkanDebug.cpp | 4 ---- Common/GPU/Vulkan/VulkanRenderManager.cpp | 1 + Common/Render/ManagedTexture.cpp | 2 +- GPU/Common/DrawEngineCommon.cpp | 1 - GPU/Common/GPUStateUtils.cpp | 2 ++ 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Common/GPU/Vulkan/VulkanDebug.cpp b/Common/GPU/Vulkan/VulkanDebug.cpp index 64b77416d3..35176f9cc7 100644 --- a/Common/GPU/Vulkan/VulkanDebug.cpp +++ b/Common/GPU/Vulkan/VulkanDebug.cpp @@ -74,10 +74,6 @@ VKAPI_ATTR VkBool32 VKAPI_CALL VulkanDebugUtilsCallback( // ARM best practices: index buffer usage warning (too few indices used compared to value range). // This should be looked into more - happens even in moppi-flower which is weird. return false; - case 337425955: - // False positive - // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/3615 - return false; case 227275665: // PowerVR (and all other) best practices: LOAD_OP_LOAD used in render pass. return false; diff --git a/Common/GPU/Vulkan/VulkanRenderManager.cpp b/Common/GPU/Vulkan/VulkanRenderManager.cpp index 27ac17c1e0..4f16a81b2f 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.cpp +++ b/Common/GPU/Vulkan/VulkanRenderManager.cpp @@ -1379,6 +1379,7 @@ void VulkanRenderManager::BlitFramebuffer(VKRFramebuffer *src, VkRect2D srcRect, VkImageView VulkanRenderManager::BindFramebufferAsTexture(VKRFramebuffer *fb, int binding, VkImageAspectFlags aspectBit, int layer) { _dbg_assert_(curRenderStep_ != nullptr); + _dbg_assert_(fb != nullptr); // We don't support texturing from stencil, neither do we support texturing from depth|stencil together (nonsensical). _dbg_assert_(aspectBit == VK_IMAGE_ASPECT_COLOR_BIT || aspectBit == VK_IMAGE_ASPECT_DEPTH_BIT); diff --git a/Common/Render/ManagedTexture.cpp b/Common/Render/ManagedTexture.cpp index 918a6eff2a..2053c142ab 100644 --- a/Common/Render/ManagedTexture.cpp +++ b/Common/Render/ManagedTexture.cpp @@ -54,7 +54,7 @@ private: std::string filename_; TempImage *tempImage_; ImageFileType type_; - bool generateMips_; + bool generateMips_; // not yet used ManagedTexture::LoadState *state_; }; diff --git a/GPU/Common/DrawEngineCommon.cpp b/GPU/Common/DrawEngineCommon.cpp index a1bee4855b..a05e260ffa 100644 --- a/GPU/Common/DrawEngineCommon.cpp +++ b/GPU/Common/DrawEngineCommon.cpp @@ -594,7 +594,6 @@ void DrawEngineCommon::ApplyFramebufferRead(FBOTexState *fboTexState) { gpuStats.numCopiesForShaderBlend++; *fboTexState = FBO_TEX_COPY_BIND_TEX; } - gstate_c.Dirty(DIRTY_SHADERBLEND); } diff --git a/GPU/Common/GPUStateUtils.cpp b/GPU/Common/GPUStateUtils.cpp index c66d4c6083..81a7b1b43e 100644 --- a/GPU/Common/GPUStateUtils.cpp +++ b/GPU/Common/GPUStateUtils.cpp @@ -1446,6 +1446,8 @@ static void ConvertLogicOpState(GenericLogicState &logicOpState, bool logicSuppo return; } + // TODO: Brave story uses GE_INVERTED, this is easy to convert to a blend function - unless blend is also enabled simultaneously. + if (forceApplyFramebuffer && shaderBitOpsSupported) { // We have to emulate logic ops in the shader. logicOpState.logicOpEnabled = false; // Don't use any hardware logic op, supported or not.