base: fix metal shader compile

This commit is contained in:
luboslenco
2026-08-25 08:20:32 +02:00
parent d414470068
commit 12b26e97f4
2 changed files with 6 additions and 12 deletions
+6
View File
@@ -840,6 +840,12 @@ char *metal_export(char *directory) {
int texture_index = 0;
int sampler_index = 0;
vertex_inputs_size = 0;
fragment_inputs_size = 0;
vertex_functions_size = 0;
fragment_functions_size = 0;
compute_functions_size = 0;
memset(global_register_indices, 0, sizeof(global_register_indices));
for (global_id i = 0; get_global(i) != NULL && get_global(i)->type != NO_TYPE; ++i) {
-12
View File
@@ -48,12 +48,6 @@ extern type_id next_type_index;
void hlsl_export2(char **vs, char **fs, api_kind d3d, bool debug);
void spirv_export2(char **vs, char **fs, int *vs_size, int *fs_size, bool debug);
void wgsl_export2(char **vs, char **fs);
#ifdef IRON_METAL
extern size_t vertex_inputs_size;
extern size_t fragment_inputs_size;
extern size_t vertex_functions_size;
extern size_t fragment_functions_size;
#endif
void kong_compile(char *shader_lang, const char *from, const char *to) {
FILE *fp = fopen(from, "rb");
@@ -72,12 +66,6 @@ void kong_compile(char *shader_lang, const char *from, const char *to) {
names_index = 1;
sets_count = 0;
next_type_index = 0;
#ifdef IRON_METAL
vertex_inputs_size = 0;
fragment_inputs_size = 0;
vertex_functions_size = 0;
fragment_functions_size = 0;
#endif
names_init();
types_init();
functions_init();