Skip to content

Commit 3f96ba2

Browse files
committed
Skip wgpu_gpu::oom::query_set_oom_test on Vulkan.
Vulkan's `VK_EXT_memory_budget` extension doesn't cover query sets, so `wgpu_hal::vulkan::Device::error_if_would_oom_on_resource_allocation`'s tactic doesn't work to anticipate OOM errors from the Vulkan driver when creating query sets. Without these checks, `wgpu_gpu::oom::query_set_oom_test` actually consumes a significant amount of memory and attracts the attention of the system's OOM killer. While it does get killed, the situation tends to adversely affect the stability of the rest of the system, and thus is not a friendly thing for a test run to do (#7817). This change can be reverted once a suitable accounting method for query sets has been implemented on Vulkan.
1 parent 3a5d0f2 commit 3f96ba2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/tests/wgpu-gpu/oom.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ use wgpu_test::{gpu_test, FailureCase, GpuTestConfiguration, TestParameters};
1313
/// Backends for which OOM detection is implemented
1414
const OOM_DETECTION_IMPL: Backends = Backends::DX12.union(Backends::VULKAN);
1515

16+
/// Backends for which query set OOM detection is implemented
17+
const QUERY_SET_OOM_DETECTION_IMPL: Backends = Backends::DX12;
18+
1619
// All tests skip llvmpipe.
1720
// Even though llvmpipe supports VK_EXT_memory_budget it's happy to continue creating resources until
1821
// the process crashes with SIGABRT "memory allocation of X bytes failed" or the test times out.
@@ -125,7 +128,8 @@ static MAPPING_BUFFER_OOM_TEST: GpuTestConfiguration = GpuTestConfiguration::new
125128
static QUERY_SET_OOM_TEST: GpuTestConfiguration = GpuTestConfiguration::new()
126129
.parameters(
127130
TestParameters::default()
128-
.skip(FailureCase::backend(!OOM_DETECTION_IMPL))
131+
// Vulkan: https://github.com/gfx-rs/wgpu/issues/7817
132+
.skip(FailureCase::backend(!QUERY_SET_OOM_DETECTION_IMPL))
129133
// see comment at the top of the file
130134
.skip(FailureCase::backend_adapter(Backends::VULKAN, "llvmpipe")),
131135
)

0 commit comments

Comments
 (0)