summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/sb
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-05-08 15:08:00 -0500
committerNicolai Hähnle <[email protected]>2016-05-13 01:03:38 -0500
commit43ac091e4c735a50edf61972090ba83126f295e9 (patch)
treec966ccdce404cde65b268b980abe06d1d2031b65 /src/gallium/drivers/r600/sb
parent390c740b99890e8775793965a14eaa4ea14e09a2 (diff)
r600: move alu_op_table to .c file
So that it gets compiled and emitted only once, saving space is the final binary. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/sb')
-rw-r--r--src/gallium/drivers/r600/sb/sb_bc_decoder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_bc_decoder.cpp b/src/gallium/drivers/r600/sb/sb_bc_decoder.cpp
index 1832e2d3e6a..b98b661ee82 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_decoder.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_decoder.cpp
@@ -330,9 +330,9 @@ int bc_decoder::decode_alu(unsigned & i, bc_alu& bc) {
bc.src[2].rel = iw1.get_SRC2_REL();
bc.dst_chan = iw1.get_DST_CHAN();
// TODO: clean up
- for (size_t k = 0; k < sizeof(alu_op_table) / sizeof(alu_op_table[0]); k++) {
- if (((alu_op_table[k].opcode[1] >> 8) & 0xff) == iw1.get_LDS_OP()) {
- bc.op_ptr = &alu_op_table[k];
+ for (size_t k = 0, e = r600_alu_op_table_size(); k != e; k++) {
+ if (((r600_alu_op_table[k].opcode[1] >> 8) & 0xff) == iw1.get_LDS_OP()) {
+ bc.op_ptr = &r600_alu_op_table[k];
bc.op = k;
break;
}