vk_blit_helper: Fix android crashes

This commit is contained in:
GPUCode
2023-01-28 22:38:35 +02:00
parent b18710e4df
commit bd3571db5a
3 changed files with 9 additions and 0 deletions

View File

@@ -476,6 +476,10 @@ void BlitHelper::MakeComputePipelines() {
}
vk::Pipeline BlitHelper::MakeDepthStencilBlitPipeline() {
if (!instance.IsShaderStencilExportSupported()) {
return VK_NULL_HANDLE;
}
const std::array stages = MakeStages(full_screen_vert, blit_depth_stencil_frag);
const VideoCore::PixelFormat depth_stencil = VideoCore::PixelFormat::D24S8;
const vk::Format depth_stencil_format = instance.GetTraits(depth_stencil).native;

View File

@@ -5,6 +5,7 @@
#pragma once
#include <cstring>
#include <compare>
#include <variant>
#include "common/hash.h"
#include "video_core/rasterizer_cache/pixel_format.h"

View File

@@ -112,6 +112,10 @@ void Swapchain::AcquireNextImage() {
MICROPROFILE_DEFINE(Vulkan_Present, "Vulkan", "Swapchain Present", MP_RGB(66, 185, 245));
void Swapchain::Present() {
scheduler.Record([this, index = image_index](vk::CommandBuffer) {
if (NeedsRecreation()) [[unlikely]] {
return;
}
const vk::PresentInfoKHR present_info = {
.waitSemaphoreCount = 1,
.pWaitSemaphores = &present_ready[index],