Skip to content

Commit

Permalink
Early out when no ray shaders are around
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Sep 3, 2024
1 parent 7d1464f commit 7122493
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/backends/hlsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,10 @@ static void hlsl_export_all_ray_shaders(char *directory) {
all_rayshaders_size += 1;
}

if (all_rayshaders_size == 0) {
return;
}

write_types(hlsl, &offset, SHADER_STAGE_RAY_GENERATION, NO_TYPE, NO_TYPE, NULL, all_rayshaders, all_rayshaders_size);

write_globals(hlsl, &offset, NULL, all_rayshaders, all_rayshaders_size);
Expand Down

0 comments on commit 7122493

Please sign in to comment.