diff options
author | Glenn Kennard <[email protected]> | 2014-10-15 17:12:16 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-10-28 23:20:45 +0100 |
commit | 7b1c0cbc90d456384b0950ad21faa3c61a6b43ff (patch) | |
tree | 13e81fc5dcfcf58f68accc686e907588ec29275f /src/gallium/drivers/r600/r600_asm.h | |
parent | 444c8c2f287d6553b7d9c5cdf721dcb7624e01a9 (diff) |
r600g: Implement sm5 UBO/sampler indexing
Caveat: Shaders using UBO/sampler indexing will
not be optimized by SB, due to SB not currently
supporting the necessary CF_INDEX_[01] index
registers.
Signed-off-by: Glenn Kennard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_asm.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_asm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_asm.h b/src/gallium/drivers/r600/r600_asm.h index 48ea3c4bc43..e37d92672bd 100644 --- a/src/gallium/drivers/r600/r600_asm.h +++ b/src/gallium/drivers/r600/r600_asm.h @@ -33,6 +33,7 @@ struct r600_bytecode_alu_src { unsigned abs; unsigned rel; unsigned kc_bank; + unsigned kc_rel; uint32_t value; }; @@ -86,6 +87,9 @@ struct r600_bytecode_tex { unsigned src_sel_y; unsigned src_sel_z; unsigned src_sel_w; + /* indexed samplers/resources only on evergreen/cayman */ + unsigned sampler_index_mode; + unsigned resource_index_mode; }; struct r600_bytecode_vtx { @@ -108,6 +112,7 @@ struct r600_bytecode_vtx { unsigned srf_mode_all; unsigned offset; unsigned endian; + unsigned buffer_index_mode; }; struct r600_bytecode_output { @@ -132,6 +137,7 @@ struct r600_bytecode_kcache { unsigned bank; unsigned mode; unsigned addr; + unsigned index_mode; }; struct r600_bytecode_cf { @@ -217,12 +223,15 @@ struct r600_bytecode { unsigned ar_chan; unsigned ar_handling; unsigned r6xx_nop_after_rel_dst; + bool index_loaded[2]; + unsigned index_reg[2]; /* indexing register CF_INDEX_[01] */ unsigned debug_id; struct r600_isa* isa; }; /* eg_asm.c */ int eg_bytecode_cf_build(struct r600_bytecode *bc, struct r600_bytecode_cf *cf); +int egcm_load_index_reg(struct r600_bytecode *bc, unsigned id, bool inside_alu_clause); /* r600_asm.c */ void r600_bytecode_init(struct r600_bytecode *bc, |