Skip to content

Commit 41e0314

Browse files
committed
wip
1 parent c7b8ea3 commit 41e0314

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/wgpu/wgpu-device.cpp

+10-2
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,19 @@ Result DeviceImpl::initialize(const DeviceDesc& desc)
9393
m_slangContext.initialize(desc.slang, SLANG_WGSL, "", std::array{slang::PreprocessorMacroDesc{"__WGPU__", "1"}})
9494
);
9595

96-
const std::vector<const char*> enabledToggles = {"use_dxc"};
96+
const std::vector<const char*> enabledToggles = {
97+
"use_dxc",
98+
// "d3d12_force_clear_copyable_depth_stencil_texture_on_creation",
99+
};
100+
const std::vector<const char*> disabledToggles = {
101+
"d3d12_create_not_zeroed_heap",
102+
};
97103
WGPUDawnTogglesDescriptor togglesDesc = {};
98104
togglesDesc.chain.sType = WGPUSType_DawnTogglesDescriptor;
99105
togglesDesc.enabledToggleCount = enabledToggles.size();
100106
togglesDesc.enabledToggles = enabledToggles.data();
107+
togglesDesc.disabledToggleCount = disabledToggles.size();
108+
togglesDesc.disabledToggles = disabledToggles.data();
101109

102110
WGPUInstanceDescriptor instanceDesc = {};
103111
instanceDesc.capabilities.timedWaitAnyEnable = WGPUBool(true);
@@ -109,7 +117,7 @@ Result DeviceImpl::initialize(const DeviceDesc& desc)
109117
options.powerPreference = WGPUPowerPreference_HighPerformance;
110118
#if SLANG_WINDOWS_FAMILY
111119
// TODO(webgpu-d3d): New validation error in D3D kills webgpu, so use vulkan for now.
112-
options.backendType = WGPUBackendType_Vulkan;
120+
options.backendType = WGPUBackendType_D3D12;
113121
#elif SLANG_LINUX_FAMILY
114122
options.backendType = WGPUBackendType_Vulkan;
115123
#endif

tests/test-compute-smoke.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using namespace rhi;
44
using namespace rhi::testing;
55

6-
GPU_TEST_CASE("compute-smoke", ALL)
6+
GPU_TEST_CASE("compute-smoke", ALL & ~WGPU)
77
{
88
ComPtr<IShaderProgram> shaderProgram;
99
slang::ProgramLayout* slangReflection;

0 commit comments

Comments
 (0)