summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvc0/nvc0_program.c
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-02-24 17:26:44 +0100
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-02-24 17:35:36 +0100
commit1a8297139396ec2a6415ef803a3901e1ecef485c (patch)
tree2bb3975c3ce143b4c9bba0218a49184d66cd27e1 /src/gallium/drivers/nvc0/nvc0_program.c
parentb5f04b20089c219f760fb6a369041bd782708247 (diff)
nvc0: set local memory usage info in shader header
Before this, l[] access was a no-op.
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_program.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_program.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_program.c b/src/gallium/drivers/nvc0/nvc0_program.c
index f7ea97ddb1..0685a84230 100644
--- a/src/gallium/drivers/nvc0/nvc0_program.c
+++ b/src/gallium/drivers/nvc0/nvc0_program.c
@@ -301,9 +301,11 @@ prog_decl(struct nvc0_translation_info *ti,
ti->sysval_loc[i] = nvc0_system_value_location(sn, si, &ti->sysval_in[i]);
assert(first == last);
break;
+ case TGSI_FILE_TEMPORARY:
+ ti->temp128_nr = MAX2(ti->temp128_nr, last + 1);
+ break;
case TGSI_FILE_NULL:
case TGSI_FILE_CONSTANT:
- case TGSI_FILE_TEMPORARY:
case TGSI_FILE_SAMPLER:
case TGSI_FILE_ADDRESS:
case TGSI_FILE_IMMEDIATE:
@@ -644,6 +646,11 @@ nvc0_prog_scan(struct nvc0_translation_info *ti)
break;
}
+ if (ti->require_stores) {
+ prog->hdr[0] |= 1 << 26;
+ prog->hdr[1] |= ti->temp128_nr * 16; /* l[] size */
+ }
+
assert(!ret);
return ret;
}