Skip to content

Commit

Permalink
[SPIR-V] Write fragment functions
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Nov 20, 2023
1 parent 883a00b commit d8272d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/backends/spirv.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ static void write_function(instructions_buffer *instructions, function *f, shade
break;
}
case OPCODE_RETURN: {
if (main) {
if (stage == SHADER_STAGE_VERTEX && main) {
type *output_type = get_type(output);

for (size_t i = 0; i < output_type->members.size; ++i) {
Expand Down Expand Up @@ -968,7 +968,7 @@ static void spirv_export_fragment(char *directory, function *main) {

write_op_variable_with_result(&instructions, spirv_float4_type, output_var, STORAGE_CLASS_OUTPUT);

// write_functions(&instructions, main, SHADER_STAGE_VERTEX, vertex_input, input_var, vertex_output, output_var);
write_functions(&instructions, main, SHADER_STAGE_VERTEX, pixel_input, input_var, NO_TYPE, output_var);

write_types(&constants);

Expand Down

0 comments on commit d8272d9

Please sign in to comment.