[Mesa-dev] [PATCH v4 08/10] nv50/ir: add precise field to Instruction

Karol Herbst karolherbst at gmail.com
Fri Jun 23 18:30:27 UTC 2017


v4: initialize field with NULL

Signed-off-by: Karol Herbst <karolherbst at gmail.com>
Reviewed-by: Pierre Moreau <pierre.morrow at free.fr>
---
 src/gallium/drivers/nouveau/codegen/nv50_ir.cpp | 1 +
 src/gallium/drivers/nouveau/codegen/nv50_ir.h   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
index 21641a4746..08181b790f 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
@@ -575,6 +575,7 @@ void Instruction::init()
    encSize = 0;
    ipa = 0;
    mask = 0;
+   precise = 0;
 
    lanes = 0xf;
 
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.h b/src/gallium/drivers/nouveau/codegen/nv50_ir.h
index 5c09fed05c..6835c4fa8c 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.h
@@ -884,6 +884,7 @@ public:
    unsigned perPatch   : 1;
    unsigned exit       : 1; // terminate program after insn
    unsigned mask       : 4; // for vector ops
+   unsigned precise    : 1; // prevent algebraic optimisations like mul+add to mad
 
    int8_t postFactor; // MUL/DIV(if < 0) by 1 << postFactor
 
-- 
2.13.1



More information about the mesa-dev mailing list