mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-04-16 01:04:24 -04:00
glsl-optimizer: Flip dFdy for Metal.
This commit is contained in:
parent
377e77f6b5
commit
94b6e384a1
1 changed files with 11 additions and 1 deletions
|
@ -1020,7 +1020,17 @@ void ir_print_metal_visitor::visit(ir_expression *ir)
|
|||
const bool halfCast = (arg_prec == glsl_precision_medium || arg_prec == glsl_precision_low);
|
||||
buffer.asprintf_append (halfCast ? "((half)1.0/(" : "(1.0/(");
|
||||
} else {
|
||||
buffer.asprintf_append ("%s(", operator_glsl_strs[ir->operation]);
|
||||
switch(ir->operation) {
|
||||
case ir_unop_dFdy:
|
||||
case ir_unop_dFdy_coarse:
|
||||
case ir_unop_dFdy_fine:
|
||||
buffer.asprintf_append ("%s(-", operator_glsl_strs[ir->operation]);
|
||||
break;
|
||||
|
||||
default:
|
||||
buffer.asprintf_append ("%s(", operator_glsl_strs[ir->operation]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ir->operands[0])
|
||||
ir->operands[0]->accept(this);
|
||||
|
|
Loading…
Add table
Reference in a new issue