default conservative Vulkan paths

This commit is contained in:
mchughalex 2026-06-30 23:19:47 +01:00
parent 4741ffbbd2
commit b9643cd8e1
4 changed files with 18 additions and 12 deletions

View file

@ -137,7 +137,7 @@ REXCVAR_DEFINE_BOOL(vulkan_skip_inert_no_pixel_draws, false, "GPU/Vulkan",
"occlusion side effects")
.lifecycle(rex::cvar::Lifecycle::kHotReload);
REXCVAR_DEFINE_BOOL(vulkan_reuse_transient_texture_descriptors, true, "GPU/Vulkan",
REXCVAR_DEFINE_BOOL(vulkan_reuse_transient_texture_descriptors, false, "GPU/Vulkan",
"Reuse texture/sampler descriptor sets within a frame when the bindings are "
"unchanged instead of allocating and writing new ones for every draw")
.lifecycle(rex::cvar::Lifecycle::kHotReload);
@ -147,7 +147,7 @@ REXCVAR_DEFINE_BOOL(vulkan_push_constants_descriptors, false, "GPU/Vulkan",
"instead of allocating and writing a transient descriptor set whenever "
"constants change (requires driver support; applied at startup)");
REXCVAR_DEFINE_BOOL(vulkan_reuse_unchanged_draw_bindings, true, "GPU/Vulkan",
REXCVAR_DEFINE_BOOL(vulkan_reuse_unchanged_draw_bindings, false, "GPU/Vulkan",
"Skip the per-draw sampler cache walks and texture descriptor "
"gathering/hashing entirely when the previous draw in the same submission "
"used the same shaders with identical sampler parameters and texture "

View file

@ -43,7 +43,7 @@ REXCVAR_DEFINE_STRING(render_target_path_vulkan, "", "GPU/Vulkan",
"Vulkan render target implementation path")
.lifecycle(rex::cvar::Lifecycle::kInitOnly);
REXCVAR_DEFINE_BOOL(vulkan_direct_resolve_fast32, true, "GPU/Vulkan",
REXCVAR_DEFINE_BOOL(vulkan_direct_resolve_fast32, false, "GPU/Vulkan",
"Resolve single-sampled 32bpp color render targets with a single compute "
"dispatch reading the host render target directly, instead of the render "
"target dump -> EDRAM buffer -> copy round trip (requires "
@ -1546,7 +1546,7 @@ bool VulkanRenderTargetCache::Resolve(const memory::Memory& memory,
// Submit the resolve.
if (draw_resolution_scaled) {
texture_cache.UseScaledResolveBufferForWrite(copy_dest_base, copy_dest_range_length);
texture_cache.UseScaledResolveBufferForWrite(copy_dest_use_start, copy_dest_use_length);
} else {
shared_memory.Use(VulkanSharedMemory::Usage::kComputeWrite,
std::pair<uint32_t, uint32_t>(uint32_t(copy_dest_use_start),

View file

@ -47,13 +47,13 @@ REXCVAR_DEFINE_INT32(vulkan_debug_log_3d_as_2d_remaining, 0, "GPU/Vulkan",
.lifecycle(rex::cvar::Lifecycle::kHotReload)
.debug_only();
REXCVAR_DEFINE_BOOL(vulkan_texel_buffer_texture_loads, false, "GPU/Vulkan",
REXCVAR_DEFINE_BOOL(vulkan_texel_buffer_texture_loads, true, "GPU/Vulkan",
"Read guest texture data through uniform texel buffers instead of raw "
"storage buffer loads where a texel-buffer variant of the load shader is "
"available - much faster for the tiled access pattern on some hosts")
.lifecycle(rex::cvar::Lifecycle::kHotReload);
REXCVAR_DEFINE_BOOL(vulkan_storage_image_texture_loads, false, "GPU/Vulkan",
REXCVAR_DEFINE_BOOL(vulkan_storage_image_texture_loads, true, "GPU/Vulkan",
"Write guest texture data directly from the load shader through a storage "
"image where a variant of the load shader is available, instead of going "
"through an intermediate buffer and a buffer-to-image copy - the copy is "

View file

@ -682,7 +682,8 @@ bool VulkanPresenter::CaptureGuestOutput(RawImage& image_out) {
if (submit_result != VK_SUCCESS) {
REXLOG_ERROR(
"VulkanPresenter: Failed to submit the guest output capturing "
"command buffer");
"command buffer ({})",
vk::to_string(vk::Result(submit_result)));
fence_acqusition.SubmissionFailedOrDropped();
dfn.vkDestroyCommandPool(device, command_pool, nullptr);
dfn.vkDestroyBuffer(device, buffer, nullptr);
@ -1645,7 +1646,8 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(bool execute_ui_draw
case VK_ERROR_DEVICE_LOST:
REXLOG_ERROR(
"VulkanPresenter: Failed to acquire the swapchain image as the "
"device has been lost");
"device has been lost ({})",
vk::to_string(vk::Result(acquire_result)));
return PaintResult::kGpuLostResponsible;
case VK_ERROR_OUT_OF_DATE_KHR:
case VK_ERROR_SURFACE_LOST_KHR:
@ -1657,7 +1659,8 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(bool execute_ui_draw
"dropped as the swapchain or the surface has become outdated");
return PaintResult::kNotPresentedConnectionOutdated;
default:
REXLOG_ERROR("VulkanPresenter: Failed to acquire the swapchain image");
REXLOG_ERROR("VulkanPresenter: Failed to acquire the swapchain image ({})",
vk::to_string(vk::Result(acquire_result)));
return PaintResult::kNotPresented;
}
@ -2281,7 +2284,8 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(bool execute_ui_draw
}
}
if (submit_result != VK_SUCCESS) {
REXLOG_ERROR("VulkanPresenter: Failed to submit command buffers");
REXLOG_ERROR("VulkanPresenter: Failed to submit command buffers ({})",
vk::to_string(vk::Result(submit_result)));
fence_acqusition.SubmissionFailedOrDropped();
ui_fence_acquisition.SubmissionFailedOrDropped();
if (ui_setup_command_buffer_index != SIZE_MAX) {
@ -2333,7 +2337,8 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(bool execute_ui_draw
case VK_ERROR_DEVICE_LOST:
REXLOG_ERROR(
"VulkanPresenter: Failed to present the swapchain image as the "
"device has been lost");
"device has been lost ({})",
vk::to_string(vk::Result(present_result)));
return PaintResult::kGpuLostResponsible;
case VK_ERROR_OUT_OF_DATE_KHR:
case VK_ERROR_SURFACE_LOST_KHR:
@ -2347,7 +2352,8 @@ Presenter::PaintResult VulkanPresenter::PaintAndPresentImpl(bool execute_ui_draw
// however, this should have no effect on anything here likely.
return PaintResult::kNotPresentedConnectionOutdated;
default:
REXLOG_ERROR("VulkanPresenter: Failed to present the swapchain image");
REXLOG_ERROR("VulkanPresenter: Failed to present the swapchain image ({})",
vk::to_string(vk::Result(present_result)));
// The image is in an acquired state - but now, it will be in it forever.
// To avoid that, recreate the swapchain - don't return just
// kNotPresented.