From: Matt Turner Date: Sun, 20 Apr 2014 03:46:57 +0000 (-0700) Subject: i965/disasm: Remove tables with obvious mappings. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06501b3cf07678a8d5e058627fb54cf997092931;p=mesa.git i965/disasm: Remove tables with obvious mappings. Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c index 88bf24e17ee..0bc7a6484f9 100644 --- a/src/mesa/drivers/dri/i965/brw_disasm.c +++ b/src/mesa/drivers/dri/i965/brw_disasm.c @@ -1085,19 +1085,10 @@ static int src1 (FILE *file, struct brw_instruction *inst) } } -int esize[6] = { - [0] = 1, - [1] = 2, - [2] = 4, - [3] = 8, - [4] = 16, - [5] = 32, -}; - static int qtr_ctrl(FILE *file, struct brw_instruction *inst) { int qtr_ctl = inst->header.compression_control; - int exec_size = esize[inst->header.execution_size]; + int exec_size = 1 << inst->header.execution_size; if (exec_size == 8) { switch (qtr_ctl) { diff --git a/src/mesa/drivers/dri/i965/gen8_disasm.c b/src/mesa/drivers/dri/i965/gen8_disasm.c index cc3d8647822..a8b8c7a2beb 100644 --- a/src/mesa/drivers/dri/i965/gen8_disasm.c +++ b/src/mesa/drivers/dri/i965/gen8_disasm.c @@ -742,13 +742,11 @@ src1(FILE *file, struct gen8_instruction *inst) } } -static int esize[6] = { 1, 2, 4, 8, 16, 32 }; - static int qtr_ctrl(FILE *file, struct gen8_instruction *inst) { int qtr_ctl = gen8_qtr_control(inst); - int exec_size = esize[gen8_exec_size(inst)]; + int exec_size = 1 << gen8_exec_size(inst); if (exec_size == 8) { switch (qtr_ctl) {