diff --git a/Common/GPU/D3D11/thin3d_d3d11.cpp b/Common/GPU/D3D11/thin3d_d3d11.cpp index c4d4c11f0..25cb495d0 100644 --- a/Common/GPU/D3D11/thin3d_d3d11.cpp +++ b/Common/GPU/D3D11/thin3d_d3d11.cpp @@ -99,7 +99,7 @@ public: void GetFramebufferDimensions(Framebuffer *fbo, int *w, int *h) override; - void InvalidateCachedState() override; + void Invalidate(InvalidationFlags flags) override; void BindTextures(int start, int count, Texture **textures, TextureBindFlags flags) override; void BindNativeTexture(int index, void *nativeTexture) override; @@ -1080,17 +1080,19 @@ void D3D11DrawContext::UpdateDynamicUniformBuffer(const void *ub, size_t size) { context_->Unmap(curPipeline_->dynamicUniforms, 0); } -void D3D11DrawContext::InvalidateCachedState() { - // This is a signal to forget all our state caching. - curBlend_ = nullptr; - curDepthStencil_ = nullptr; - curRaster_ = nullptr; - curPS_ = nullptr; - curVS_ = nullptr; - curGS_ = nullptr; - curInputLayout_ = nullptr; - curTopology_ = D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED; - curPipeline_ = nullptr; +void D3D11DrawContext::Invalidate(InvalidationFlags flags) { + if (flags & InvalidationFlags::CACHED_RENDER_STATE) { + // This is a signal to forget all our state caching. + curBlend_ = nullptr; + curDepthStencil_ = nullptr; + curRaster_ = nullptr; + curPS_ = nullptr; + curVS_ = nullptr; + curGS_ = nullptr; + curInputLayout_ = nullptr; + curTopology_ = D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED; + curPipeline_ = nullptr; + } } void D3D11DrawContext::BindPipeline(Pipeline *pipeline) { @@ -1698,7 +1700,7 @@ void D3D11DrawContext::BindFramebufferAsRenderTarget(Framebuffer *fbo, const Ren } if (invalidationCallback_) { - invalidationCallback_(InvalidationFlags::RENDER_PASS_STATE); + invalidationCallback_(InvalidationCallbackFlags::RENDER_PASS_STATE); } } diff --git a/Common/GPU/D3D9/thin3d_d3d9.cpp b/Common/GPU/D3D9/thin3d_d3d9.cpp index 26f3abfe9..8b4fb8031 100644 --- a/Common/GPU/D3D9/thin3d_d3d9.cpp +++ b/Common/GPU/D3D9/thin3d_d3d9.cpp @@ -610,7 +610,7 @@ public: void HandleEvent(Event ev, int width, int height, void *param1, void *param2) override; - void InvalidateCachedState() override; + void Invalidate(InvalidationFlags flags) override; void SetInvalidationCallback(InvalidationCallback callback) override { invalidationCallback_ = callback; @@ -650,8 +650,10 @@ private: InvalidationCallback invalidationCallback_; }; -void D3D9Context::InvalidateCachedState() { - curPipeline_ = nullptr; +void D3D9Context::Invalidate(InvalidationFlags flags) { + if (flags & InvalidationFlags::CACHED_RENDER_STATE) { + curPipeline_ = nullptr; + } } // TODO: Move this detection elsewhere when it's needed elsewhere, not before. It's ugly. @@ -1323,7 +1325,7 @@ void D3D9Context::BindFramebufferAsRenderTarget(Framebuffer *fbo, const RenderPa dxstate.viewport.restore(); if (invalidationCallback_) { - invalidationCallback_(InvalidationFlags::RENDER_PASS_STATE); + invalidationCallback_(InvalidationCallbackFlags::RENDER_PASS_STATE); } } diff --git a/Common/GPU/MiscTypes.h b/Common/GPU/MiscTypes.h index fd3d90dbb..0db111a73 100644 --- a/Common/GPU/MiscTypes.h +++ b/Common/GPU/MiscTypes.h @@ -3,9 +3,14 @@ #include "Common/Common.h" enum class InvalidationFlags { - RENDER_PASS_STATE = 1, - COMMAND_BUFFER_STATE = 2, + CACHED_RENDER_STATE = 1, }; ENUM_CLASS_BITOPS(InvalidationFlags); -typedef std::function InvalidationCallback; +enum class InvalidationCallbackFlags { + RENDER_PASS_STATE = 1, + COMMAND_BUFFER_STATE = 2, +}; +ENUM_CLASS_BITOPS(InvalidationCallbackFlags); + +typedef std::function InvalidationCallback; diff --git a/Common/GPU/OpenGL/GLRenderManager.cpp b/Common/GPU/OpenGL/GLRenderManager.cpp index 034f4c672..f66b9b78f 100644 --- a/Common/GPU/OpenGL/GLRenderManager.cpp +++ b/Common/GPU/OpenGL/GLRenderManager.cpp @@ -356,7 +356,7 @@ void GLRenderManager::BindFramebufferAsRenderTarget(GLRFramebuffer *fb, GLRRende } if (invalidationCallback_) { - invalidationCallback_(InvalidationFlags::RENDER_PASS_STATE); + invalidationCallback_(InvalidationCallbackFlags::RENDER_PASS_STATE); } } diff --git a/Common/GPU/OpenGL/thin3d_gl.cpp b/Common/GPU/OpenGL/thin3d_gl.cpp index 0c9afd686..2842e7bff 100644 --- a/Common/GPU/OpenGL/thin3d_gl.cpp +++ b/Common/GPU/OpenGL/thin3d_gl.cpp @@ -467,7 +467,7 @@ public: void HandleEvent(Event ev, int width, int height, void *param1, void *param2) override {} - void InvalidateCachedState() override; + void Invalidate(InvalidationFlags flags) override; void SetInvalidationCallback(InvalidationCallback callback) override { renderManager_.SetInvalidationCallback(callback); @@ -761,18 +761,20 @@ void OpenGLContext::EndFrame() { renderManager_.EndPushBuffer(frameData.push); // upload the data! renderManager_.Finish(); - InvalidateCachedState(); + Invalidate(InvalidationFlags::CACHED_RENDER_STATE); } -void OpenGLContext::InvalidateCachedState() { - // Unbind stuff. - for (auto &texture : boundTextures_) { - texture = nullptr; +void OpenGLContext::Invalidate(InvalidationFlags flags) { + if (flags & InvalidationFlags::CACHED_RENDER_STATE) { + // Unbind stuff. + for (auto &texture : boundTextures_) { + texture = nullptr; + } + for (auto &sampler : boundSamplers_) { + sampler = nullptr; + } + curPipeline_ = nullptr; } - for (auto &sampler : boundSamplers_) { - sampler = nullptr; - } - curPipeline_ = nullptr; } InputLayout *OpenGLContext::CreateInputLayout(const InputLayoutDesc &desc) { diff --git a/Common/GPU/Vulkan/VulkanRenderManager.cpp b/Common/GPU/Vulkan/VulkanRenderManager.cpp index 2b67cbfeb..98fb8a3ed 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.cpp +++ b/Common/GPU/Vulkan/VulkanRenderManager.cpp @@ -752,7 +752,7 @@ void VulkanRenderManager::BindFramebufferAsRenderTarget(VKRFramebuffer *fb, VKRR } if (invalidationCallback_) { - invalidationCallback_(InvalidationFlags::RENDER_PASS_STATE); + invalidationCallback_(InvalidationCallbackFlags::RENDER_PASS_STATE); } } @@ -1213,7 +1213,7 @@ void VulkanRenderManager::Run(VKRRenderThreadTask &task) { // Called from main thread. void VulkanRenderManager::FlushSync() { if (invalidationCallback_) { - invalidationCallback_(InvalidationFlags::COMMAND_BUFFER_STATE); + invalidationCallback_(InvalidationCallbackFlags::COMMAND_BUFFER_STATE); } int curFrame = vulkan_->GetCurFrame(); diff --git a/Common/GPU/Vulkan/VulkanRenderManager.h b/Common/GPU/Vulkan/VulkanRenderManager.h index de36633c6..fcc843535 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.h +++ b/Common/GPU/Vulkan/VulkanRenderManager.h @@ -526,5 +526,5 @@ private: SimpleStat totalGPUTimeMs_; SimpleStat renderCPUTimeMs_; - std::function invalidationCallback_; + std::function invalidationCallback_; }; diff --git a/Common/GPU/Vulkan/thin3d_vulkan.cpp b/Common/GPU/Vulkan/thin3d_vulkan.cpp index 46be4cf00..0fc2acbf1 100644 --- a/Common/GPU/Vulkan/thin3d_vulkan.cpp +++ b/Common/GPU/Vulkan/thin3d_vulkan.cpp @@ -498,7 +498,7 @@ public: void HandleEvent(Event ev, int width, int height, void *param1, void *param2) override; - void InvalidateCachedState() override; + void Invalidate(InvalidationFlags flags) override; void InvalidateFramebuffer(FBInvalidationStage stage, uint32_t channels) override; @@ -1021,20 +1021,22 @@ void VKContext::EndFrame() { push_ = nullptr; // Unbind stuff, to avoid accidentally relying on it across frames (and provide some protection against forgotten unbinds of deleted things). - InvalidateCachedState(); + Invalidate(InvalidationFlags::CACHED_RENDER_STATE); } -void VKContext::InvalidateCachedState() { - curPipeline_ = nullptr; +void VKContext::Invalidate(InvalidationFlags flags) { + if (flags & InvalidationFlags::CACHED_RENDER_STATE) { + curPipeline_ = nullptr; - for (auto &view : boundImageView_) { - view = VK_NULL_HANDLE; - } - for (auto &sampler : boundSamplers_) { - sampler = nullptr; - } - for (auto &texture : boundTextures_) { - texture = nullptr; + for (auto &view : boundImageView_) { + view = VK_NULL_HANDLE; + } + for (auto &sampler : boundSamplers_) { + sampler = nullptr; + } + for (auto &texture : boundTextures_) { + texture = nullptr; + } } } diff --git a/Common/GPU/thin3d.h b/Common/GPU/thin3d.h index 6d58a1029..f36e0cf87 100644 --- a/Common/GPU/thin3d.h +++ b/Common/GPU/thin3d.h @@ -737,7 +737,7 @@ public: // Clear state cached within thin3d. Must be called after directly calling API functions. // Note that framebuffer state (which framebuffer is bounds) may not be cached. // Must not actually perform any API calls itself since this can be called when no framebuffer is bound for rendering. - virtual void InvalidateCachedState() = 0; + virtual void Invalidate(InvalidationFlags flags) = 0; virtual void BindPipeline(Pipeline *pipeline) = 0; diff --git a/GPU/Common/Draw2D.cpp b/GPU/Common/Draw2D.cpp index 2b8117823..b8b372261 100644 --- a/GPU/Common/Draw2D.cpp +++ b/GPU/Common/Draw2D.cpp @@ -330,7 +330,7 @@ void Draw2D::DrawStrip2D(Draw::Texture *tex, Draw2DVertex *verts, int vertexCoun draw_->BindSamplerStates(TEX_SLOT_PSP_TEXTURE, 1, linearFilter ? &draw2DSamplerLinear_ : &draw2DSamplerNearest_); draw_->DrawUP(verts, vertexCount); - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); gstate_c.Dirty(DIRTY_FRAGMENTSHADER_STATE | DIRTY_VERTEXSHADER_STATE); } diff --git a/GPU/Common/FramebufferManagerCommon.cpp b/GPU/Common/FramebufferManagerCommon.cpp index 7a18fc127..05521c047 100644 --- a/GPU/Common/FramebufferManagerCommon.cpp +++ b/GPU/Common/FramebufferManagerCommon.cpp @@ -664,7 +664,7 @@ void FramebufferManagerCommon::CopyToDepthFromOverlappingFramebuffers(VirtualFra // for (auto &source : sources) { if (!sources.empty()) { - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); auto &source = sources.back(); if (source.channel == RASTER_DEPTH) { @@ -804,7 +804,7 @@ void FramebufferManagerCommon::CopyToColorFromOverlappingFramebuffers(VirtualFra std::sort(sources.begin(), sources.end()); - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); bool tookActions = false; @@ -961,7 +961,7 @@ void FramebufferManagerCommon::BlitFramebufferDepth(VirtualFramebuffer *src, Vir RebindFramebuffer("After BlitFramebufferDepth"); } - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); } void FramebufferManagerCommon::NotifyRenderFramebufferCreated(VirtualFramebuffer *vfb) { @@ -1137,7 +1137,7 @@ void FramebufferManagerCommon::DrawPixels(VirtualFramebuffer *vfb, int dstX, int gpuStats.numUploads++; pixelsTex->Release(); - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); gstate_c.Dirty(DIRTY_ALL_RENDER_STATE); } @@ -2777,7 +2777,7 @@ void FramebufferManagerCommon::ReadFramebufferToMemory(VirtualFramebuffer *vfb, } } - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); textureCache_->ForgetLastTexture(); RebindFramebuffer("RebindFramebuffer - ReadFramebufferToMemory"); } @@ -2840,7 +2840,7 @@ void FramebufferManagerCommon::DownloadFramebufferForClut(u32 fb_address, u32 lo } void FramebufferManagerCommon::RebindFramebuffer(const char *tag) { - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); shaderManager_->DirtyLastShader(); if (currentRenderVfb_ && currentRenderVfb_->fbo) { draw_->BindFramebufferAsRenderTarget(currentRenderVfb_->fbo, { Draw::RPAction::KEEP, Draw::RPAction::KEEP, Draw::RPAction::KEEP }, tag); @@ -3064,7 +3064,7 @@ void FramebufferManagerCommon::BlitFramebuffer(VirtualFramebuffer *dst, int dstX BlitUsingRaster(srcFBO, srcX1, srcY1, srcX2, srcY2, dst->fbo, dstX1, dstY1, dstX2, dstY2, false, dst->renderScaleFactor, pipeline, tag); } - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); gstate_c.Dirty(DIRTY_ALL_RENDER_STATE); } diff --git a/GPU/Common/PresentationCommon.cpp b/GPU/Common/PresentationCommon.cpp index 0c3030b63..5980bbb95 100644 --- a/GPU/Common/PresentationCommon.cpp +++ b/GPU/Common/PresentationCommon.cpp @@ -605,7 +605,7 @@ void PresentationCommon::UpdateUniforms(bool hasVideo) { } void PresentationCommon::CopyToOutput(OutputFlags flags, int uvRotation, float u0, float v0, float u1, float v1) { - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); // TODO: If shader objects have been created by now, we might have received errors. // GLES can have the shader fail later, shader->failed / shader->error. @@ -869,7 +869,7 @@ void PresentationCommon::CopyToOutput(OutputFlags flags, int uvRotation, float u DoRelease(srcTexture_); // Unbinds all textures and samplers too, needed since sometimes a MakePixelTexture is deleted etc. - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); previousUniforms_ = uniforms; } diff --git a/GPU/Common/StencilCommon.cpp b/GPU/Common/StencilCommon.cpp index c879154e4..31c10ecab 100644 --- a/GPU/Common/StencilCommon.cpp +++ b/GPU/Common/StencilCommon.cpp @@ -357,7 +357,7 @@ bool FramebufferManagerCommon::PerformWriteStencilFromMemory(u32 addr, int size, } tex->Release(); - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); gstate_c.Dirty(DIRTY_ALL_RENDER_STATE); return true; } diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index a6c158260..f5e7bc288 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -2187,7 +2187,7 @@ void TextureCacheCommon::ApplyTextureFramebuffer(VirtualFramebuffer *framebuffer CheckAlphaResult alphaStatus = CheckCLUTAlpha((const uint8_t *)clutBufRaw_, clutFormat, clutTotalColors); gstate_c.SetTextureFullAlpha(alphaStatus == CHECKALPHA_FULL); - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); InvalidateLastTexture(); return; } @@ -2262,7 +2262,7 @@ void TextureCacheCommon::ApplyTextureFramebuffer(VirtualFramebuffer *framebuffer CheckAlphaResult alphaStatus = CheckCLUTAlpha((const uint8_t *)clutBufRaw_, clutFormat, clutTotalColors); gstate_c.SetTextureFullAlpha(alphaStatus == CHECKALPHA_FULL); - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); shaderManager_->DirtyLastShader(); } else { framebufferManager_->RebindFramebuffer("ApplyTextureFramebuffer"); @@ -2363,7 +2363,7 @@ void TextureCacheCommon::ApplyTextureDepal(TexCacheEntry *entry) { // We don't know about alpha at all. gstate_c.SetTextureFullAlpha(false); - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); shaderManager_->DirtyLastShader(); SamplerCacheKey samplerKey = GetFramebufferSamplingParams(texWidth, texHeight); diff --git a/GPU/D3D11/DrawEngineD3D11.cpp b/GPU/D3D11/DrawEngineD3D11.cpp index 3d66b8c37..304d325ea 100644 --- a/GPU/D3D11/DrawEngineD3D11.cpp +++ b/GPU/D3D11/DrawEngineD3D11.cpp @@ -327,8 +327,8 @@ VertexArrayInfoD3D11::~VertexArrayInfoD3D11() { } // In D3D, we're synchronous and state carries over so all we reset here on a new step is the viewport/scissor. -void DrawEngineD3D11::Invalidate(InvalidationFlags flags) { - if (flags & InvalidationFlags::RENDER_PASS_STATE) { +void DrawEngineD3D11::Invalidate(InvalidationCallbackFlags flags) { + if (flags & InvalidationCallbackFlags::RENDER_PASS_STATE) { gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_TEXTURE_IMAGE | DIRTY_TEXTURE_PARAMS); } } diff --git a/GPU/D3D11/DrawEngineD3D11.h b/GPU/D3D11/DrawEngineD3D11.h index 8245cae6a..468c8cd3b 100644 --- a/GPU/D3D11/DrawEngineD3D11.h +++ b/GPU/D3D11/DrawEngineD3D11.h @@ -155,7 +155,7 @@ public: void ClearInputLayoutMap(); private: - void Invalidate(InvalidationFlags flags); + void Invalidate(InvalidationCallbackFlags flags); void DoFlush(); diff --git a/GPU/D3D11/GPU_D3D11.cpp b/GPU/D3D11/GPU_D3D11.cpp index 734e703df..8259d9fb5 100644 --- a/GPU/D3D11/GPU_D3D11.cpp +++ b/GPU/D3D11/GPU_D3D11.cpp @@ -131,7 +131,7 @@ void GPU_D3D11::BuildReportingInfo() { } void GPU_D3D11::DeviceLost() { - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); // Simply drop all caches and textures. // FBOs appear to survive? Or no? shaderManagerD3D11_->ClearShaders(); diff --git a/GPU/Directx9/DrawEngineDX9.cpp b/GPU/Directx9/DrawEngineDX9.cpp index e22d5577d..c1123b05d 100644 --- a/GPU/Directx9/DrawEngineDX9.cpp +++ b/GPU/Directx9/DrawEngineDX9.cpp @@ -312,8 +312,8 @@ void DrawEngineDX9::BeginFrame() { } // In D3D, we're synchronous and state carries over so all we reset here on a new step is the viewport/scissor. -void DrawEngineDX9::Invalidate(InvalidationFlags flags) { - if (flags & InvalidationFlags::RENDER_PASS_STATE) { +void DrawEngineDX9::Invalidate(InvalidationCallbackFlags flags) { + if (flags & InvalidationCallbackFlags::RENDER_PASS_STATE) { gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_TEXTURE_IMAGE | DIRTY_TEXTURE_PARAMS); } } diff --git a/GPU/Directx9/DrawEngineDX9.h b/GPU/Directx9/DrawEngineDX9.h index aa2baf5cf..3bc7222a6 100644 --- a/GPU/Directx9/DrawEngineDX9.h +++ b/GPU/Directx9/DrawEngineDX9.h @@ -144,7 +144,7 @@ protected: void DecimateTrackedVertexArrays(); private: - void Invalidate(InvalidationFlags flags); + void Invalidate(InvalidationCallbackFlags flags); void DoFlush(); void ApplyDrawState(int prim); diff --git a/GPU/GLES/DrawEngineGLES.cpp b/GPU/GLES/DrawEngineGLES.cpp index 56051f6a3..2907929f1 100644 --- a/GPU/GLES/DrawEngineGLES.cpp +++ b/GPU/GLES/DrawEngineGLES.cpp @@ -247,8 +247,8 @@ void *DrawEngineGLES::DecodeVertsToPushBuffer(GLPushBuffer *push, uint32_t *bind // A new render step means we need to flush any dynamic state. Really, any state that is reset in // GLQueueRunner::PerformRenderPass. -void DrawEngineGLES::Invalidate(InvalidationFlags flags) { - if (flags & InvalidationFlags::RENDER_PASS_STATE) { +void DrawEngineGLES::Invalidate(InvalidationCallbackFlags flags) { + if (flags & InvalidationCallbackFlags::RENDER_PASS_STATE) { // Dirty everything that has dynamic state that will need re-recording. gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_BLEND_STATE | DIRTY_RASTER_STATE | DIRTY_TEXTURE_IMAGE | DIRTY_TEXTURE_PARAMS); } diff --git a/GPU/GLES/DrawEngineGLES.h b/GPU/GLES/DrawEngineGLES.h index ed8e18f29..a1a8adce9 100644 --- a/GPU/GLES/DrawEngineGLES.h +++ b/GPU/GLES/DrawEngineGLES.h @@ -116,7 +116,7 @@ protected: bool UpdateUseHWTessellation(bool enable) override; private: - void Invalidate(InvalidationFlags flags); + void Invalidate(InvalidationCallbackFlags flags); void InitDeviceObjects(); void DestroyDeviceObjects(); diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index cd3aaeb9d..b80701846 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -492,7 +492,7 @@ void GPUCommon::BeginHostFrame() { void GPUCommon::EndHostFrame() { // Probably not necessary. if (draw_) { - draw_->InvalidateCachedState(); + draw_->Invalidate(InvalidationFlags::CACHED_RENDER_STATE); } } diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index 8256ea891..fdb9c263f 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -544,11 +544,11 @@ void MarkUnreliable(VertexArrayInfoVulkan *vai) { // For now we just leave it in the pushbuffer. } -void DrawEngineVulkan::Invalidate(InvalidationFlags flags) { - if (flags & InvalidationFlags::COMMAND_BUFFER_STATE) { +void DrawEngineVulkan::Invalidate(InvalidationCallbackFlags flags) { + if (flags & InvalidationCallbackFlags::COMMAND_BUFFER_STATE) { GetCurFrame().frameDescSetUpdated = false; } - if (flags & InvalidationFlags::RENDER_PASS_STATE) { + if (flags & InvalidationCallbackFlags::RENDER_PASS_STATE) { // If have a new render pass, dirty our dynamic state so it gets re-set. // // Dirty everything that has dynamic state that will need re-recording. diff --git a/GPU/Vulkan/DrawEngineVulkan.h b/GPU/Vulkan/DrawEngineVulkan.h index d9f1339e5..239be5539 100644 --- a/GPU/Vulkan/DrawEngineVulkan.h +++ b/GPU/Vulkan/DrawEngineVulkan.h @@ -209,7 +209,7 @@ public: } private: - void Invalidate(InvalidationFlags flags); + void Invalidate(InvalidationCallbackFlags flags); struct FrameData; void ApplyDrawStateLate(VulkanRenderManager *renderManager, bool applyStencilRef, uint8_t stencilRef, bool useBlendConstant);