summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Thomson <blumatrikz@gmail.com>2026-09-10 19:34:22 -0700
committerConnor Thomson <blumatrikz@gmail.com>2026-09-10 19:34:22 -0700
commitf3def6247bc852d990d705edee632ad4684666f5 (patch)
tree3fc72838bda9d4e17d18711f6ccdf2958757ed58
parent9419ddf6e42ccf6127c2dde7d8791c19e4511844 (diff)
Fix formatting in gpu.c a little bit
-rw-r--r--src/gpu.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/gpu.c b/src/gpu.c
index 9d4bd9d..a764fa5 100644
--- a/src/gpu.c
+++ b/src/gpu.c
@@ -51,7 +51,7 @@ static void ta_gpu_resize_msaa_texture(SDL_GPUTextureFormat format) {
SDL_ReleaseGPUTexture(ta_gpu_device, ta_gpu_msaa_texture);
SDL_ReleaseGPUTexture(ta_gpu_device, ta_gpu_depth_texture);
- ta_gpu_msaa_texture = NULL;
+ ta_gpu_msaa_texture = NULL;
ta_gpu_depth_texture = NULL;
SDL_GPUTextureCreateInfo texture_info = {
@@ -64,11 +64,11 @@ static void ta_gpu_resize_msaa_texture(SDL_GPUTextureFormat format) {
.num_levels = 1,
.sample_count = ta_gpu_sample_count,
};
- ta_gpu_msaa_texture = ta_sdl_create_gpu_texture(ta_gpu_device, &texture_info);
- texture_info.format = SDL_GPU_TEXTUREFORMAT_D32_FLOAT;
- texture_info.usage = SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET;
- ta_gpu_depth_texture = ta_sdl_create_gpu_texture(ta_gpu_device, &texture_info);
- ta_gpu_msaa_texture_width = (Uint32)ta_window_width;
+ ta_gpu_msaa_texture = ta_sdl_create_gpu_texture(ta_gpu_device, &texture_info);
+ texture_info.format = SDL_GPU_TEXTUREFORMAT_D32_FLOAT;
+ texture_info.usage = SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET;
+ ta_gpu_depth_texture = ta_sdl_create_gpu_texture(ta_gpu_device, &texture_info);
+ ta_gpu_msaa_texture_width = (Uint32)ta_window_width;
ta_gpu_msaa_texture_height = (Uint32)ta_window_height;
}
@@ -117,18 +117,18 @@ void ta_gpu_init(void) {
.blend_state = {
.src_color_blendfactor = SDL_GPU_BLENDFACTOR_SRC_ALPHA,
.dst_color_blendfactor = SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA,
- .color_blend_op = SDL_GPU_BLENDOP_ADD,
+ .color_blend_op = SDL_GPU_BLENDOP_ADD,
.src_alpha_blendfactor = SDL_GPU_BLENDFACTOR_ONE,
.dst_alpha_blendfactor = SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA,
- .alpha_blend_op = SDL_GPU_BLENDOP_ADD,
- .enable_blend = true,
+ .alpha_blend_op = SDL_GPU_BLENDOP_ADD,
+ .enable_blend = true,
},
};
SDL_GPUGraphicsPipelineCreateInfo pipeline_info = {
- .vertex_shader = vertex_shader,
- .fragment_shader = fragment_shader,
- .primitive_type = SDL_GPU_PRIMITIVETYPE_TRIANGLELIST,
- .target_info = {
+ .vertex_shader = vertex_shader,
+ .fragment_shader = fragment_shader,
+ .primitive_type = SDL_GPU_PRIMITIVETYPE_TRIANGLELIST,
+ .target_info = {
.num_color_targets = 1,
.color_target_descriptions = &color_target,
},
@@ -141,9 +141,9 @@ void ta_gpu_init(void) {
SDL_ReleaseGPUShader(ta_gpu_device, fragment_shader);
SDL_GPUSamplerCreateInfo sampler_info = {
- .min_filter = SDL_GPU_FILTER_LINEAR,
- .mag_filter = SDL_GPU_FILTER_LINEAR,
- .mipmap_mode = SDL_GPU_SAMPLERMIPMAPMODE_NEAREST,
+ .min_filter = SDL_GPU_FILTER_LINEAR,
+ .mag_filter = SDL_GPU_FILTER_LINEAR,
+ .mipmap_mode = SDL_GPU_SAMPLERMIPMAPMODE_NEAREST,
.address_mode_u = SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE,
.address_mode_v = SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE,
.address_mode_w = SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE,
@@ -152,9 +152,9 @@ void ta_gpu_init(void) {
}
void ta_gpu_start_frame(void) {
- ta_gpu_command_buffer = ta_sdl_acquire_gpu_command_buffer(ta_gpu_device);
+ ta_gpu_command_buffer = ta_sdl_acquire_gpu_command_buffer(ta_gpu_device);
ta_gpu_swapchain_texture = NULL;
- ta_gpu_swapchain_format = SDL_GetGPUSwapchainTextureFormat(ta_gpu_device, ta_window);
+ ta_gpu_swapchain_format = SDL_GetGPUSwapchainTextureFormat(ta_gpu_device, ta_window);
ta_sdl_wait_and_acquire_gpu_swapchain_texture(ta_gpu_command_buffer, ta_window, &ta_gpu_swapchain_texture);
if (ta_gpu_swapchain_texture) {
@@ -186,11 +186,11 @@ void ta_gpu_end_frame(void) {
};
SDL_GPUDepthStencilTargetInfo depth_target = {
- .texture = ta_gpu_depth_texture,
- .clear_depth = 1.0f,
- .load_op = SDL_GPU_LOADOP_CLEAR,
- .store_op = SDL_GPU_STOREOP_DONT_CARE,
- .stencil_load_op = SDL_GPU_LOADOP_DONT_CARE,
+ .texture = ta_gpu_depth_texture,
+ .clear_depth = 1.0f,
+ .load_op = SDL_GPU_LOADOP_CLEAR,
+ .store_op = SDL_GPU_STOREOP_DONT_CARE,
+ .stencil_load_op = SDL_GPU_LOADOP_DONT_CARE,
.stencil_store_op = SDL_GPU_STOREOP_DONT_CARE,
};
SDL_GPURenderPass *render_pass = ta_sdl_begin_gpu_render_pass(