Navigation Menu

Skip to content

Commit

Permalink
Metal: make constant arrays have unique names.
Browse files Browse the repository at this point in the history
This lets us compile a bunch of shaders as one big file without conflicts!
  • Loading branch information
icculus committed May 17, 2016
1 parent dc12246 commit 6ef95bd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mojoshader.c
Expand Up @@ -4080,8 +4080,7 @@ static inline const char *get_METAL_const_array_varname_in_buf(Context *ctx,
const int base, const int size,
char *buf, const size_t buflen)
{
const char *type = ctx->shader_type_str;
snprintf(buf, buflen, "%s_const_array_%d_%d", type, base, size);
snprintf(buf, buflen, "%s_const_array_%d_%d", ctx->mainfn, base, size);
return buf;
} // get_METAL_const_array_varname_in_buf

Expand Down

0 comments on commit 6ef95bd

Please sign in to comment.