summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/ir3/ir3.c
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2016-03-27 11:40:36 -0400
committerRob Clark <robclark@freedesktop.org>2016-04-04 20:18:18 -0400
commit70735643f4cf660dc3022f40f853a138aea738c2 (patch)
treeb01bdc481b50b5add7cc1fdc0266d8535785043b /src/gallium/drivers/freedreno/ir3/ir3.c
parent5ea3647f89abccea5496824815b5b729f38f7a23 (diff)
downloadexternal_mesa3d-70735643f4cf660dc3022f40f853a138aea738c2.zip
external_mesa3d-70735643f4cf660dc3022f40f853a138aea738c2.tar.gz
external_mesa3d-70735643f4cf660dc3022f40f853a138aea738c2.tar.bz2
freedreno/ir3: encode instruction category in opc_t
Been on my TODO list for a while. If nothing else this will make gdb properly grok the opc_t enum. This first step preserves ir3_instruction::category (with an added assert that category matches what is encoded in opc_t). Next step is to drop the category field (and arg to ir3_instr_create()), but that is split into next commit for bisectability and so that we can run piglit in the intermediate state to flush out any problems. Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3/ir3.c')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3.c b/src/gallium/drivers/freedreno/ir3/ir3.c
index 7d89142d..d86dfca 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3.c
@@ -688,6 +688,7 @@ struct ir3_instruction * ir3_instr_create2(struct ir3_block *block,
struct ir3_instruction *instr = instr_create(block, nreg);
instr->block = block;
instr->category = category;
+ debug_assert(opc_cat(opc) == category);
instr->opc = opc;
insert_instr(block, instr);
return instr;