From b645913ff6c74228d8c05dd236a545ef2e734071 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Fri, 27 Sep 2013 17:37:51 -0700 Subject: [PATCH] i965: Remove the "ARF" register file. The registers in the architecture register file don't share much in common, so there's no point in grouping them together. Use the HW_REG class instead. The vec4 backend already does this. Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.cpp | 6 ------ src/mesa/drivers/dri/i965/brw_fs.h | 10 +++++----- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 3 --- src/mesa/drivers/dri/i965/brw_shader.h | 1 - src/mesa/drivers/dri/i965/brw_vec4.h | 2 +- 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index d287bfdbd10..48ee1499d7d 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2798,12 +2798,6 @@ fs_visitor::dump_instruction(backend_instruction *be_inst) case UNIFORM: printf("***u%d***", inst->dst.reg); break; - case ARF: - if (inst->dst.reg == BRW_ARF_NULL) - printf("(null)"); - else - printf("arf%d", inst->dst.reg); - break; default: printf("???"); break; diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index c59ca51a1f9..5c7089daff1 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -75,10 +75,10 @@ public: bool is_one() const; bool is_valid_3src() const; - /** Register file: ARF, GRF, MRF, IMM. */ + /** Register file: GRF, MRF, IMM. */ enum register_file file; /** - * Register number. For ARF/MRF, it's the hardware register. For + * Register number. For MRF, it's the hardware register. For * GRF, it's a virtual register number until register allocation */ int reg; @@ -107,9 +107,9 @@ public: }; static const fs_reg reg_undef; -static const fs_reg reg_null_f(ARF, BRW_ARF_NULL, BRW_REGISTER_TYPE_F); -static const fs_reg reg_null_d(ARF, BRW_ARF_NULL, BRW_REGISTER_TYPE_D); -static const fs_reg reg_null_ud(ARF, BRW_ARF_NULL, BRW_REGISTER_TYPE_UD); +static const fs_reg reg_null_f(retype(brw_null_reg(), BRW_REGISTER_TYPE_F)); +static const fs_reg reg_null_d(retype(brw_null_reg(), BRW_REGISTER_TYPE_D)); +static const fs_reg reg_null_ud(retype(brw_null_reg(), BRW_REGISTER_TYPE_UD)); class ip_record : public exec_node { public: diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index a35c172c81c..41597735485 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -911,8 +911,6 @@ fs_generator::generate_mov_dispatch_to_flags(fs_inst *inst) static uint32_t brw_file_from_reg(fs_reg *reg) { switch (reg->file) { - case ARF: - return BRW_ARCHITECTURE_REGISTER_FILE; case GRF: return BRW_GENERAL_REGISTER_FILE; case MRF: @@ -932,7 +930,6 @@ brw_reg_from_fs_reg(fs_reg *reg) switch (reg->file) { case GRF: - case ARF: case MRF: if (reg->smear == -1) { brw_reg = brw_vec8_reg(brw_file_from_reg(reg), reg->reg, 0); diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h index 55769ff2e39..4dbd38d4a52 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.h +++ b/src/mesa/drivers/dri/i965/brw_shader.h @@ -29,7 +29,6 @@ enum register_file { BAD_FILE, - ARF, GRF, MRF, IMM, diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 290363e416b..91f1b6442cc 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -97,7 +97,7 @@ swizzle_for_size(int size); class reg { public: - /** Register file: ARF, GRF, MRF, IMM. */ + /** Register file: GRF, MRF, IMM. */ enum register_file file; /** virtual register number. 0 = fixed hw reg */ int reg; -- 2.30.2