From 74164bc7eb6f1d4febb41d7a9c8d1fc18af9cb12 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 25 Mar 2019 14:01:51 -0700 Subject: Partial derivatives squash! WIP: intel/compiler: Import Gen8 / Gen9 ALU machine description --- src/intel/compiler/gen8_md.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/intel/compiler/gen8_md.py b/src/intel/compiler/gen8_md.py index c993c993196e..2673bcd32cb8 100644 --- a/src/intel/compiler/gen8_md.py +++ b/src/intel/compiler/gen8_md.py @@ -151,6 +151,16 @@ gen8_md = [ (('f2b32', 'a@32'), Instruction('CMP', r, retype(a, F), imm(0.0, F)).cmod('NZ')), (('f2b32', 'a@16'), Instruction('CMP', r, retype(a, HF), imm(0.0, HF)).cmod('NZ')), + # Partial derivatives + (('fddx', a), Instruction('FS_OPCODE_DDX_FINE', r, a), 'fs_key->high_quality_derivatives'), + (('fddx', a), Instruction('FS_OPCODE_DDX_COARSE', r, a), '!fs_key->high_quality_derivatives'), + (('fddx_fine', a), Instruction('FS_OPCODE_DDX_FINE', r, a)), + (('fddx_coarse', a), Instruction('FS_OPCODE_DDX_COARSE', r, a)), + (('fddy', a), Instruction('FS_OPCODE_DDY_FINE', r, a), 'fs_key->high_quality_derivatives'), + (('fddy', a), Instruction('FS_OPCODE_DDY_COARSE', r, a), '!fs_key->high_quality_derivatives'), + (('fddy_fine', a), Instruction('FS_OPCODE_DDY_FINE', r, a)), + (('fddy_coarse', a), Instruction('FS_OPCODE_DDY_COARSE', r, a)), + # General arithmetic (('fadd', a, b), Instruction('ADD', r, a, b)), (('iadd', a, b), Instruction('ADD', r, a, b)), -- cgit v1.2.3