Skip to content

Commit 842d38a

Browse files
committed
Format C
1 parent 9c92f84 commit 842d38a

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

backends/gpu/kompjuta/sources/commandlist.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ void kore_kompjuta_command_list_set_index_buffer(kore_gpu_command_list *list, ko
4141
assert(list->kompjuta.current_command < list->kompjuta.commands_count);
4242

4343
kompjuta_gpu_command *command = &list->kompjuta.commands[list->kompjuta.current_command];
44-
command->kind = KOMPJUTA_GPU_COMMAND_SET_INDEX_BUFFER;
44+
command->kind = KOMPJUTA_GPU_COMMAND_SET_INDEX_BUFFER;
45+
46+
uint8_t *data = (uint8_t *)buffer->kompjuta.data;
47+
command->data.set_index_buffer.data = &data[offset];
4548

46-
uint8_t *data = (uint8_t *)buffer->kompjuta.data;
47-
command->data.set_index_buffer.data = &data[offset];
48-
4949
command->data.set_index_buffer.index_format = index_format;
50-
50+
5151
++list->kompjuta.current_command;
5252
}
5353

@@ -56,24 +56,24 @@ void kore_kompjuta_command_list_set_vertex_buffer(kore_gpu_command_list *list, u
5656
assert(list->kompjuta.current_command < list->kompjuta.commands_count);
5757

5858
kompjuta_gpu_command *command = &list->kompjuta.commands[list->kompjuta.current_command];
59-
command->kind = KOMPJUTA_GPU_COMMAND_SET_VERTEX_BUFFER;
59+
command->kind = KOMPJUTA_GPU_COMMAND_SET_VERTEX_BUFFER;
60+
61+
uint8_t *data = (uint8_t *)buffer->data;
62+
command->data.set_vertex_buffer.data = &data[offset];
6063

61-
uint8_t *data = (uint8_t *)buffer->data;
62-
command->data.set_vertex_buffer.data = &data[offset];
63-
6464
command->data.set_vertex_buffer.stride = stride;
65-
65+
6666
++list->kompjuta.current_command;
6767
}
6868

6969
void kore_kompjuta_command_list_set_render_pipeline(kore_gpu_command_list *list, kore_kompjuta_render_pipeline *pipeline) {
7070
assert(list->kompjuta.current_command < list->kompjuta.commands_count);
7171

72-
kompjuta_gpu_command *command = &list->kompjuta.commands[list->kompjuta.current_command];
73-
command->kind = KOMPJUTA_GPU_COMMAND_SET_RENDER_PIPELINE;
72+
kompjuta_gpu_command *command = &list->kompjuta.commands[list->kompjuta.current_command];
73+
command->kind = KOMPJUTA_GPU_COMMAND_SET_RENDER_PIPELINE;
7474
command->data.set_render_pipeline.vertex_shader = pipeline->vertex_shader.function;
7575
command->data.set_render_pipeline.fragment_shader = pipeline->fragment_shader.function;
76-
76+
7777
++list->kompjuta.current_command;
7878
}
7979

@@ -84,14 +84,14 @@ void kore_kompjuta_command_list_draw_indexed(kore_gpu_command_list *list, uint32
8484
int32_t base_vertex, uint32_t first_instance) {
8585
assert(list->kompjuta.current_command < list->kompjuta.commands_count);
8686

87-
kompjuta_gpu_command *command = &list->kompjuta.commands[list->kompjuta.current_command];
88-
command->kind = KOMPJUTA_GPU_COMMAND_DRAW_INDEXED;
89-
command->data.draw_indexed.index_count = index_count;
87+
kompjuta_gpu_command *command = &list->kompjuta.commands[list->kompjuta.current_command];
88+
command->kind = KOMPJUTA_GPU_COMMAND_DRAW_INDEXED;
89+
command->data.draw_indexed.index_count = index_count;
9090
command->data.draw_indexed.instance_count = instance_count;
91-
command->data.draw_indexed.first_index = first_index;
92-
command->data.draw_indexed.base_vertex = base_vertex;
91+
command->data.draw_indexed.first_index = first_index;
92+
command->data.draw_indexed.base_vertex = base_vertex;
9393
command->data.draw_indexed.first_instance = first_instance;
94-
94+
9595
++list->kompjuta.current_command;
9696
}
9797

backends/system/kompjuta/includes/kore3/backend/mmio.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ typedef struct kompjuta_gpu_command {
4040
float a;
4141
} clear;
4242
struct {
43-
void *data;
43+
void *data;
4444
kore_gpu_index_format index_format;
4545
} set_index_buffer;
4646
struct {
47-
void *data;
47+
void *data;
4848
uint64_t stride;
4949
} set_vertex_buffer;
5050
struct {
@@ -55,7 +55,7 @@ typedef struct kompjuta_gpu_command {
5555
uint32_t index_count;
5656
uint32_t instance_count;
5757
uint32_t first_index;
58-
int32_t base_vertex;
58+
int32_t base_vertex;
5959
uint32_t first_instance;
6060
} draw_indexed;
6161
} data;

0 commit comments

Comments
 (0)