summaryrefslogtreecommitdiff
path: root/src/gpu/gpu.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gpu.cc')
-rw-r--r--src/gpu/gpu.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gpu/gpu.cc b/src/gpu/gpu.cc
index db79b9d..b9545bf 100644
--- a/src/gpu/gpu.cc
+++ b/src/gpu/gpu.cc
@@ -3,9 +3,9 @@
// Driven by audio peaks for synchronized visual effects.
#include "gpu.h"
-#include "platform.h"
#include "demo_effects.h"
#include "effect.h"
+#include "platform.h"
#include <GLFW/glfw3.h>
#include <math.h>
@@ -23,19 +23,21 @@
// --- WebGPU Headers & Compatibility ---
#if defined(DEMO_CROSS_COMPILE_WIN32)
// Renamed Types/Enums
-#define WGPUSType_ShaderSourceWGSL WGPUSType_ShaderModuleWGSLDescriptor
-using WGPUShaderSourceWGSL = WGPUShaderModuleWGSLDescriptor;
-#define WGPUSurfaceGetCurrentTextureStatus_SuccessOptimal WGPUSurfaceGetCurrentTextureStatus_Success
-#define WGPUSurfaceGetCurrentTextureStatus_SuccessSuboptimal WGPUSurfaceGetCurrentTextureStatus_Success
+#define WGPUSurfaceGetCurrentTextureStatus_SuccessOptimal \
+ WGPUSurfaceGetCurrentTextureStatus_Success
+#define WGPUSurfaceGetCurrentTextureStatus_SuccessSuboptimal \
+ WGPUSurfaceGetCurrentTextureStatus_Success
#define WGPUCallbackMode_WaitAnyOnly 0
-static void wgpuInstanceWaitAny(WGPUInstance instance, size_t, void *, uint64_t) {
+static void wgpuInstanceWaitAny(WGPUInstance instance, size_t, void *,
+ uint64_t) {
wgpuInstanceProcessEvents(instance);
}
static void set_error_callback(WGPUDevice device, WGPUErrorCallback callback) {
wgpuDeviceSetUncapturedErrorCallback(device, callback, nullptr);
}
#else
-static void set_error_callback(WGPUDevice device, WGPUUncapturedErrorCallback callback) {
+static void set_error_callback(WGPUDevice device,
+ WGPUUncapturedErrorCallback callback) {
// Handled in descriptor for new API.
}
#endif