Module: Mesa Branch: master Commit: 06501b3cf07678a8d5e058627fb54cf997092931 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=06501b3cf07678a8d5e058627fb54cf997092931
Author: Matt Turner <[email protected]> Date: Sat Apr 19 20:46:57 2014 -0700 i965/disasm: Remove tables with obvious mappings. Reviewed-by: Kenneth Graunke <[email protected]> --- src/mesa/drivers/dri/i965/brw_disasm.c | 11 +---------- src/mesa/drivers/dri/i965/gen8_disasm.c | 4 +--- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c index 88bf24e..0bc7a64 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 cc3d864..a8b8c7a 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) { _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
