Skip to content

Commit

Permalink
[Metal] Fix sample_lod
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Oct 6, 2023
1 parent 4221ef9 commit 5e212b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/backends/metal.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ static void write_functions(char *code, size_t *offset) {
}
else if (o->op_call.func == add_name("sample_lod")) {
check(o->op_call.parameters_size == 4, context, "sample_lod requires four parameters");
*offset += sprintf(&code[*offset], "\t%s _%" PRIu64 " = _%" PRIu64 ".sampleLevel(_%" PRIu64 ", _%" PRIu64 ", _%" PRIu64 ");\n",
*offset += sprintf(&code[*offset], "\t%s _%" PRIu64 " = _%" PRIu64 ".sample(_%" PRIu64 ", _%" PRIu64 ", level(_%" PRIu64 "));\n",
type_string(o->op_call.var.type.type), o->op_call.var.index, o->op_call.parameters[0].index,
o->op_call.parameters[1].index, o->op_call.parameters[2].index, o->op_call.parameters[3].index);
}
Expand Down

0 comments on commit 5e212b3

Please sign in to comment.