diff options
author | Christoph Bumiller <[email protected]> | 2011-02-24 17:26:44 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-02-24 17:35:36 +0100 |
commit | 1a8297139396ec2a6415ef803a3901e1ecef485c (patch) | |
tree | 2bb3975c3ce143b4c9bba0218a49184d66cd27e1 /src/gallium/drivers/nvc0/nvc0_program.c | |
parent | b5f04b20089c219f760fb6a369041bd782708247 (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.c | 9 |
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 f7ea97ddb1d..0685a842304 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; } |