diff --git a/Common/GPU/Vulkan/VulkanRenderManager.h b/Common/GPU/Vulkan/VulkanRenderManager.h index 32e5c7ccf318..80270eb3787a 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.h +++ b/Common/GPU/Vulkan/VulkanRenderManager.h @@ -241,8 +241,7 @@ class VulkanRenderManager { } void BindPipeline(VKRGraphicsPipeline *pipeline, PipelineFlags flags, VkPipelineLayout pipelineLayout) { - _dbg_assert_(curRenderStep_ && curRenderStep_->stepType == VKRStepType::RENDER); - _dbg_assert_(pipeline != nullptr); + _assert_(curRenderStep_ && curRenderStep_->stepType == VKRStepType::RENDER && pipeline != nullptr); VkRenderData &data = curRenderStep_->commands.push_uninitialized(); data.cmd = VKRRenderCommand::BIND_GRAPHICS_PIPELINE; pipelinesToCheck_.push_back(pipeline); diff --git a/Common/UI/UIScreen.cpp b/Common/UI/UIScreen.cpp index 6cb3b54d1fa0..520375dae502 100644 --- a/Common/UI/UIScreen.cpp +++ b/Common/UI/UIScreen.cpp @@ -91,19 +91,19 @@ bool UIScreen::UnsyncTouch(const TouchInput &touch) { } } - std::lock_guard guard(eventQueueLock_); QueuedEvent ev{}; ev.type = QueuedEventType::TOUCH; ev.touch = touch; + std::lock_guard guard(eventQueueLock_); eventQueue_.push_back(ev); return false; } void UIScreen::UnsyncAxis(const AxisInput &axis) { - std::lock_guard guard(eventQueueLock_); QueuedEvent ev{}; ev.type = QueuedEventType::AXIS; ev.axis = axis; + std::lock_guard guard(eventQueueLock_); eventQueue_.push_back(ev); } @@ -123,10 +123,10 @@ bool UIScreen::UnsyncKey(const KeyInput &key) { } } - std::lock_guard guard(eventQueueLock_); QueuedEvent ev{}; ev.type = QueuedEventType::KEY; ev.key = key; + std::lock_guard guard(eventQueueLock_); eventQueue_.push_back(ev); return retval; } diff --git a/GPU/Vulkan/PipelineManagerVulkan.cpp b/GPU/Vulkan/PipelineManagerVulkan.cpp index 1f96662bf5b9..dea7a0201a02 100644 --- a/GPU/Vulkan/PipelineManagerVulkan.cpp +++ b/GPU/Vulkan/PipelineManagerVulkan.cpp @@ -180,6 +180,7 @@ static std::string CutFromMain(std::string str) { static VulkanPipeline *CreateVulkanPipeline(VulkanRenderManager *renderManager, VkPipelineCache pipelineCache, VkPipelineLayout layout, PipelineFlags pipelineFlags, VkSampleCountFlagBits sampleCount, const VulkanPipelineRasterStateKey &key, const DecVtxFormat *decFmt, VulkanVertexShader *vs, VulkanFragmentShader *fs, VulkanGeometryShader *gs, bool useHwTransform, u32 variantBitmask, bool cacheLoad) { + _assert_(fs && vs); if (!fs->GetModule()) { ERROR_LOG(G3D, "Fragment shader missing in CreateVulkanPipeline"); @@ -189,6 +190,10 @@ static VulkanPipeline *CreateVulkanPipeline(VulkanRenderManager *renderManager, ERROR_LOG(G3D, "Vertex shader missing in CreateVulkanPipeline"); return nullptr; } + if (gs && !gs->GetModule()) { + ERROR_LOG(G3D, "Geometry shader missing in CreateVulkanPipeline"); + return nullptr; + } VulkanPipeline *vulkanPipeline = new VulkanPipeline(); vulkanPipeline->desc = new VKRGraphicsPipelineDesc(); diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 13ef0d39fdd0..d82ed51ae39d 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -844,16 +844,16 @@ bool EmuScreen::UnsyncKey(const KeyInput &key) { System_Notify(SystemNotification::ACTIVITY); if (UI::IsFocusMovementEnabled()) { - if (UIScreen::UnsyncKey(key)) { - return true; - } else if ((key.flags & KEY_DOWN) != 0 && UI::IsEscapeKey(key)) { + bool retval = UIScreen::UnsyncKey(key); + if ((key.flags & KEY_DOWN) != 0 && UI::IsEscapeKey(key)) { if (chatMenu_) chatMenu_->Close(); if (chatButton_) chatButton_->SetVisibility(UI::V_VISIBLE); UI::EnableFocusMovement(false); - return true; + retval = true; } + return retval; } return controlMapper_.Key(key, &pauseTrigger_);