Skip to content

Commit

Permalink
Add -fspv-flatten-resource-arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
thatcosmonaut committed Jan 15, 2025
1 parent 281f5b3 commit a0000c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SDL_shadercross.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ static void *SDL_ShaderCross_INTERNAL_CompileUsingDXC(
defineStringsUtf16[i] = (wchar_t *)SDL_iconv_string("WCHAR_T", "UTF-8", defineString, MAX_DEFINE_STRING_LENGTH);
}

LPCWSTR *args = SDL_malloc(sizeof(LPCWSTR) * (numDefineStrings + 10));
LPCWSTR *args = SDL_malloc(sizeof(LPCWSTR) * (numDefineStrings + 11));
Uint32 argCount = 0;

for (Uint32 i = 0; i < numDefineStrings; i += 1) {
Expand Down Expand Up @@ -440,6 +440,7 @@ static void *SDL_ShaderCross_INTERNAL_CompileUsingDXC(

if (spirv) {
args[argCount++] = (LPCWSTR)L"-spirv";
args[argCount++] = (LPCWSTR)L"-fspv-flatten-resource-arrays";
}

if (info->enable_debug) {
Expand Down

0 comments on commit a0000c1

Please sign in to comment.