summaryrefslogtreecommitdiff
path: root/src/gpu
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-01-28 09:34:55 +0100
committerskal <pascal.massimino@gmail.com>2026-01-28 09:34:55 +0100
commitb8d42b0ccdc3ead63e541c9d38ca33bfe7bf7c65 (patch)
tree0dcf98485c72f4bffc73209cdbcea6efebbefe4a /src/gpu
parent7631eaa56df1aea834998e9ce829bfb5937cdfdc (diff)
update asset system
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/gpu.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gpu/gpu.cc b/src/gpu/gpu.cc
index f32f049..43aef7c 100644
--- a/src/gpu/gpu.cc
+++ b/src/gpu/gpu.cc
@@ -148,10 +148,9 @@ void gpu_init(GLFWwindow *window) {
adapter_opts.compatibleSurface = g_surface;
adapter_opts.powerPreference = WGPUPowerPreference_HighPerformance;
- wgpuInstanceRequestAdapter(
- g_instance, &adapter_opts,
- {nullptr, WGPUCallbackMode_WaitAnyOnly, handle_request_adapter, &g_adapter,
- nullptr});
+ wgpuInstanceRequestAdapter(g_instance, &adapter_opts,
+ {nullptr, WGPUCallbackMode_WaitAnyOnly,
+ handle_request_adapter, &g_adapter, nullptr});
while (!g_adapter) {
wgpuInstanceWaitAny(g_instance, 0, nullptr, 0);
@@ -163,10 +162,9 @@ void gpu_init(GLFWwindow *window) {
device_desc.uncapturedErrorCallbackInfo.callback = handle_device_error;
#endif
- wgpuAdapterRequestDevice(
- g_adapter, &device_desc,
- {nullptr, WGPUCallbackMode_WaitAnyOnly, handle_request_device, &g_device,
- nullptr});
+ wgpuAdapterRequestDevice(g_adapter, &device_desc,
+ {nullptr, WGPUCallbackMode_WaitAnyOnly,
+ handle_request_device, &g_device, nullptr});
while (!g_device) {
wgpuInstanceWaitAny(g_instance, 0, nullptr, 0);
@@ -271,7 +269,8 @@ void gpu_draw(float audio_peak, float aspect_ratio) {
WGPUSurfaceGetCurrentTextureStatus_SuccessSuboptimal)
return;
- WGPUTextureView view = wgpuTextureCreateView(surface_texture.texture, nullptr);
+ WGPUTextureView view =
+ wgpuTextureCreateView(surface_texture.texture, nullptr);
struct {
float audio_peak;
@@ -317,4 +316,5 @@ void gpu_draw(float audio_peak, float aspect_ratio) {
wgpuTextureRelease(surface_texture.texture);
}
-void gpu_shutdown() {}
+void gpu_shutdown() {
+}