Displaying 20 results from an estimated 21 matches for "tgsi_file_temporary".
2016 Jan 14
0
[PATCH] nv50/ir: only use FILE_LOCAL_MEMORY for temp arrays that use indirection
...SIC)
tgsi_dump(tokens, 0);
-
- mainTempsInLMem = false;
}
Source::~Source()
@@ -890,6 +903,7 @@ bool Source::scanSource()
textureViews.resize(scan.file_max[TGSI_FILE_SAMPLER_VIEW] + 1);
resources.resize(scan.file_max[TGSI_FILE_IMAGE] + 1);
+ tempArrayId.resize(scan.file_max[TGSI_FILE_TEMPORARY] + 1);
info->immd.bufSize = 0;
@@ -935,7 +949,8 @@ bool Source::scanSource()
}
tgsi_parse_free(&parse);
- if (mainTempsInLMem)
+ // TODO: Compute based on relevant array sizes
+ if (indirectTempArrays.size())
info->bin.tlsSpace += (scan.file_max[TGSI_FILE_TE...
2016 Jan 14
0
[PATCH] nv50/ir: rebase indirect temp arrays to 0, so that we use less lmem space
...ArrayInfo;
std::vector<int> tempArrayId;
int clipVertexOutput;
@@ -949,9 +954,19 @@ bool Source::scanSource()
}
tgsi_parse_free(&parse);
- // TODO: Compute based on relevant array sizes
- if (indirectTempArrays.size())
- info->bin.tlsSpace += (scan.file_max[TGSI_FILE_TEMPORARY] + 1) * 16;
+ if (indirectTempArrays.size()) {
+ int tempBase = 0;
+ for (std::set<int>::const_iterator it = indirectTempArrays.begin();
+ it != indirectTempArrays.end(); ++it) {
+ std::pair<int, int>& info = tempArrayInfo[*it];
+ TempBase base;...
2009 Sep 12
0
[PATCH 09/13] nv50: move allocation of pc regs
...ok->FullInstruction;
dst = &insn->FullDstRegisters[0].DstRegister;
mask = dst->WriteMask;
- if (!r_usage[0])
- r_usage[0] = CALLOC(pc->temp_nr * 4, sizeof(unsigned));
- if (!r_usage[1])
- r_usage[1] = CALLOC(pc->attr_nr * 4, sizeof(unsigned));
+ if (dst->File == TGSI_FILE_TEMPORARY)
+ reg = pc->temp;
+ else
+ if (dst->File == TGSI_FILE_OUTPUT)
+ reg = pc->result;
- if (dst->File == TGSI_FILE_TEMPORARY) {
+ if (reg) {
for (c = 0; c < 4; c++) {
if (!(mask & (1 << c)))
continue;
- r_usage[0][dst...
2016 Mar 16
0
[PATCH mesa 2/6] nouveau: codegen: Slightly refactor Source::scanInstruction() dst handling
...info->out[i].mask = 0xf;
@@ -1280,11 +1280,11 @@ bool Source::scanInstruction(const struct tgsi_full_instruction *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).g...
2009 Jun 24
0
[PATCH] nv50: fix previous patches
...define INTERP_CENTROID 4
@@ -1852,6 +1853,10 @@ prep_inspect_insn(struct nv50_pc *pc, const union tgsi_full_token *tok,
dst = &insn->FullDstRegisters[0].DstRegister;
mask = dst->WriteMask;
+#ifdef NV50_PROGRAM_DUMP
+ tgsi_dump_instruction(insn, 1);
+#endif
+
if (dst->File == TGSI_FILE_TEMPORARY) {
for (c = 0; c < 4; c++) {
if (!(mask & (1 << c)))
@@ -1900,13 +1905,14 @@ static unsigned
prep_fp_attrib(struct nv50_pc *pc, int i, unsigned *acc, int *p_mid,
int *aid, int *p_oid)
{
- int c, n, oid = *p_oid, mid = *p_mid;
+ int c, n, oid, mid = *p_mid;
unsigned...
2014 Jun 23
1
[PATCH] nv50/ir: make ARB_viewport_array behave like it does with other drivers
...ted at EMIT time */
+ if (info->out[dst.getIndex(0)].sn == TGSI_SEMANTIC_VIEWPORT_INDEX && viewport != NULL)
+ mkOp1(OP_MOV, TYPE_U32, viewport, val);
+ else
+ mkStore(OP_EXPORT, TYPE_U32, dstToSym(dst, c), ptr, val);
+ }
} else
if (f == TGSI_FILE_TEMPORARY ||
f == TGSI_FILE_PREDICATE ||
@@ -2523,6 +2535,14 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
mkCvt(OP_CVT, dstTy, dst0[c], srcTy, fetchSrc(0, c));
break;
case TGSI_OPCODE_EMIT:
+ /* export the saved viewport index */
+ if (viewp...
2014 Jun 23
1
[PATCH v3] nv50/ir: make ARB_viewport_array behave like it does with other drivers
...d at EMIT time */
+ if (info->out[idx].sn == TGSI_SEMANTIC_VIEWPORT_INDEX
+ && viewport != NULL)
+ mkOp1(OP_MOV, TYPE_U32, viewport, val);
+ else
+ mkStore(OP_EXPORT, TYPE_U32, dstToSym(dst, c), ptr, val);
+ }
} else
if (f == TGSI_FILE_TEMPORARY ||
f == TGSI_FILE_PREDICATE ||
@@ -2523,6 +2538,13 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
mkCvt(OP_CVT, dstTy, dst0[c], srcTy, fetchSrc(0, c));
break;
case TGSI_OPCODE_EMIT:
+ /* export the saved viewport index */
+ if (viewp...
2014 Jun 23
1
[PATCH v2] nv50/ir: make ARB_viewport_array behave like it does with other drivers
...ted at EMIT time */
+ if (info->out[dst.getIndex(0)].sn == TGSI_SEMANTIC_VIEWPORT_INDEX && viewport != NULL)
+ mkOp1(OP_MOV, TYPE_U32, viewport, val);
+ else
+ mkStore(OP_EXPORT, TYPE_U32, dstToSym(dst, c), ptr, val);
+ }
} else
if (f == TGSI_FILE_TEMPORARY ||
f == TGSI_FILE_PREDICATE ||
@@ -2523,6 +2537,14 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
mkCvt(OP_CVT, dstTy, dst0[c], srcTy, fetchSrc(0, c));
break;
case TGSI_OPCODE_EMIT:
+ /* export the saved viewport index */
+ if (viewp...
2009 Sep 10
0
[PATCH 02/13] nv50: add functions for swizzle resolution
...locate an extra TEMP.
+ *
+ * If e.g. only 1 component is written, we may also emit the final
+ * result to a write-only register.
+ */
+static struct nv50_reg *
+tgsi_broadcast_dst(struct nv50_pc *pc,
+ const struct tgsi_full_dst_register *fd, unsigned mask)
+{
+ if (fd->DstRegister.File == TGSI_FILE_TEMPORARY) {
+ int c = ffs(~mask & fd->DstRegister.WriteMask);
+ if (c)
+ return tgsi_dst(pc, c - 1, fd);
+ } else {
+ int c = ffs(fd->DstRegister.WriteMask) - 1;
+ if ((1 << c) == fd->DstRegister.WriteMask)
+ return tgsi_dst(pc, c, fd);
+ }
+
+ return NULL;
+}
+
static unsigned...
2016 Mar 10
8
[PATCH mesa 0/3] tgsi and nouveau global / local / opencl-input mem support
Hi,
Here are patches which implement the support for OpenCL kernel input
parameters we discussed. They also add the tgsi parsing bits for
adding support for global / local mem, but no implementation yet.
Regards,
Hans
2016 Mar 10
1
[Mesa-dev] [PATCH mesa 2/3] tgsi: Add support for global / local / input MEMORY
...> break;
> case TGSI_FILE_MEMORY:
> for (i = first; i <= last; ++i)
> - memoryFiles[i].shared = decl->Declaration.Shared;
> + memoryFiles[i].mem_type = decl->Declaration.MemType;
> break;
> case TGSI_FILE_NULL:
> case TGSI_FILE_TEMPORARY:
> @@ -1523,7 +1523,8 @@ Converter::makeSym(uint tgsiFile, int fileIdx, int
> idx, int c, uint32_t address)
>
> sym->reg.fileIndex = fileIdx;
>
> - if (tgsiFile == TGSI_FILE_MEMORY && code->memoryFiles[fileIdx].shared)
> + if (tgsiFile == TGSI_FILE_MEMORY...
2016 Mar 16
5
[PATCH mesa v2 1/3] tgsi: Fix decl.Atomic and .Shared not propagating when parsing tgsi text
When support for decl.Atomic and .Shared was added, tgsi_build_declaration
was not updated to propagate these properly.
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
Changes in v2:
-Add Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/gallium/auxiliary/tgsi/tgsi_build.c | 6 ++++++
1 file changed, 6
2016 Mar 10
0
[PATCH mesa 2/3] tgsi: Add support for global / local / input MEMORY
...nst struct tgsi_full_declaration *decl)
break;
case TGSI_FILE_MEMORY:
for (i = first; i <= last; ++i)
- memoryFiles[i].shared = decl->Declaration.Shared;
+ memoryFiles[i].mem_type = decl->Declaration.MemType;
break;
case TGSI_FILE_NULL:
case TGSI_FILE_TEMPORARY:
@@ -1523,7 +1523,8 @@ Converter::makeSym(uint tgsiFile, int fileIdx, int idx, int c, uint32_t address)
sym->reg.fileIndex = fileIdx;
- if (tgsiFile == TGSI_FILE_MEMORY && code->memoryFiles[fileIdx].shared)
+ if (tgsiFile == TGSI_FILE_MEMORY &&
+ code->mem...
2016 Mar 16
0
[PATCH mesa v2 2/3] tgsi: Add support for global / private / input MEMORY
...nst struct tgsi_full_declaration *decl)
break;
case TGSI_FILE_MEMORY:
for (i = first; i <= last; ++i)
- memoryFiles[i].shared = decl->Declaration.Shared;
+ memoryFiles[i].mem_type = decl->Declaration.MemType;
break;
case TGSI_FILE_NULL:
case TGSI_FILE_TEMPORARY:
@@ -1527,7 +1527,8 @@ Converter::makeSym(uint tgsiFile, int fileIdx, int idx, int c, uint32_t address)
sym->reg.fileIndex = fileIdx;
- if (tgsiFile == TGSI_FILE_MEMORY && code->memoryFiles[fileIdx].shared)
+ if (tgsiFile == TGSI_FILE_MEMORY &&
+ code->mem...
2016 Mar 10
0
[Mesa-dev] [PATCH mesa 2/3] tgsi: Add support for global / local / input MEMORY
...case TGSI_FILE_MEMORY:
>> for (i = first; i <= last; ++i)
>> - memoryFiles[i].shared = decl->Declaration.Shared;
>> + memoryFiles[i].mem_type = decl->Declaration.MemType;
>> break;
>> case TGSI_FILE_NULL:
>> case TGSI_FILE_TEMPORARY:
>> @@ -1523,7 +1523,8 @@ Converter::makeSym(uint tgsiFile, int fileIdx, int
>> idx, int c, uint32_t address)
>>
>> sym->reg.fileIndex = fileIdx;
>>
>> - if (tgsiFile == TGSI_FILE_MEMORY && code->memoryFiles[fileIdx].shared)
>> + if (...
2009 May 06
2
nv50: shader generation patches
Hi ! I've been trying to improve NV50 shader generation a bit the last couple of weeks, so here is
what I've produced. I don't know if it's usable for you or just a pile of horrible hacks, but at
least it makes some mesa demos render more correcly, p.e. the teapot (aside from mip-mapping issues
of the floor texture), arbfplight, and I think the gears also didn't appear as they
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>
2009 Sep 12
0
[PATCH 10/13] nv50: proper linkage between VP and FP
...last, first, mode;
+ unsigned si, last, first, mode;
- d = &p.FullToken.FullDeclaration;
+ d = &tp.FullToken.FullDeclaration;
first = d->DeclarationRange.First;
last = d->DeclarationRange.Last;
@@ -2045,43 +2042,41 @@ nv50_program_tx_prep(struct nv50_pc *pc)
case TGSI_FILE_TEMPORARY:
break;
case TGSI_FILE_OUTPUT:
+ if (!d->Declaration.Semantic ||
+ p->type == PIPE_SHADER_FRAGMENT)
+ break;
+
+ si = d->Semantic.SemanticIndex;
+ switch (d->Semantic.SemanticName) {
+ /*
+ case TGSI_SEMANTIC_CLIP_DISTANCE:
+ p->cfg.clpd = MIN2...
2014 Feb 21
3
[PATCH 1/4] nv30: remove use_nv4x, it is identical to is_nv4x
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
Perhaps there was a day when those were different, but that day is not today.
src/gallium/drivers/nouveau/nv30/nv30_context.c | 1 -
src/gallium/drivers/nouveau/nv30/nv30_context.h | 1 -
src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c | 20 ++++++++++----------
src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c | 8 ++++----
4
2015 May 17
14
[PATCH 00/12] Tessellation support for nvc0
This is enough to enable tessellation support on nvc0. It seems to
work a lot better on my GF108 than GK208. I suspect that there's some
sort of scheduling shenanigans that need to be adjusted for
kepler+. Or perhaps some shader header things.
Even with the GF108, I still get occasional blue triangles in Heaven,
but I get a *ton* of them on the GK208 -- seemingly the same issue,
but it's