diff options
author | Ilia Mirkin <[email protected]> | 2014-07-20 13:36:37 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-07-23 03:33:09 -0400 |
commit | 71744c069264d32e6eb9d095350300b42633a1f8 (patch) | |
tree | 5ba1775ae8506df1d5858eb5d7aec6439a886886 | |
parent | c2350fb3dbb1b8d348125e22758da266c15bc198 (diff) |
nvc0/ir: set perPatch flag on load/stores to per-patch varyings
Signed-off-by: Ilia Mirkin <[email protected]>
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index c5cefc271cc..f657e8d6a7b 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -1575,6 +1575,7 @@ Converter::fetchSrc(tgsi::Instruction::SrcRegister src, int c, Value *ptr) const int idx2d = src.is2D() ? src.getIndex(1) : 0; const int idx = src.getIndex(0); const int swz = src.getSwizzle(c); + Instruction *ld; switch (src.getFile()) { case TGSI_FILE_IMMEDIATE: @@ -1602,7 +1603,9 @@ Converter::fetchSrc(tgsi::Instruction::SrcRegister src, int c, Value *ptr) if (ptr) return mkLoadv(TYPE_U32, srcToSym(src, c), ptr); } - return mkLoadv(TYPE_U32, srcToSym(src, c), shiftAddress(ptr)); + ld = mkLoad(TYPE_U32, getSSA(), srcToSym(src, c), shiftAddress(ptr)); + ld->perPatch = info->in[idx].patch; + return ld->getDef(0); case TGSI_FILE_OUTPUT: assert(!"load from output file"); return NULL; @@ -1678,7 +1681,8 @@ Converter::storeDst(const tgsi::Instruction::DstRegister dst, int c, viewport != NULL) mkOp1(OP_MOV, TYPE_U32, viewport, val); else - mkStore(OP_EXPORT, TYPE_U32, dstToSym(dst, c), ptr, val); + mkStore(OP_EXPORT, TYPE_U32, dstToSym(dst, c), ptr, val)->perPatch = + info->out[idx].patch; } } else if (f == TGSI_FILE_TEMPORARY || |