From 232e30f4db824feed4db7f5034aab1d905a0109e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 12 Nov 2017 19:32:10 +0100 Subject: [PATCH] Vulkan: When deriving stencilref from color, don't forget to update the value. Plus minor cleanups. --- GPU/Vulkan/DrawEngineVulkan.cpp | 2 ++ GPU/Vulkan/FramebufferVulkan.cpp | 1 - ext/native/base/logging.h | 3 ++- ext/native/thin3d/VulkanQueueRunner.cpp | 2 -- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index 09cd122ac7..b75ceebd19 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -997,6 +997,8 @@ void DrawEngineVulkan::DoFlush() { } lastPipeline_ = pipeline; } + if (result.setStencil) + dynState_.stencilRef = result.stencilValue; ApplyDrawStateLate(renderManager, false, 0, pipeline->useBlendConstant); gstate_c.Clean(DIRTY_BLEND_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_RASTER_STATE | DIRTY_VIEWPORTSCISSOR_STATE); lastPipeline_ = pipeline; diff --git a/GPU/Vulkan/FramebufferVulkan.cpp b/GPU/Vulkan/FramebufferVulkan.cpp index 81fc286a22..357926339e 100644 --- a/GPU/Vulkan/FramebufferVulkan.cpp +++ b/GPU/Vulkan/FramebufferVulkan.cpp @@ -362,7 +362,6 @@ void FramebufferManagerVulkan::BindPostShader(const PostShaderUniforms &uniforms } postShaderUniforms_ = uniforms; - // VulkanRenderManager *renderManager = (VulkanRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER); cur2DPipeline_ = pipelinePostShader_; gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE); diff --git a/ext/native/base/logging.h b/ext/native/base/logging.h index 3425b9e942..4cecf3f8f5 100644 --- a/ext/native/base/logging.h +++ b/ext/native/base/logging.h @@ -88,7 +88,8 @@ const char *GetFn(const char *fn); OutputDebugStringUTF8(temp); \ } \ } while (false) -#define DUMPLOG(x) OutputDebugStringUTF8(x); + +#define DUMPLOG(x) OutputDebugStringUTF8(x) #ifdef _DEBUG #define DLOG(...) XLOG_IMPL("D", __VA_ARGS__) diff --git a/ext/native/thin3d/VulkanQueueRunner.cpp b/ext/native/thin3d/VulkanQueueRunner.cpp index b46830d404..a2e56e483d 100644 --- a/ext/native/thin3d/VulkanQueueRunner.cpp +++ b/ext/native/thin3d/VulkanQueueRunner.cpp @@ -4,8 +4,6 @@ // Debug help: adb logcat -s DEBUG PPSSPPNativeActivity PPSSPP -// TODO: This is only enough for 4x render resolution / 4x texture upscale for debugger. -// Maybe we should use a dynamically allocated one for larger? void VulkanQueueRunner::CreateDeviceObjects() { ILOG("VulkanQueueRunner::CreateDeviceObjects"); InitBackbufferRenderPass();