diff options
author | Ilia Mirkin <[email protected]> | 2014-07-17 22:30:00 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-07-24 08:26:41 -0400 |
commit | b21a28797c23fc49a23fd48386f5932f0fb6d874 (patch) | |
tree | 8d5848ee5f482742d53a992ba4dace06d767bc02 /src | |
parent | 47e5a8d7a24b80fe1738d88bfffcb04431d612e8 (diff) |
nv50/ir: keep track of whether the program uses fp64
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h index dc74cded2bd..dba56bf2716 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_driver.h @@ -183,6 +183,7 @@ struct nv50_ir_prog_info boolean sampleInterp; /* perform sample interp on all fp inputs */ uint8_t backFaceColor[2]; /* input/output indices of back face colour */ uint8_t globalAccess; /* 1 for read, 2 for wr, 3 for rw */ + boolean fp64; /* program uses fp64 math */ boolean nv50styleSurfaces; /* generate gX[] access for raw buffers */ uint8_t resInfoCBSlot; /* cX[] used for tex handles, surface info */ uint16_t texBindBase; /* base address for tex handles (nve4) */ diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp index 0397bdcad55..7992f539782 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target.cpp @@ -379,9 +379,13 @@ Program::emitBinary(struct nv50_ir_prog_info *info) assert(emit->getCodeSize() == fn->binPos); - for (int b = 0; b < fn->bbCount; ++b) - for (Instruction *i = fn->bbArray[b]->getEntry(); i; i = i->next) + for (int b = 0; b < fn->bbCount; ++b) { + for (Instruction *i = fn->bbArray[b]->getEntry(); i; i = i->next) { emit->emitInstruction(i); + if (i->sType == TYPE_F64 || i->dType == TYPE_F64) + info->io.fp64 = true; + } + } } info->bin.relocData = emit->getRelocInfo(); |