vk: Do not access async scheduler if not explicitly initialized
Some checks failed
Generate Translation Template / Generate Translation Template (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux-aarch64.sh, gcc, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (51ae32f468089a8169aaf1567de355ff4a3e0842, rpcs3/rpcs3-binaries-mac, .ci/build-mac.sh, Intel) (push) Has been cancelled
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (8e21bdbc40711a3fccd18fbf17b742348b0f4281, rpcs3/rpcs3-binaries-mac-arm64, .ci/build-mac-arm64.sh, Apple Silicon) (push) Has been cancelled
Build RPCS3 / RPCS3 Windows (push) Has been cancelled
Build RPCS3 / RPCS3 Windows Clang (win64, clang, clang64) (push) Has been cancelled
Build RPCS3 / RPCS3 FreeBSD (push) Has been cancelled

This commit is contained in:
kd-11 2025-10-18 03:29:49 +03:00 committed by kd-11
parent c4fba680d1
commit 0c4e7fc178
3 changed files with 8 additions and 7 deletions

View file

@ -505,16 +505,17 @@ void VKGSRender::load_texture_env()
}
}
if (g_cfg.video.vk.asynchronous_texture_streaming)
if (backend_config.supports_asynchronous_compute)
{
// We have to do this here, because we have to assume the CB will be dumped
auto& async_task_scheduler = g_fxo->get<vk::AsyncTaskScheduler>();
auto async_task_scheduler = g_fxo->try_get<vk::AsyncTaskScheduler>();
if (async_task_scheduler.is_recording() &&
!async_task_scheduler.is_host_mode())
if (async_task_scheduler &&
async_task_scheduler->is_recording() &&
!async_task_scheduler->is_host_mode())
{
// Sync any async scheduler tasks
if (auto ev = async_task_scheduler.get_primary_sync_label())
if (auto ev = async_task_scheduler->get_primary_sync_label())
{
ev->gpu_wait(*m_current_command_buffer, m_async_compute_dependency_info);
}

View file

@ -867,7 +867,7 @@ namespace vk
static const vk::command_buffer& prepare_for_transfer(const vk::command_buffer& primary_cb, vk::image* dst_image, rsx::flags32_t& flags)
{
AsyncTaskScheduler* async_scheduler = (flags & image_upload_options::upload_contents_async)
? std::addressof(g_fxo->get<AsyncTaskScheduler>())
? g_fxo->try_get<AsyncTaskScheduler>()
: nullptr;
if (async_scheduler && (dst_image->aspect() & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)))

View file

@ -1115,7 +1115,7 @@ namespace vk
const bool upload_async = rsx::get_current_renderer()->get_backend_config().supports_asynchronous_compute;
rsx::flags32_t create_flags = 0;
if (upload_async && g_fxo->get<AsyncTaskScheduler>().is_host_mode())
if (upload_async && ensure(g_fxo->try_get<AsyncTaskScheduler>())->is_host_mode())
{
create_flags |= texture_create_flags::do_not_reuse;
if (m_device->get_graphics_queue() != m_device->get_transfer_queue())