mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
ir_constant_visitor: Add support for dFdx and dFdy operations.
If the argument is a constant expression...it's not changing per pixel, so the result is simply 0.
This commit is contained in:
parent
b843c7a20c
commit
d6a32d4b54
1 changed files with 9 additions and 0 deletions
|
|
@ -266,6 +266,15 @@ ir_constant_visitor::visit(ir_expression *ir)
|
|||
}
|
||||
break;
|
||||
|
||||
case ir_unop_dFdx:
|
||||
case ir_unop_dFdy:
|
||||
assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
|
||||
type = ir->type;
|
||||
for (c = 0; c < ir->operands[0]->type->components(); c++) {
|
||||
f[c] = 0.0;
|
||||
}
|
||||
break;
|
||||
|
||||
case ir_binop_add:
|
||||
if (ir->operands[0]->type == ir->operands[1]->type) {
|
||||
type = ir->operands[0]->type;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue