Skip to content

Commit 6e9c448

Browse files
committed
[Kompjuta] Allocate a shader stack
1 parent 68cd134 commit 6e9c448

4 files changed

Lines changed: 7 additions & 0 deletions

File tree

backends/gpu/kompjuta/includes/kore3/kompjuta/commandlist_structs.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ typedef struct kore_kompjuta_command_list {
1313
kompjuta_gpu_command *commands;
1414
uint32_t commands_count;
1515
uint32_t current_command;
16+
void *shader_stack;
17+
uint32_t shader_stack_size;
1618
} kore_kompjuta_command_list;
1719

1820
#ifdef __cplusplus

backends/gpu/kompjuta/sources/commandlist.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ void kore_kompjuta_command_list_draw_indexed(kore_gpu_command_list *list, uint32
9191
command->data.draw_indexed.first_index = first_index;
9292
command->data.draw_indexed.base_vertex = base_vertex;
9393
command->data.draw_indexed.first_instance = first_instance;
94+
command->data.draw_indexed.shader_stack = list->kompjuta.shader_stack;
9495

9596
++list->kompjuta.current_command;
9697
}

backends/gpu/kompjuta/sources/device.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ void kore_kompjuta_device_create_command_list(kore_gpu_device *device, kore_gpu_
2525
list->kompjuta.commands_count = 1024;
2626
list->kompjuta.commands = malloc(sizeof(kompjuta_gpu_command) * list->kompjuta.commands_count);
2727
list->kompjuta.current_command = 0;
28+
29+
list->kompjuta.shader_stack_size = 1024;
30+
list->kompjuta.shader_stack = malloc(list->kompjuta.shader_stack_size);
2831
}
2932

3033
void kore_kompjuta_device_create_texture(kore_gpu_device *device, const kore_gpu_texture_parameters *parameters, kore_gpu_texture *texture) {}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ typedef struct kompjuta_gpu_command {
5757
uint32_t first_index;
5858
int32_t base_vertex;
5959
uint32_t first_instance;
60+
void *shader_stack;
6061
} draw_indexed;
6162
} data;
6263
} kompjuta_gpu_command;

0 commit comments

Comments
 (0)