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.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() {
+}