summaryrefslogtreecommitdiff
path: root/src/gpu/effect.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-08 09:12:48 +0100
committerskal <pascal.massimino@gmail.com>2026-02-08 09:12:48 +0100
commitec98466b62797fe7e71f35f009a891e72f4ae85a (patch)
tree0f86391c020a6d223ccd4a46ccc9c45aa87fe866 /src/gpu/effect.cc
parent16c2cdce6ad1d89d3c537f2c2cff743449925125 (diff)
Revert "feat(platform): Centralize platform-specific WebGPU code and improve shader composition"
This reverts commit 16c2cdce6ad1d89d3c537f2c2cff743449925125.
Diffstat (limited to 'src/gpu/effect.cc')
-rw-r--r--src/gpu/effect.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/effect.cc b/src/gpu/effect.cc
index 9e769eb..a1b45f1 100644
--- a/src/gpu/effect.cc
+++ b/src/gpu/effect.cc
@@ -260,7 +260,9 @@ void MainSequence::render_frame(float global_time, float beat, float peak,
scene_attachment.loadOp = WGPULoadOp_Clear;
scene_attachment.storeOp = WGPUStoreOp_Store;
scene_attachment.clearValue = {0, 0, 0, 1};
+#if !defined(DEMO_CROSS_COMPILE_WIN32)
scene_attachment.depthSlice = WGPU_DEPTH_SLICE_UNDEFINED;
+#endif /* !defined(DEMO_CROSS_COMPILE_WIN32) */
WGPURenderPassDepthStencilAttachment depth_attachment = {};
depth_attachment.view = depth_view_;
@@ -300,7 +302,9 @@ void MainSequence::render_frame(float global_time, float beat, float peak,
final_attachment.resolveTarget = nullptr;
final_attachment.loadOp = WGPULoadOp_Load;
final_attachment.storeOp = WGPUStoreOp_Store;
+#if !defined(DEMO_CROSS_COMPILE_WIN32)
final_attachment.depthSlice = WGPU_DEPTH_SLICE_UNDEFINED;
+#endif /* !defined(DEMO_CROSS_COMPILE_WIN32) */
WGPURenderPassDescriptor final_desc = {
.colorAttachmentCount = 1, .colorAttachments = &final_attachment};
WGPURenderPassEncoder final_pass =
@@ -334,7 +338,9 @@ void MainSequence::render_frame(float global_time, float beat, float peak,
pp_attachment.resolveTarget = nullptr;
pp_attachment.loadOp = WGPULoadOp_Load;
pp_attachment.storeOp = WGPUStoreOp_Store;
+#if !defined(DEMO_CROSS_COMPILE_WIN32)
pp_attachment.depthSlice = WGPU_DEPTH_SLICE_UNDEFINED;
+#endif /* !defined(DEMO_CROSS_COMPILE_WIN32) */
WGPURenderPassDescriptor pp_desc = {.colorAttachmentCount = 1,
.colorAttachments = &pp_attachment};
WGPURenderPassEncoder pp_pass =