Displaying 8 results from an estimated 8 matches for "getarrayid".
Did you mean:
getarray
2016 Jan 14
0
[PATCH] nv50/ir: only use FILE_LOCAL_MEMORY for temp arrays that use indirection
...n/nv50_ir_from_tgsi.cpp
index 7e3b093..507749d 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -96,6 +96,13 @@ public:
return tgsi_util_get_src_register_swizzle(®, chan);
}
+ int getArrayId() const
+ {
+ if (isIndirect(0))
+ return fsr->Indirect.ArrayID;
+ return 0;
+ }
+
nv50_ir::Modifier getMod(int chan) const;
SrcRegister getIndirect(int dim) const
@@ -155,6 +162,13 @@ public:
return SrcRegister(fdr->Indirect);...
2016 Jan 14
0
[PATCH] nv50/ir: rebase indirect temp arrays to 0, so that we use less lmem space
...int idx2d = src.is2D() ? src.getIndex(1) : 0;
- const int idx = src.getIndex(0);
+ int idx = src.getIndex(0);
const int swz = src.getSwizzle(c);
Instruction *ld;
@@ -1728,8 +1759,7 @@ Converter::fetchSrc(tgsi::Instruction::SrcRegister src, int c, Value *ptr)
int arrayid = src.getArrayId();
if (!arrayid)
arrayid = code->tempArrayId[idx];
- idx2d = (code->indirectTempArrays.find(arrayid) !=
- code->indirectTempArrays.end());
+ adjustTempIndex(arrayid, idx, idx2d);
}
/* fallthrough */
default:
@@ -1743,7 +1773,7 @@ Conv...
2016 Mar 16
0
[PATCH mesa 2/6] nouveau: codegen: Slightly refactor Source::scanInstruction() dst handling
...struction *inst)
if (isEdgeFlagPassthrough(insn))
info->io.edgeFlagIn = insn.getSrc(0).getIndex(0);
} else
- if (insn.getDst(0).getFile() == TGSI_FILE_TEMPORARY) {
- if (insn.getDst(0).isIndirect(0))
- indirectTempArrays.insert(insn.getDst(0).getArrayId());
+ if (dst.getFile() == TGSI_FILE_TEMPORARY) {
+ if (dst.isIndirect(0))
+ indirectTempArrays.insert(dst.getArrayId());
} else
- if (insn.getDst(0).getFile() == TGSI_FILE_BUFFER) {
+ if (dst.getFile() == TGSI_FILE_BUFFER) {
info->io.globalAcce...
2016 Mar 16
2
[PATCH mesa 5/6] nouveau: codegen: Add support for OpenCL global memory buffers
...nv50_ir::FILE_MEMORY_GLOBAL;
> case TGSI_FILE_SAMPLER:
> case TGSI_FILE_NULL:
> default:
> @@ -1284,7 +1284,9 @@ bool Source::scanInstruction(const struct tgsi_full_instruction *inst)
> if (dst.isIndirect(0))
> indirectTempArrays.insert(dst.getArrayId());
> } else
> - if (dst.getFile() == TGSI_FILE_BUFFER) {
> + if (dst.getFile() == TGSI_FILE_BUFFER ||
> + (dst.getFile() == TGSI_FILE_MEMORY &&
> + memoryFiles[dst.getIndex(0)].mem_type == TGSI_MEMORY_TYPE_GLOBAL)) {
> info-...
2016 Mar 16
0
[PATCH mesa 5/6] nouveau: codegen: Add support for OpenCL global memory buffers
...e TGSI_FILE_MEMORY: return nv50_ir::FILE_MEMORY_GLOBAL;
case TGSI_FILE_SAMPLER:
case TGSI_FILE_NULL:
default:
@@ -1284,7 +1284,9 @@ bool Source::scanInstruction(const struct tgsi_full_instruction *inst)
if (dst.isIndirect(0))
indirectTempArrays.insert(dst.getArrayId());
} else
- if (dst.getFile() == TGSI_FILE_BUFFER) {
+ if (dst.getFile() == TGSI_FILE_BUFFER ||
+ (dst.getFile() == TGSI_FILE_MEMORY &&
+ memoryFiles[dst.getIndex(0)].mem_type == TGSI_MEMORY_TYPE_GLOBAL)) {
info->io.globalAccess |= 0x2;...
2016 Mar 16
0
[PATCH mesa 5/6] nouveau: codegen: Add support for OpenCL global memory buffers
...OBAL;
>> case TGSI_FILE_SAMPLER:
>> case TGSI_FILE_NULL:
>> default:
>> @@ -1284,7 +1284,9 @@ bool Source::scanInstruction(const struct tgsi_full_instruction *inst)
>> if (dst.isIndirect(0))
>> indirectTempArrays.insert(dst.getArrayId());
>> } else
>> - if (dst.getFile() == TGSI_FILE_BUFFER) {
>> + if (dst.getFile() == TGSI_FILE_BUFFER ||
>> + (dst.getFile() == TGSI_FILE_MEMORY &&
>> + memoryFiles[dst.getIndex(0)].mem_type == TGSI_MEMORY_TYPE_GLOBAL)) {
&...
2016 Mar 16
13
[PATCH mesa 1/6] tgsi_build: Fix return of uninitialized memory in tgsi_*_instruction_memory
tgsi_default_instruction_memory / tgsi_build_instruction_memory were
returning uninitialized memory for tgsi_instruction_memory.Texture and
tgsi_instruction_memory.Format. Note 0 means not set, and thus is a
correct default initializer for these.
Fixes: 3243b6fc97 ("tgsi: add Texture and Format to tgsi_instruction_memory")
Cc: Nicolai Hähnle <nicolai.haehnle at amd.com>
2016 Mar 17
4
[PATCH mesa v2 1/2] nouveau: codegen: Use FILE_MEMORY_BUFFER for buffers
Some of the lowering steps we currently do for FILE_MEMORY_GLOBAL only
apply to buffers, making it impossible to use FILE_MEMORY_GLOBAL for
OpenCL global buffers.
This commits changes the buffer code to use FILE_MEMORY_BUFFER at the
ir_from_tgsi and lowering steps, freeing use of FILE_MEMORY_GLOBAL
for use with OpenCL global buffers.
Note that after lowering buffer accesses use the