diff --git a/src/intel/compiler/elk/elk_cfg.cpp b/src/intel/compiler/elk/elk_cfg.cpp index 1ebfa13ee15..c1a25983c32 100644 --- a/src/intel/compiler/elk/elk_cfg.cpp +++ b/src/intel/compiler/elk/elk_cfg.cpp @@ -35,7 +35,7 @@ * blocks with successor/predecessor edges connecting them. */ -using namespace brw; +using namespace elk; static bblock_t * pop_stack(exec_list *list) diff --git a/src/intel/compiler/elk/elk_cfg.h b/src/intel/compiler/elk/elk_cfg.h index c617462729e..4f60e0729ec 100644 --- a/src/intel/compiler/elk/elk_cfg.h +++ b/src/intel/compiler/elk/elk_cfg.h @@ -481,7 +481,7 @@ cfg_t::adjust_block_ips() } } -namespace brw { +namespace elk { /** * Immediate dominator tree analysis of a shader. */ diff --git a/src/intel/compiler/elk/elk_dead_control_flow.cpp b/src/intel/compiler/elk/elk_dead_control_flow.cpp index 70afc0b52f1..7bb549a5aac 100644 --- a/src/intel/compiler/elk/elk_dead_control_flow.cpp +++ b/src/intel/compiler/elk/elk_dead_control_flow.cpp @@ -29,7 +29,7 @@ #include "elk_shader.h" #include "elk_cfg.h" -using namespace brw; +using namespace elk; /* Look for and eliminate dead control flow: * diff --git a/src/intel/compiler/elk/elk_fs.cpp b/src/intel/compiler/elk/elk_fs.cpp index c0830561ce1..5a90adf2f0b 100644 --- a/src/intel/compiler/elk/elk_fs.cpp +++ b/src/intel/compiler/elk/elk_fs.cpp @@ -47,7 +47,7 @@ #include -using namespace brw; +using namespace elk; static unsigned get_lowered_simd_width(const fs_visitor *shader, const fs_inst *inst); @@ -2397,7 +2397,7 @@ fs_visitor::opt_algebraic() assert(!inst->saturate); assert(!inst->src[0].abs); assert(!inst->src[0].negate); - const brw::fs_builder ibld(this, block, inst); + const elk::fs_builder ibld(this, block, inst); if (!inst->is_partial_write()) ibld.emit_undef_for_dst(inst); @@ -2418,7 +2418,7 @@ fs_visitor::opt_algebraic() assert(!inst->saturate); assert(!inst->src[0].abs); assert(!inst->src[0].negate); - const brw::fs_builder ibld(this, block, inst); + const elk::fs_builder ibld(this, block, inst); if (!inst->is_partial_write()) ibld.emit_undef_for_dst(inst); @@ -2608,7 +2608,7 @@ fs_visitor::opt_algebraic() assert(!inst->saturate); assert(!inst->src[0].abs && !inst->src[0].negate); assert(!inst->src[1].abs && !inst->src[1].negate); - const brw::fs_builder ibld(this, block, inst); + const elk::fs_builder ibld(this, block, inst); if (!inst->is_partial_write()) ibld.emit_undef_for_dst(inst); @@ -5902,7 +5902,7 @@ fs_visitor::dump_instruction_to_file(const backend_instruction *be_inst, FILE *f fprintf(file, "\n"); } -brw::register_pressure::register_pressure(const fs_visitor *v) +elk::register_pressure::register_pressure(const fs_visitor *v) { const fs_live_variables &live = v->live_analysis.require(); const unsigned num_instructions = v->cfg->num_blocks ? @@ -5928,13 +5928,13 @@ brw::register_pressure::register_pressure(const fs_visitor *v) delete[] payload_last_use_ip; } -brw::register_pressure::~register_pressure() +elk::register_pressure::~register_pressure() { delete[] regs_live_at_ip; } void -fs_visitor::invalidate_analysis(brw::analysis_dependency_class c) +fs_visitor::invalidate_analysis(elk::analysis_dependency_class c) { backend_shader::invalidate_analysis(c); live_analysis.invalidate(c); @@ -8069,9 +8069,9 @@ bool brw_should_print_shader(const nir_shader *shader, uint64_t debug_flag) return INTEL_DEBUG(debug_flag) && (!shader->info.internal || NIR_DEBUG(PRINT_INTERNAL)); } -namespace brw { +namespace elk { fs_reg - fetch_payload_reg(const brw::fs_builder &bld, uint8_t regs[2], + fetch_payload_reg(const elk::fs_builder &bld, uint8_t regs[2], brw_reg_type type, unsigned n) { if (!regs[0]) @@ -8079,7 +8079,7 @@ namespace brw { if (bld.dispatch_width() > 16) { const fs_reg tmp = bld.vgrf(type, n); - const brw::fs_builder hbld = bld.exec_all().group(16, 0); + const elk::fs_builder hbld = bld.exec_all().group(16, 0); const unsigned m = bld.dispatch_width() / hbld.dispatch_width(); fs_reg *const components = new fs_reg[m * n]; @@ -8100,7 +8100,7 @@ namespace brw { } fs_reg - fetch_barycentric_reg(const brw::fs_builder &bld, uint8_t regs[2]) + fetch_barycentric_reg(const elk::fs_builder &bld, uint8_t regs[2]) { if (!regs[0]) return fs_reg(); @@ -8108,7 +8108,7 @@ namespace brw { return fetch_payload_reg(bld, regs, BRW_REGISTER_TYPE_F, 2); const fs_reg tmp = bld.vgrf(BRW_REGISTER_TYPE_F, 2); - const brw::fs_builder hbld = bld.exec_all().group(8, 0); + const elk::fs_builder hbld = bld.exec_all().group(8, 0); const unsigned m = bld.dispatch_width() / hbld.dispatch_width(); fs_reg *const components = new fs_reg[2 * m]; diff --git a/src/intel/compiler/elk/elk_fs.h b/src/intel/compiler/elk/elk_fs.h index bbb08f32dd3..32034a0f4e7 100644 --- a/src/intel/compiler/elk/elk_fs.h +++ b/src/intel/compiler/elk/elk_fs.h @@ -41,7 +41,7 @@ namespace { class fs_visitor; -namespace brw { +namespace elk { /** * Register pressure analysis of a shader. Estimates how many registers * are live at any point of the program in GRF units. @@ -71,7 +71,7 @@ namespace brw { struct brw_gs_compile; -namespace brw { +namespace elk { class fs_builder; } @@ -145,7 +145,7 @@ struct fs_thread_payload : public thread_payload { struct cs_thread_payload : public thread_payload { cs_thread_payload(const fs_visitor &v); - void load_subgroup_id(const brw::fs_builder &bld, fs_reg &dest) const; + void load_subgroup_id(const elk::fs_builder &bld, fs_reg &dest) const; fs_reg local_invocation_id[3]; @@ -193,7 +193,7 @@ public: fs_reg vgrf(const glsl_type *const type); void import_uniforms(fs_visitor *v); - void VARYING_PULL_CONSTANT_LOAD(const brw::fs_builder &bld, + void VARYING_PULL_CONSTANT_LOAD(const elk::fs_builder &bld, const fs_reg &dst, const fs_reg &surface, const fs_reg &surface_handle, @@ -201,7 +201,7 @@ public: uint32_t const_offset, uint8_t alignment, unsigned components); - void DEP_RESOLVE_MOV(const brw::fs_builder &bld, int grf); + void DEP_RESOLVE_MOV(const elk::fs_builder &bld, int grf); bool run_fs(bool allow_spilling, bool do_rep_send); bool run_vs(); @@ -234,7 +234,7 @@ public: bool get_pull_locs(const fs_reg &src, unsigned *out_surf_index, unsigned *out_pull_index); bool lower_constant_loads(); - virtual void invalidate_analysis(brw::analysis_dependency_class c); + virtual void invalidate_analysis(elk::analysis_dependency_class c); #ifndef NDEBUG void validate(); @@ -245,7 +245,7 @@ public: bool opt_algebraic(); bool opt_redundant_halt(); bool opt_cse(); - bool opt_cse_local(const brw::fs_live_variables &live, bblock_t *block, int &ip); + bool opt_cse_local(const elk::fs_live_variables &live, bblock_t *block, int &ip); bool opt_copy_propagation(); bool opt_bank_conflicts(); @@ -296,7 +296,7 @@ public: void set_tcs_invocation_id(); void emit_alpha_test(); - fs_inst *emit_single_fb_write(const brw::fs_builder &bld, + fs_inst *emit_single_fb_write(const elk::fs_builder &bld, fs_reg color1, fs_reg color2, fs_reg src0_alpha, unsigned components); void do_emit_fb_writes(int nr_color_regions, bool replicate_alpha); @@ -309,9 +309,9 @@ public: void emit_urb_fence(); void emit_cs_terminate(); - fs_reg interp_reg(const brw::fs_builder &bld, unsigned location, + fs_reg interp_reg(const elk::fs_builder &bld, unsigned location, unsigned channel, unsigned comp); - fs_reg per_primitive_reg(const brw::fs_builder &bld, + fs_reg per_primitive_reg(const elk::fs_builder &bld, int location, unsigned comp); virtual void dump_instruction_to_file(const backend_instruction *inst, FILE *file) const; @@ -324,9 +324,9 @@ public: struct brw_stage_prog_data *prog_data; - brw_analysis live_analysis; - brw_analysis regpressure_analysis; - brw_analysis performance_analysis; + brw_analysis live_analysis; + brw_analysis regpressure_analysis; + brw_analysis performance_analysis; /** Number of uniform variable components visited. */ unsigned uniforms; @@ -456,7 +456,7 @@ public: void enable_debug(const char *shader_name); int generate_code(const cfg_t *cfg, int dispatch_width, struct shader_stats shader_stats, - const brw::performance &perf, + const elk::performance &perf, struct brw_compile_stats *stats, unsigned max_polygons = 0); void add_const_data(void *data, unsigned size); @@ -539,14 +539,14 @@ private: void *mem_ctx; }; -namespace brw { +namespace elk { fs_reg - fetch_payload_reg(const brw::fs_builder &bld, uint8_t regs[2], + fetch_payload_reg(const elk::fs_builder &bld, uint8_t regs[2], brw_reg_type type = BRW_REGISTER_TYPE_F, unsigned n = 1); fs_reg - fetch_barycentric_reg(const brw::fs_builder &bld, uint8_t regs[2]); + fetch_barycentric_reg(const elk::fs_builder &bld, uint8_t regs[2]); inline fs_reg dynamic_msaa_flags(const struct brw_wm_prog_data *wm_prog_data) @@ -564,19 +564,19 @@ namespace brw { lower_src_modifiers(fs_visitor *v, bblock_t *block, fs_inst *inst, unsigned i); } -void shuffle_from_32bit_read(const brw::fs_builder &bld, +void shuffle_from_32bit_read(const elk::fs_builder &bld, const fs_reg &dst, const fs_reg &src, uint32_t first_component, uint32_t components); -fs_reg setup_imm_df(const brw::fs_builder &bld, +fs_reg setup_imm_df(const elk::fs_builder &bld, double v); -fs_reg setup_imm_b(const brw::fs_builder &bld, +fs_reg setup_imm_b(const elk::fs_builder &bld, int8_t v); -fs_reg setup_imm_ub(const brw::fs_builder &bld, +fs_reg setup_imm_ub(const elk::fs_builder &bld, uint8_t v); enum brw_barycentric_mode brw_barycentric_mode(nir_intrinsic_instr *intr); @@ -588,8 +588,8 @@ void brw_compute_urb_setup_index(struct brw_wm_prog_data *wm_prog_data); bool brw_nir_lower_simd(nir_shader *nir, unsigned dispatch_width); -fs_reg brw_sample_mask_reg(const brw::fs_builder &bld); -void brw_emit_predicate_on_sample_mask(const brw::fs_builder &bld, fs_inst *inst); +fs_reg brw_sample_mask_reg(const elk::fs_builder &bld); +void brw_emit_predicate_on_sample_mask(const elk::fs_builder &bld, fs_inst *inst); int brw_get_subgroup_id_param_index(const intel_device_info *devinfo, const brw_stage_prog_data *prog_data); diff --git a/src/intel/compiler/elk/elk_fs_builder.h b/src/intel/compiler/elk/elk_fs_builder.h index 3d25fe7d7c1..bbaaab5d0d8 100644 --- a/src/intel/compiler/elk/elk_fs_builder.h +++ b/src/intel/compiler/elk/elk_fs_builder.h @@ -30,13 +30,13 @@ #include "elk_eu.h" #include "elk_fs.h" -namespace brw { +namespace elk { /** * Toolbox to assemble an FS IR program out of individual instructions. * * This object is meant to have an interface consistent with - * brw::vec4_builder. They cannot be fully interchangeable because - * brw::fs_builder generates scalar code while brw::vec4_builder generates + * elk::vec4_builder. They cannot be fully interchangeable because + * elk::fs_builder generates scalar code while elk::vec4_builder generates * vector code. */ class fs_builder { @@ -957,7 +957,7 @@ namespace brw { } static inline fs_reg -offset(const fs_reg ®, const brw::fs_builder &bld, unsigned delta) +offset(const fs_reg ®, const elk::fs_builder &bld, unsigned delta) { return offset(reg, bld.dispatch_width(), delta); } diff --git a/src/intel/compiler/elk/elk_fs_cmod_propagation.cpp b/src/intel/compiler/elk/elk_fs_cmod_propagation.cpp index d282b1ac4d5..deab933acd8 100644 --- a/src/intel/compiler/elk/elk_fs_cmod_propagation.cpp +++ b/src/intel/compiler/elk/elk_fs_cmod_propagation.cpp @@ -48,7 +48,7 @@ * exists and therefore remove the instruction. */ -using namespace brw; +using namespace elk; static bool cmod_propagate_cmp_to_add(const intel_device_info *devinfo, bblock_t *block, diff --git a/src/intel/compiler/elk/elk_fs_combine_constants.cpp b/src/intel/compiler/elk/elk_fs_combine_constants.cpp index 3de619a9414..a221dd7d9fe 100644 --- a/src/intel/compiler/elk/elk_fs_combine_constants.cpp +++ b/src/intel/compiler/elk/elk_fs_combine_constants.cpp @@ -39,7 +39,7 @@ #include "elk_cfg.h" #include "util/half_float.h" -using namespace brw; +using namespace elk; static const bool debug = false; @@ -1193,7 +1193,7 @@ struct register_allocation { static fs_reg allocate_slots(struct register_allocation *regs, unsigned num_regs, unsigned bytes, unsigned align_bytes, - brw::simple_allocator &alloc) + elk::simple_allocator &alloc) { assert(bytes == 2 || bytes == 4 || bytes == 8); assert(align_bytes == 2 || align_bytes == 4 || align_bytes == 8); @@ -1248,7 +1248,7 @@ deallocate_slots(struct register_allocation *regs, unsigned num_regs, static void parcel_out_registers(struct imm *imm, unsigned len, const bblock_t *cur_block, struct register_allocation *regs, unsigned num_regs, - brw::simple_allocator &alloc, unsigned ver) + elk::simple_allocator &alloc, unsigned ver) { /* Each basic block has two distinct set of constants. There is the set of * constants that only have uses in that block, and there is the set of @@ -1325,7 +1325,7 @@ fs_visitor::opt_combine_constants() table.num_boxes = 0; table.boxes = ralloc_array(const_ctx, fs_inst_box, table.size_boxes); - const brw::idom_tree &idom = idom_analysis.require(); + const elk::idom_tree &idom = idom_analysis.require(); unsigned ip = -1; /* Make a pass through all instructions and count the number of times each diff --git a/src/intel/compiler/elk/elk_fs_copy_propagation.cpp b/src/intel/compiler/elk/elk_fs_copy_propagation.cpp index 8f434da27c8..d1f8656cb32 100644 --- a/src/intel/compiler/elk/elk_fs_copy_propagation.cpp +++ b/src/intel/compiler/elk/elk_fs_copy_propagation.cpp @@ -40,7 +40,7 @@ #include "elk_cfg.h" #include "elk_eu.h" -using namespace brw; +using namespace elk; namespace { /* avoid conflict with opt_copy_propagation_elements */ struct acp_entry { @@ -660,7 +660,7 @@ instruction_requires_packed_data(fs_inst *inst) static bool try_copy_propagate(const brw_compiler *compiler, fs_inst *inst, acp_entry *entry, int arg, - const brw::simple_allocator &alloc, + const elk::simple_allocator &alloc, uint8_t max_polygons) { if (inst->src[arg].file != VGRF) @@ -1276,7 +1276,7 @@ can_propagate_from(fs_inst *inst) static bool opt_copy_propagation_local(const brw_compiler *compiler, linear_ctx *lin_ctx, bblock_t *block, struct acp &acp, - const brw::simple_allocator &alloc, + const elk::simple_allocator &alloc, uint8_t max_polygons) { bool progress = false; diff --git a/src/intel/compiler/elk/elk_fs_cse.cpp b/src/intel/compiler/elk/elk_fs_cse.cpp index dfa744ffc79..09fef1995f0 100644 --- a/src/intel/compiler/elk/elk_fs_cse.cpp +++ b/src/intel/compiler/elk/elk_fs_cse.cpp @@ -33,7 +33,7 @@ * 13.1 (p378). */ -using namespace brw; +using namespace elk; namespace { struct aeb_entry : public exec_node { diff --git a/src/intel/compiler/elk/elk_fs_dead_code_eliminate.cpp b/src/intel/compiler/elk/elk_fs_dead_code_eliminate.cpp index 17d62a65e89..fa86aef131d 100644 --- a/src/intel/compiler/elk/elk_fs_dead_code_eliminate.cpp +++ b/src/intel/compiler/elk/elk_fs_dead_code_eliminate.cpp @@ -34,7 +34,7 @@ * yet in the tail end of this block. */ -using namespace brw; +using namespace elk; /** * Is it safe to eliminate the instruction? diff --git a/src/intel/compiler/elk/elk_fs_generator.cpp b/src/intel/compiler/elk/elk_fs_generator.cpp index 1e9cbf9b73a..e1895a6e2e4 100644 --- a/src/intel/compiler/elk/elk_fs_generator.cpp +++ b/src/intel/compiler/elk/elk_fs_generator.cpp @@ -1624,7 +1624,7 @@ translate_systolic_depth(unsigned d) int fs_generator::generate_code(const cfg_t *cfg, int dispatch_width, struct shader_stats shader_stats, - const brw::performance &perf, + const elk::performance &perf, struct brw_compile_stats *stats, unsigned max_polygons) { diff --git a/src/intel/compiler/elk/elk_fs_live_variables.cpp b/src/intel/compiler/elk/elk_fs_live_variables.cpp index c7101ace125..e2b5d7897b6 100644 --- a/src/intel/compiler/elk/elk_fs_live_variables.cpp +++ b/src/intel/compiler/elk/elk_fs_live_variables.cpp @@ -28,7 +28,7 @@ #include "elk_fs.h" #include "elk_fs_live_variables.h" -using namespace brw; +using namespace elk; #define MAX_INSTRUCTION (1 << 30) diff --git a/src/intel/compiler/elk/elk_fs_live_variables.h b/src/intel/compiler/elk/elk_fs_live_variables.h index de687175572..3d9f646a059 100644 --- a/src/intel/compiler/elk/elk_fs_live_variables.h +++ b/src/intel/compiler/elk/elk_fs_live_variables.h @@ -35,7 +35,7 @@ struct cfg_t; struct backend_shader; -namespace brw { +namespace elk { class fs_live_variables { public: @@ -143,6 +143,6 @@ protected: void *mem_ctx; }; -} /* namespace brw */ +} /* namespace elk */ #endif /* ELK_FS_LIVE_VARIABLES_H */ diff --git a/src/intel/compiler/elk/elk_fs_lower_pack.cpp b/src/intel/compiler/elk/elk_fs_lower_pack.cpp index 4cd25dcd622..9a033b500ef 100644 --- a/src/intel/compiler/elk/elk_fs_lower_pack.cpp +++ b/src/intel/compiler/elk/elk_fs_lower_pack.cpp @@ -26,7 +26,7 @@ #include "elk_cfg.h" #include "elk_fs_builder.h" -using namespace brw; +using namespace elk; bool fs_visitor::lower_pack() diff --git a/src/intel/compiler/elk/elk_fs_lower_regioning.cpp b/src/intel/compiler/elk/elk_fs_lower_regioning.cpp index 7ffdef700dc..de5882049eb 100644 --- a/src/intel/compiler/elk/elk_fs_lower_regioning.cpp +++ b/src/intel/compiler/elk/elk_fs_lower_regioning.cpp @@ -25,7 +25,7 @@ #include "elk_cfg.h" #include "elk_fs_builder.h" -using namespace brw; +using namespace elk; namespace { /* From the SKL PRM Vol 2a, "Move": @@ -404,7 +404,7 @@ namespace { lower_instruction(fs_visitor *v, bblock_t *block, fs_inst *inst); } -namespace brw { +namespace elk { /** * Remove any modifiers from the \p i-th source region of the instruction, * including negate, abs and any implicit type conversion to the execution diff --git a/src/intel/compiler/elk/elk_fs_nir.cpp b/src/intel/compiler/elk/elk_fs_nir.cpp index a9f44499967..cb978ea3cfb 100644 --- a/src/intel/compiler/elk/elk_fs_nir.cpp +++ b/src/intel/compiler/elk/elk_fs_nir.cpp @@ -33,7 +33,7 @@ #include -using namespace brw; +using namespace elk; struct brw_fs_bind_info { bool valid; @@ -4704,7 +4704,7 @@ add_rebuild_src(nir_src *src, void *state) } static fs_reg -try_rebuild_resource(nir_to_brw_state &ntb, const brw::fs_builder &bld, nir_def *resource_def) +try_rebuild_resource(nir_to_brw_state &ntb, const elk::fs_builder &bld, nir_def *resource_def) { /* Create a build at the location of the resource_intel intrinsic */ fs_builder ubld8 = bld.exec_all().group(8, 0); @@ -4862,7 +4862,7 @@ try_rebuild_resource(nir_to_brw_state &ntb, const brw::fs_builder &bld, nir_def } static fs_reg -get_nir_image_intrinsic_image(nir_to_brw_state &ntb, const brw::fs_builder &bld, +get_nir_image_intrinsic_image(nir_to_brw_state &ntb, const elk::fs_builder &bld, nir_intrinsic_instr *instr) { if (is_resource_src(instr->src[0])) { @@ -4878,7 +4878,7 @@ get_nir_image_intrinsic_image(nir_to_brw_state &ntb, const brw::fs_builder &bld, } static fs_reg -get_nir_buffer_intrinsic_index(nir_to_brw_state &ntb, const brw::fs_builder &bld, +get_nir_buffer_intrinsic_index(nir_to_brw_state &ntb, const elk::fs_builder &bld, nir_intrinsic_instr *instr) { /* SSBO stores are weird in that their index is in src[1] */ @@ -4922,7 +4922,7 @@ get_nir_buffer_intrinsic_index(nir_to_brw_state &ntb, const brw::fs_builder &bld */ static fs_reg swizzle_nir_scratch_addr(nir_to_brw_state &ntb, - const brw::fs_builder &bld, + const elk::fs_builder &bld, const fs_reg &nir_addr, bool in_dwords) { diff --git a/src/intel/compiler/elk/elk_fs_reg_allocate.cpp b/src/intel/compiler/elk/elk_fs_reg_allocate.cpp index b4497339560..671b6fd14d9 100644 --- a/src/intel/compiler/elk/elk_fs_reg_allocate.cpp +++ b/src/intel/compiler/elk/elk_fs_reg_allocate.cpp @@ -32,7 +32,7 @@ #include "util/set.h" #include "util/register_allocate.h" -using namespace brw; +using namespace elk; #define REG_CLASS_COUNT 20 diff --git a/src/intel/compiler/elk/elk_fs_register_coalesce.cpp b/src/intel/compiler/elk/elk_fs_register_coalesce.cpp index f1ac62670a8..5b71be0a4c8 100644 --- a/src/intel/compiler/elk/elk_fs_register_coalesce.cpp +++ b/src/intel/compiler/elk/elk_fs_register_coalesce.cpp @@ -44,7 +44,7 @@ #include "elk_cfg.h" #include "elk_fs_live_variables.h" -using namespace brw; +using namespace elk; static bool is_nop_mov(const fs_inst *inst) diff --git a/src/intel/compiler/elk/elk_fs_saturate_propagation.cpp b/src/intel/compiler/elk/elk_fs_saturate_propagation.cpp index 9021112046d..8a49a39296f 100644 --- a/src/intel/compiler/elk/elk_fs_saturate_propagation.cpp +++ b/src/intel/compiler/elk/elk_fs_saturate_propagation.cpp @@ -25,7 +25,7 @@ #include "elk_fs_live_variables.h" #include "elk_cfg.h" -using namespace brw; +using namespace elk; /** @file elk_fs_saturate_propagation.cpp * diff --git a/src/intel/compiler/elk/elk_fs_sel_peephole.cpp b/src/intel/compiler/elk/elk_fs_sel_peephole.cpp index 939ef985bc3..5090d44ae95 100644 --- a/src/intel/compiler/elk/elk_fs_sel_peephole.cpp +++ b/src/intel/compiler/elk/elk_fs_sel_peephole.cpp @@ -38,7 +38,7 @@ */ #define MAX_MOVS 8 /**< The maximum number of MOVs to attempt to match. */ -using namespace brw; +using namespace elk; /** * Scans forwards from an IF counting consecutive MOV instructions in the diff --git a/src/intel/compiler/elk/elk_fs_thread_payload.cpp b/src/intel/compiler/elk/elk_fs_thread_payload.cpp index c2e79e462cd..37f8a151b16 100644 --- a/src/intel/compiler/elk/elk_fs_thread_payload.cpp +++ b/src/intel/compiler/elk/elk_fs_thread_payload.cpp @@ -24,7 +24,7 @@ #include "elk_fs.h" #include "elk_fs_builder.h" -using namespace brw; +using namespace elk; vs_thread_payload::vs_thread_payload(const fs_visitor &v) { diff --git a/src/intel/compiler/elk/elk_fs_visitor.cpp b/src/intel/compiler/elk/elk_fs_visitor.cpp index 167e483c434..9def6055a74 100644 --- a/src/intel/compiler/elk/elk_fs_visitor.cpp +++ b/src/intel/compiler/elk/elk_fs_visitor.cpp @@ -33,7 +33,7 @@ #include "elk_nir.h" #include "compiler/glsl_types.h" -using namespace brw; +using namespace elk; /* Input data is organized with first the per-primitive values, followed * by per-vertex values. The per-vertex will have interpolation information diff --git a/src/intel/compiler/elk/elk_gfx6_gs_visitor.cpp b/src/intel/compiler/elk/elk_gfx6_gs_visitor.cpp index 5fe0b9e0a88..188d1935a36 100644 --- a/src/intel/compiler/elk/elk_gfx6_gs_visitor.cpp +++ b/src/intel/compiler/elk/elk_gfx6_gs_visitor.cpp @@ -33,7 +33,7 @@ #include "elk_eu.h" #include "elk_prim.h" -namespace brw { +namespace elk { void gfx6_gs_visitor::emit_prolog() @@ -699,4 +699,4 @@ gfx6_gs_visitor::get_vertex_output_offset_for_varying(int vertex, int varying) return vertex * (prog_data->vue_map.num_slots + 1) + slot; } -} /* namespace brw */ +} /* namespace elk */ diff --git a/src/intel/compiler/elk/elk_gfx6_gs_visitor.h b/src/intel/compiler/elk/elk_gfx6_gs_visitor.h index fa12191510a..c0a35713e1f 100644 --- a/src/intel/compiler/elk/elk_gfx6_gs_visitor.h +++ b/src/intel/compiler/elk/elk_gfx6_gs_visitor.h @@ -30,7 +30,7 @@ #ifdef __cplusplus -namespace brw { +namespace elk { class gfx6_gs_visitor : public vec4_gs_visitor { @@ -77,7 +77,7 @@ private: src_reg destination_indices; }; -} /* namespace brw */ +} /* namespace elk */ #endif /* __cplusplus */ diff --git a/src/intel/compiler/elk/elk_ir_allocator.h b/src/intel/compiler/elk/elk_ir_allocator.h index 9a4624e5d55..e26a3f5c4dc 100644 --- a/src/intel/compiler/elk/elk_ir_allocator.h +++ b/src/intel/compiler/elk/elk_ir_allocator.h @@ -31,7 +31,7 @@ #include "util/rounding.h" #include "util/u_math.h" -namespace brw { +namespace elk { /** * Simple allocator used to keep track of virtual GRFs. */ diff --git a/src/intel/compiler/elk/elk_ir_analysis.h b/src/intel/compiler/elk/elk_ir_analysis.h index 3afe4e4c6a6..c9fe69be15a 100644 --- a/src/intel/compiler/elk/elk_ir_analysis.h +++ b/src/intel/compiler/elk/elk_ir_analysis.h @@ -25,7 +25,7 @@ #ifndef ELK_IR_ANALYSIS_H #define ELK_IR_ANALYSIS_H -namespace brw { +namespace elk { /** * Bitset of state categories that can influence the result of IR analysis * passes. @@ -122,7 +122,7 @@ namespace brw { * \p C. * * - 'x.dependency_class()' on const \p x returns a bitset of - * brw::analysis_dependency_class specifying the set of IR objects that are + * elk::analysis_dependency_class specifying the set of IR objects that are * required to remain invariant for the cached analysis result to be * considered valid. * @@ -176,7 +176,7 @@ public: * have to be discarded. */ void - invalidate(brw::analysis_dependency_class c) + invalidate(elk::analysis_dependency_class c) { if (p && (c & p->dependency_class())) { delete p; diff --git a/src/intel/compiler/elk/elk_ir_fs.h b/src/intel/compiler/elk/elk_ir_fs.h index f1636495349..cef51228feb 100644 --- a/src/intel/compiler/elk/elk_ir_fs.h +++ b/src/intel/compiler/elk/elk_ir_fs.h @@ -724,7 +724,7 @@ is_multi_copy_payload(const fs_inst *inst) { * instruction. */ inline bool -is_coalescing_payload(const brw::simple_allocator &alloc, const fs_inst *inst) +is_coalescing_payload(const elk::simple_allocator &alloc, const fs_inst *inst) { return is_identity_payload(VGRF, inst) && inst->src[0].offset == 0 && diff --git a/src/intel/compiler/elk/elk_ir_performance.cpp b/src/intel/compiler/elk/elk_ir_performance.cpp index 4c9f8320388..4aa7c18330e 100644 --- a/src/intel/compiler/elk/elk_ir_performance.cpp +++ b/src/intel/compiler/elk/elk_ir_performance.cpp @@ -26,7 +26,7 @@ #include "elk_vec4.h" #include "elk_cfg.h" -using namespace brw; +using namespace elk; namespace { /** @@ -1675,19 +1675,19 @@ namespace { } } -brw::performance::performance(const fs_visitor *v) : +elk::performance::performance(const fs_visitor *v) : block_latency(new unsigned[v->cfg->num_blocks]) { calculate_performance(*this, v, issue_fs_inst, v->dispatch_width); } -brw::performance::performance(const vec4_visitor *v) : +elk::performance::performance(const vec4_visitor *v) : block_latency(new unsigned[v->cfg->num_blocks]) { calculate_performance(*this, v, issue_vec4_instruction, 8); } -brw::performance::~performance() +elk::performance::~performance() { delete[] block_latency; } diff --git a/src/intel/compiler/elk/elk_ir_performance.h b/src/intel/compiler/elk/elk_ir_performance.h index 63b08d455d7..70400889467 100644 --- a/src/intel/compiler/elk/elk_ir_performance.h +++ b/src/intel/compiler/elk/elk_ir_performance.h @@ -27,7 +27,7 @@ class fs_visitor; -namespace brw { +namespace elk { class vec4_visitor; /** diff --git a/src/intel/compiler/elk/elk_ir_vec4.h b/src/intel/compiler/elk/elk_ir_vec4.h index 2819c2fb536..c0fd0298a9e 100644 --- a/src/intel/compiler/elk/elk_ir_vec4.h +++ b/src/intel/compiler/elk/elk_ir_vec4.h @@ -27,7 +27,7 @@ #include "elk_shader.h" -namespace brw { +namespace elk { class dst_reg; @@ -470,6 +470,6 @@ get_exec_type_size(const vec4_instruction *inst) return type_sz(get_exec_type(inst)); } -} /* namespace brw */ +} /* namespace elk */ #endif diff --git a/src/intel/compiler/elk/elk_lower_logical_sends.cpp b/src/intel/compiler/elk/elk_lower_logical_sends.cpp index a177614ab5a..4f73ce73c13 100644 --- a/src/intel/compiler/elk/elk_lower_logical_sends.cpp +++ b/src/intel/compiler/elk/elk_lower_logical_sends.cpp @@ -29,7 +29,7 @@ #include "elk_fs.h" #include "elk_fs_builder.h" -using namespace brw; +using namespace elk; static void lower_urb_read_logical_send(const fs_builder &bld, fs_inst *inst) diff --git a/src/intel/compiler/elk/elk_predicated_break.cpp b/src/intel/compiler/elk/elk_predicated_break.cpp index 1ce26124e4e..d5bca2aa7c5 100644 --- a/src/intel/compiler/elk/elk_predicated_break.cpp +++ b/src/intel/compiler/elk/elk_predicated_break.cpp @@ -23,7 +23,7 @@ #include "elk_shader.h" -using namespace brw; +using namespace elk; /** @file elk_predicated_break.cpp * diff --git a/src/intel/compiler/elk/elk_schedule_instructions.cpp b/src/intel/compiler/elk/elk_schedule_instructions.cpp index 19068a0e4ce..6e08642da10 100644 --- a/src/intel/compiler/elk/elk_schedule_instructions.cpp +++ b/src/intel/compiler/elk/elk_schedule_instructions.cpp @@ -33,7 +33,7 @@ #include "elk_shader.h" #include -using namespace brw; +using namespace elk; /** @file elk_fs_schedule_instructions.cpp * diff --git a/src/intel/compiler/elk/elk_shader.cpp b/src/intel/compiler/elk/elk_shader.cpp index 77bc9cd64da..dcac281e3f1 100644 --- a/src/intel/compiler/elk/elk_shader.cpp +++ b/src/intel/compiler/elk/elk_shader.cpp @@ -1273,7 +1273,7 @@ backend_shader::calculate_cfg() } void -backend_shader::invalidate_analysis(brw::analysis_dependency_class c) +backend_shader::invalidate_analysis(elk::analysis_dependency_class c) { idom_analysis.invalidate(c); } @@ -1406,7 +1406,7 @@ brw_compile_tes(const struct brw_compiler *compiler, assembly = g.get_assembly(); } else { - brw::vec4_tes_visitor v(compiler, ¶ms->base, key, prog_data, + elk::vec4_tes_visitor v(compiler, ¶ms->base, key, prog_data, nir, debug_enabled); if (!v.run()) { params->base.error_str = diff --git a/src/intel/compiler/elk/elk_shader.h b/src/intel/compiler/elk/elk_shader.h index 859fd46c19e..f613af7744c 100644 --- a/src/intel/compiler/elk/elk_shader.h +++ b/src/intel/compiler/elk/elk_shader.h @@ -72,12 +72,12 @@ public: exec_list instructions; cfg_t *cfg; - brw_analysis idom_analysis; + brw_analysis idom_analysis; gl_shader_stage stage; bool debug_enabled; - brw::simple_allocator alloc; + elk::simple_allocator alloc; virtual void dump_instruction_to_file(const backend_instruction *inst, FILE *file) const = 0; virtual void dump_instructions_to_file(FILE *file) const; @@ -90,7 +90,7 @@ public: void calculate_cfg(); - virtual void invalidate_analysis(brw::analysis_dependency_class c); + virtual void invalidate_analysis(elk::analysis_dependency_class c); }; #else diff --git a/src/intel/compiler/elk/elk_test_fs_cmod_propagation.cpp b/src/intel/compiler/elk/elk_test_fs_cmod_propagation.cpp index 4b27df31640..7c35541e9e0 100644 --- a/src/intel/compiler/elk/elk_test_fs_cmod_propagation.cpp +++ b/src/intel/compiler/elk/elk_test_fs_cmod_propagation.cpp @@ -26,7 +26,7 @@ #include "elk_fs_builder.h" #include "elk_cfg.h" -using namespace brw; +using namespace elk; class cmod_propagation_test : public ::testing::Test { protected: diff --git a/src/intel/compiler/elk/elk_test_fs_combine_constants.cpp b/src/intel/compiler/elk/elk_test_fs_combine_constants.cpp index 7e39a0f442f..83e10f9ef62 100644 --- a/src/intel/compiler/elk/elk_test_fs_combine_constants.cpp +++ b/src/intel/compiler/elk/elk_test_fs_combine_constants.cpp @@ -8,7 +8,7 @@ #include "elk_fs_builder.h" #include "elk_cfg.h" -using namespace brw; +using namespace elk; struct FSCombineConstantsTest : public ::testing::Test { FSCombineConstantsTest() { diff --git a/src/intel/compiler/elk/elk_test_fs_copy_propagation.cpp b/src/intel/compiler/elk/elk_test_fs_copy_propagation.cpp index f59998d8fb7..de17e4a210c 100644 --- a/src/intel/compiler/elk/elk_test_fs_copy_propagation.cpp +++ b/src/intel/compiler/elk/elk_test_fs_copy_propagation.cpp @@ -26,7 +26,7 @@ #include "elk_fs_builder.h" #include "elk_cfg.h" -using namespace brw; +using namespace elk; class copy_propagation_test : public ::testing::Test { protected: diff --git a/src/intel/compiler/elk/elk_test_fs_saturate_propagation.cpp b/src/intel/compiler/elk/elk_test_fs_saturate_propagation.cpp index 37af0d7aaee..dab4007af6e 100644 --- a/src/intel/compiler/elk/elk_test_fs_saturate_propagation.cpp +++ b/src/intel/compiler/elk/elk_test_fs_saturate_propagation.cpp @@ -26,7 +26,7 @@ #include "elk_fs_builder.h" #include "elk_cfg.h" -using namespace brw; +using namespace elk; class saturate_propagation_test : public ::testing::Test { protected: diff --git a/src/intel/compiler/elk/elk_test_predicated_break.cpp b/src/intel/compiler/elk/elk_test_predicated_break.cpp index 7b6b4b29463..f939db8a47f 100644 --- a/src/intel/compiler/elk/elk_test_predicated_break.cpp +++ b/src/intel/compiler/elk/elk_test_predicated_break.cpp @@ -8,7 +8,7 @@ #include "elk_fs_builder.h" #include "elk_cfg.h" -using namespace brw; +using namespace elk; class PredicatedBreakTest : public ::testing::Test { virtual void SetUp(); diff --git a/src/intel/compiler/elk/elk_test_vec4_cmod_propagation.cpp b/src/intel/compiler/elk/elk_test_vec4_cmod_propagation.cpp index 9fdf2545f49..d636ca7df7f 100644 --- a/src/intel/compiler/elk/elk_test_vec4_cmod_propagation.cpp +++ b/src/intel/compiler/elk/elk_test_vec4_cmod_propagation.cpp @@ -28,7 +28,7 @@ #include "elk_vec4_builder.h" #include "elk_cfg.h" -using namespace brw; +using namespace elk; class cmod_propagation_vec4_test : public ::testing::Test { virtual void SetUp(); diff --git a/src/intel/compiler/elk/elk_test_vec4_copy_propagation.cpp b/src/intel/compiler/elk/elk_test_vec4_copy_propagation.cpp index 84ba4ea2120..8e55cf2b34a 100644 --- a/src/intel/compiler/elk/elk_test_vec4_copy_propagation.cpp +++ b/src/intel/compiler/elk/elk_test_vec4_copy_propagation.cpp @@ -24,7 +24,7 @@ #include #include "elk_vec4.h" -using namespace brw; +using namespace elk; class copy_propagation_vec4_test : public ::testing::Test { virtual void SetUp(); diff --git a/src/intel/compiler/elk/elk_test_vec4_dead_code_eliminate.cpp b/src/intel/compiler/elk/elk_test_vec4_dead_code_eliminate.cpp index ba7c1b745cf..7ec4e563f4d 100644 --- a/src/intel/compiler/elk/elk_test_vec4_dead_code_eliminate.cpp +++ b/src/intel/compiler/elk/elk_test_vec4_dead_code_eliminate.cpp @@ -24,7 +24,7 @@ #include #include "elk_vec4.h" -using namespace brw; +using namespace elk; class dead_code_eliminate_vec4_test : public ::testing::Test { virtual void SetUp(); diff --git a/src/intel/compiler/elk/elk_test_vec4_register_coalesce.cpp b/src/intel/compiler/elk/elk_test_vec4_register_coalesce.cpp index 65e00af51a0..160674dbcfa 100644 --- a/src/intel/compiler/elk/elk_test_vec4_register_coalesce.cpp +++ b/src/intel/compiler/elk/elk_test_vec4_register_coalesce.cpp @@ -24,7 +24,7 @@ #include #include "elk_vec4.h" -using namespace brw; +using namespace elk; #define register_coalesce(v) _register_coalesce(v, __func__) diff --git a/src/intel/compiler/elk/elk_vec4.cpp b/src/intel/compiler/elk/elk_vec4.cpp index 87a81bb943e..7bfa4a1e9e8 100644 --- a/src/intel/compiler/elk/elk_vec4.cpp +++ b/src/intel/compiler/elk/elk_vec4.cpp @@ -35,9 +35,9 @@ #define MAX_INSTRUCTION (1 << 30) -using namespace brw; +using namespace elk; -namespace brw { +namespace elk { void src_reg::init() @@ -2357,7 +2357,7 @@ vec4_visitor::apply_logical_swizzle(struct brw_reg *hw_reg, } void -vec4_visitor::invalidate_analysis(brw::analysis_dependency_class c) +vec4_visitor::invalidate_analysis(elk::analysis_dependency_class c) { backend_shader::invalidate_analysis(c); live_analysis.invalidate(c); @@ -2543,7 +2543,7 @@ vec4_visitor::run() return !failed; } -} /* namespace brw */ +} /* namespace elk */ extern "C" { diff --git a/src/intel/compiler/elk/elk_vec4.h b/src/intel/compiler/elk/elk_vec4.h index 13243d36b16..66389e4af3a 100644 --- a/src/intel/compiler/elk/elk_vec4.h +++ b/src/intel/compiler/elk/elk_vec4.h @@ -47,13 +47,13 @@ brw_vec4_generate_assembly(const struct brw_compiler *compiler, const nir_shader *nir, struct brw_vue_prog_data *prog_data, const struct cfg_t *cfg, - const brw::performance &perf, + const elk::performance &perf, bool debug_enabled); #ifdef __cplusplus } /* extern "C" */ -namespace brw { +namespace elk { /** * The vertex shader front-end. * @@ -107,8 +107,8 @@ public: unsigned ubo_push_start[4]; unsigned push_length; unsigned int max_grf; - brw_analysis live_analysis; - brw_analysis performance_analysis; + brw_analysis live_analysis; + brw_analysis performance_analysis; /* Regs for vertex results. Generated at ir_variable visiting time * for the ir->location's used. @@ -131,7 +131,7 @@ public: void move_grf_array_access_to_scratch(); void split_uniform_registers(); void setup_push_ranges(); - virtual void invalidate_analysis(brw::analysis_dependency_class c); + virtual void invalidate_analysis(elk::analysis_dependency_class c); void split_virtual_grfs(); bool opt_vector_float(); bool opt_reduce_swizzle(); @@ -344,7 +344,7 @@ private: unsigned last_scratch; /**< measured in 32-byte (register size) units */ }; -} /* namespace brw */ +} /* namespace elk */ #endif /* __cplusplus */ #endif /* ELK_VEC4_H */ diff --git a/src/intel/compiler/elk/elk_vec4_builder.h b/src/intel/compiler/elk/elk_vec4_builder.h index 85c951ddfe1..3d4005b8815 100644 --- a/src/intel/compiler/elk/elk_vec4_builder.h +++ b/src/intel/compiler/elk/elk_vec4_builder.h @@ -28,22 +28,22 @@ #include "elk_ir_vec4.h" #include "elk_ir_allocator.h" -namespace brw { +namespace elk { /** * Toolbox to assemble a VEC4 IR program out of individual instructions. * * This object is meant to have an interface consistent with - * brw::fs_builder. They cannot be fully interchangeable because - * brw::fs_builder generates scalar code while brw::vec4_builder generates + * elk::fs_builder. They cannot be fully interchangeable because + * elk::fs_builder generates scalar code while elk::vec4_builder generates * vector code. */ class vec4_builder { public: /** Type used in this IR to represent a source of an instruction. */ - typedef brw::src_reg src_reg; + typedef elk::src_reg src_reg; /** Type used in this IR to represent the destination of an instruction. */ - typedef brw::dst_reg dst_reg; + typedef elk::dst_reg dst_reg; /** Type used in this IR to represent an instruction. */ typedef vec4_instruction instruction; diff --git a/src/intel/compiler/elk/elk_vec4_cmod_propagation.cpp b/src/intel/compiler/elk/elk_vec4_cmod_propagation.cpp index e1a9584993f..30a8da19f4e 100644 --- a/src/intel/compiler/elk/elk_vec4_cmod_propagation.cpp +++ b/src/intel/compiler/elk/elk_vec4_cmod_propagation.cpp @@ -33,7 +33,7 @@ #include "elk_cfg.h" #include "elk_eu.h" -namespace brw { +namespace elk { static bool writemasks_incompatible(const vec4_instruction *earlier, @@ -362,4 +362,4 @@ vec4_visitor::opt_cmod_propagation() return progress; } -} /* namespace brw */ +} /* namespace elk */ diff --git a/src/intel/compiler/elk/elk_vec4_copy_propagation.cpp b/src/intel/compiler/elk/elk_vec4_copy_propagation.cpp index d6a352f5d42..61c873333b6 100644 --- a/src/intel/compiler/elk/elk_vec4_copy_propagation.cpp +++ b/src/intel/compiler/elk/elk_vec4_copy_propagation.cpp @@ -33,7 +33,7 @@ #include "elk_cfg.h" #include "elk_eu.h" -namespace brw { +namespace elk { struct copy_entry { src_reg *value[4]; @@ -553,4 +553,4 @@ vec4_visitor::opt_copy_propagation(bool do_constant_prop) return progress; } -} /* namespace brw */ +} /* namespace elk */ diff --git a/src/intel/compiler/elk/elk_vec4_cse.cpp b/src/intel/compiler/elk/elk_vec4_cse.cpp index db8256e2f6c..47ea7caadb8 100644 --- a/src/intel/compiler/elk/elk_vec4_cse.cpp +++ b/src/intel/compiler/elk/elk_vec4_cse.cpp @@ -25,7 +25,7 @@ #include "elk_vec4_live_variables.h" #include "elk_cfg.h" -using namespace brw; +using namespace elk; /** @file elk_vec4_cse.cpp * diff --git a/src/intel/compiler/elk/elk_vec4_dead_code_eliminate.cpp b/src/intel/compiler/elk/elk_vec4_dead_code_eliminate.cpp index 3949690f107..5de07c25524 100644 --- a/src/intel/compiler/elk/elk_vec4_dead_code_eliminate.cpp +++ b/src/intel/compiler/elk/elk_vec4_dead_code_eliminate.cpp @@ -34,7 +34,7 @@ * yet in the tail end of this block. */ -using namespace brw; +using namespace elk; bool vec4_visitor::dead_code_eliminate() diff --git a/src/intel/compiler/elk/elk_vec4_generator.cpp b/src/intel/compiler/elk/elk_vec4_generator.cpp index 542f3c6d909..4d508fd1e9c 100644 --- a/src/intel/compiler/elk/elk_vec4_generator.cpp +++ b/src/intel/compiler/elk/elk_vec4_generator.cpp @@ -27,7 +27,7 @@ #include "dev/intel_debug.h" #include "util/mesa-sha1.h" -using namespace brw; +using namespace elk; static void generate_math1_gfx4(struct brw_codegen *p, diff --git a/src/intel/compiler/elk/elk_vec4_gs_nir.cpp b/src/intel/compiler/elk/elk_vec4_gs_nir.cpp index 956ef93f564..3f586997655 100644 --- a/src/intel/compiler/elk/elk_vec4_gs_nir.cpp +++ b/src/intel/compiler/elk/elk_vec4_gs_nir.cpp @@ -23,7 +23,7 @@ #include "elk_vec4_gs_visitor.h" -namespace brw { +namespace elk { void vec4_gs_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr) diff --git a/src/intel/compiler/elk/elk_vec4_gs_visitor.cpp b/src/intel/compiler/elk/elk_vec4_gs_visitor.cpp index 803d2edcf45..44d7240655b 100644 --- a/src/intel/compiler/elk/elk_vec4_gs_visitor.cpp +++ b/src/intel/compiler/elk/elk_vec4_gs_visitor.cpp @@ -37,7 +37,7 @@ #include "elk_private.h" #include "dev/intel_debug.h" -namespace brw { +namespace elk { vec4_gs_visitor::vec4_gs_visitor(const struct brw_compiler *compiler, const struct brw_compile_params *params, @@ -579,7 +579,7 @@ static const GLuint gl_prim_to_hw_prim[MESA_PRIM_TRIANGLE_STRIP_ADJACENCY+1] = { [MESA_PRIM_TRIANGLE_STRIP_ADJACENCY] = _3DPRIM_TRISTRIP_ADJ, }; -} /* namespace brw */ +} /* namespace elk */ extern "C" const unsigned * brw_compile_gs(const struct brw_compiler *compiler, @@ -797,9 +797,9 @@ brw_compile_gs(const struct brw_compiler *compiler, prog_data->base.urb_entry_size = ALIGN(output_size_bytes, 128) / 128; } - assert(nir->info.gs.output_primitive < ARRAY_SIZE(brw::gl_prim_to_hw_prim)); + assert(nir->info.gs.output_primitive < ARRAY_SIZE(elk::gl_prim_to_hw_prim)); prog_data->output_topology = - brw::gl_prim_to_hw_prim[nir->info.gs.output_primitive]; + elk::gl_prim_to_hw_prim[nir->info.gs.output_primitive]; prog_data->vertices_in = nir->info.gs.vertices_in; @@ -858,7 +858,7 @@ brw_compile_gs(const struct brw_compiler *compiler, !INTEL_DEBUG(DEBUG_NO_DUAL_OBJECT_GS)) { prog_data->base.dispatch_mode = INTEL_DISPATCH_MODE_4X2_DUAL_OBJECT; - brw::vec4_gs_visitor v(compiler, ¶ms->base, &c, prog_data, nir, + elk::vec4_gs_visitor v(compiler, ¶ms->base, &c, prog_data, nir, true /* no_spills */, debug_enabled); @@ -924,15 +924,15 @@ brw_compile_gs(const struct brw_compiler *compiler, else prog_data->base.dispatch_mode = INTEL_DISPATCH_MODE_4X2_DUAL_INSTANCE; - brw::vec4_gs_visitor *gs = NULL; + elk::vec4_gs_visitor *gs = NULL; const unsigned *ret = NULL; if (compiler->devinfo->ver >= 7) - gs = new brw::vec4_gs_visitor(compiler, ¶ms->base, &c, prog_data, + gs = new elk::vec4_gs_visitor(compiler, ¶ms->base, &c, prog_data, nir, false /* no_spills */, debug_enabled); else - gs = new brw::gfx6_gs_visitor(compiler, ¶ms->base, &c, prog_data, + gs = new elk::gfx6_gs_visitor(compiler, ¶ms->base, &c, prog_data, nir, false /* no_spills */, debug_enabled); diff --git a/src/intel/compiler/elk/elk_vec4_gs_visitor.h b/src/intel/compiler/elk/elk_vec4_gs_visitor.h index 3de0939f77e..6d3682edf86 100644 --- a/src/intel/compiler/elk/elk_vec4_gs_visitor.h +++ b/src/intel/compiler/elk/elk_vec4_gs_visitor.h @@ -35,7 +35,7 @@ #define MAX_GS_INPUT_VERTICES 6 #ifdef __cplusplus -namespace brw { +namespace elk { class vec4_gs_visitor : public vec4_visitor { @@ -69,7 +69,7 @@ protected: struct brw_gs_prog_data * const gs_prog_data; }; -} /* namespace brw */ +} /* namespace elk */ #endif /* __cplusplus */ #endif /* ELK_VEC4_GS_VISITOR_H */ diff --git a/src/intel/compiler/elk/elk_vec4_live_variables.cpp b/src/intel/compiler/elk/elk_vec4_live_variables.cpp index d4787b077bc..0df6402b777 100644 --- a/src/intel/compiler/elk/elk_vec4_live_variables.cpp +++ b/src/intel/compiler/elk/elk_vec4_live_variables.cpp @@ -28,7 +28,7 @@ #include "elk_vec4.h" #include "elk_vec4_live_variables.h" -using namespace brw; +using namespace elk; #define MAX_INSTRUCTION (1 << 30) diff --git a/src/intel/compiler/elk/elk_vec4_live_variables.h b/src/intel/compiler/elk/elk_vec4_live_variables.h index bb6b04eb0ae..ed806ab76f0 100644 --- a/src/intel/compiler/elk/elk_vec4_live_variables.h +++ b/src/intel/compiler/elk/elk_vec4_live_variables.h @@ -34,7 +34,7 @@ struct backend_shader; -namespace brw { +namespace elk { class vec4_live_variables { public: @@ -138,6 +138,6 @@ var_from_reg(const simple_allocator &alloc, const dst_reg ®, return result; } -} /* namespace brw */ +} /* namespace elk */ #endif /* ELK_VEC4_LIVE_VARIABLES_H */ diff --git a/src/intel/compiler/elk/elk_vec4_nir.cpp b/src/intel/compiler/elk/elk_vec4_nir.cpp index 2dc37090208..c7f3894360c 100644 --- a/src/intel/compiler/elk/elk_vec4_nir.cpp +++ b/src/intel/compiler/elk/elk_vec4_nir.cpp @@ -30,10 +30,10 @@ #include "nir_intrinsics.h" #include "nir_intrinsics_indices.h" -using namespace brw; -using namespace brw::surface_access; +using namespace elk; +using namespace elk::surface_access; -namespace brw { +namespace elk { void vec4_visitor::emit_nir_code() diff --git a/src/intel/compiler/elk/elk_vec4_reg_allocate.cpp b/src/intel/compiler/elk/elk_vec4_reg_allocate.cpp index a6e8191f94c..9d6750183df 100644 --- a/src/intel/compiler/elk/elk_vec4_reg_allocate.cpp +++ b/src/intel/compiler/elk/elk_vec4_reg_allocate.cpp @@ -25,11 +25,11 @@ #include "elk_vec4.h" #include "elk_cfg.h" -using namespace brw; +using namespace elk; #define REG_CLASS_COUNT 20 -namespace brw { +namespace elk { static void assign(unsigned int *reg_hw_locations, backend_reg *reg) @@ -509,4 +509,4 @@ vec4_visitor::spill_reg(unsigned spill_reg_nr) invalidate_analysis(DEPENDENCY_INSTRUCTIONS | DEPENDENCY_VARIABLES); } -} /* namespace brw */ +} /* namespace elk */ diff --git a/src/intel/compiler/elk/elk_vec4_surface_builder.cpp b/src/intel/compiler/elk/elk_vec4_surface_builder.cpp index 34dd8cefee1..e3c19ffad78 100644 --- a/src/intel/compiler/elk/elk_vec4_surface_builder.cpp +++ b/src/intel/compiler/elk/elk_vec4_surface_builder.cpp @@ -23,7 +23,7 @@ #include "elk_vec4_surface_builder.h" -using namespace brw; +using namespace elk; namespace { namespace array_utils { @@ -79,7 +79,7 @@ namespace { } } -namespace brw { +namespace elk { namespace surface_access { namespace { using namespace array_utils; diff --git a/src/intel/compiler/elk/elk_vec4_surface_builder.h b/src/intel/compiler/elk/elk_vec4_surface_builder.h index 4038a54ba57..8e3dbeac3a3 100644 --- a/src/intel/compiler/elk/elk_vec4_surface_builder.h +++ b/src/intel/compiler/elk/elk_vec4_surface_builder.h @@ -27,7 +27,7 @@ #include "elk_vec4_builder.h" -namespace brw { +namespace elk { namespace surface_access { src_reg emit_untyped_read(const vec4_builder &bld, diff --git a/src/intel/compiler/elk/elk_vec4_tcs.cpp b/src/intel/compiler/elk/elk_vec4_tcs.cpp index 049f3e8acc9..a0838797b9a 100644 --- a/src/intel/compiler/elk/elk_vec4_tcs.cpp +++ b/src/intel/compiler/elk/elk_vec4_tcs.cpp @@ -34,7 +34,7 @@ #include "elk_private.h" #include "dev/intel_debug.h" -namespace brw { +namespace elk { vec4_tcs_visitor::vec4_tcs_visitor(const struct brw_compiler *compiler, const struct brw_compile_params *params, @@ -349,7 +349,7 @@ get_patch_count_threshold(int input_control_points) return 1; } -} /* namespace brw */ +} /* namespace elk */ extern "C" const unsigned * brw_compile_tcs(const struct brw_compiler *compiler, @@ -394,7 +394,7 @@ brw_compile_tcs(const struct brw_compiler *compiler, bool has_primitive_id = BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_PRIMITIVE_ID); - prog_data->patch_count_threshold = brw::get_patch_count_threshold(key->input_vertices); + prog_data->patch_count_threshold = elk::get_patch_count_threshold(key->input_vertices); if (compiler->use_tcs_multi_patch) { vue_prog_data->dispatch_mode = INTEL_DISPATCH_MODE_TCS_MULTI_PATCH; @@ -478,7 +478,7 @@ brw_compile_tcs(const struct brw_compiler *compiler, assembly = g.get_assembly(); } else { - brw::vec4_tcs_visitor v(compiler, ¶ms->base, key, prog_data, + elk::vec4_tcs_visitor v(compiler, ¶ms->base, key, prog_data, nir, debug_enabled); if (!v.run()) { params->base.error_str = diff --git a/src/intel/compiler/elk/elk_vec4_tcs.h b/src/intel/compiler/elk/elk_vec4_tcs.h index 86c296f53cb..fdf75b331c6 100644 --- a/src/intel/compiler/elk/elk_vec4_tcs.h +++ b/src/intel/compiler/elk/elk_vec4_tcs.h @@ -35,7 +35,7 @@ #include "elk_vec4.h" #ifdef __cplusplus -namespace brw { +namespace elk { class vec4_tcs_visitor : public vec4_visitor { @@ -77,7 +77,7 @@ protected: src_reg invocation_id; }; -} /* namespace brw */ +} /* namespace elk */ #endif /* __cplusplus */ #endif /* ELK_VEC4_TCS_H */ diff --git a/src/intel/compiler/elk/elk_vec4_tes.cpp b/src/intel/compiler/elk/elk_vec4_tes.cpp index 08de4deef41..1d623c6480d 100644 --- a/src/intel/compiler/elk/elk_vec4_tes.cpp +++ b/src/intel/compiler/elk/elk_vec4_tes.cpp @@ -31,7 +31,7 @@ #include "elk_cfg.h" #include "dev/intel_debug.h" -namespace brw { +namespace elk { vec4_tes_visitor::vec4_tes_visitor(const struct brw_compiler *compiler, const struct brw_compile_params *params, @@ -220,4 +220,4 @@ vec4_tes_visitor::emit_thread_end() emit_vertex(); } -} /* namespace brw */ +} /* namespace elk */ diff --git a/src/intel/compiler/elk/elk_vec4_tes.h b/src/intel/compiler/elk/elk_vec4_tes.h index b3b6a218838..bf8d005ac62 100644 --- a/src/intel/compiler/elk/elk_vec4_tes.h +++ b/src/intel/compiler/elk/elk_vec4_tes.h @@ -33,7 +33,7 @@ #include "elk_vec4.h" #ifdef __cplusplus -namespace brw { +namespace elk { class vec4_tes_visitor : public vec4_visitor { @@ -59,7 +59,7 @@ private: src_reg input_read_header; }; -} /* namespace brw */ +} /* namespace elk */ #endif /* __cplusplus */ #endif /* ELK_VEC4_TES_H */ diff --git a/src/intel/compiler/elk/elk_vec4_visitor.cpp b/src/intel/compiler/elk/elk_vec4_visitor.cpp index edfb881cffb..cc4f9821486 100644 --- a/src/intel/compiler/elk/elk_vec4_visitor.cpp +++ b/src/intel/compiler/elk/elk_vec4_visitor.cpp @@ -26,7 +26,7 @@ #include "elk_eu.h" #include "util/u_math.h" -namespace brw { +namespace elk { vec4_instruction::vec4_instruction(enum opcode opcode, const dst_reg &dst, const src_reg &src0, const src_reg &src1, @@ -1426,4 +1426,4 @@ vec4_visitor::fail(const char *format, ...) } } -} /* namespace brw */ +} /* namespace elk */ diff --git a/src/intel/compiler/elk/elk_vec4_vs.h b/src/intel/compiler/elk/elk_vec4_vs.h index d841ee066cf..df93923cc03 100644 --- a/src/intel/compiler/elk/elk_vec4_vs.h +++ b/src/intel/compiler/elk/elk_vec4_vs.h @@ -26,7 +26,7 @@ #include "elk_vec4.h" -namespace brw { +namespace elk { class vec4_vs_visitor : public vec4_visitor { @@ -53,6 +53,6 @@ private: struct brw_vs_prog_data * const vs_prog_data; }; -} /* namespace brw */ +} /* namespace elk */ #endif /* ELK_VEC4_VS_VISITOR_H */ diff --git a/src/intel/compiler/elk/elk_vec4_vs_visitor.cpp b/src/intel/compiler/elk/elk_vec4_vs_visitor.cpp index 71522e3e568..fb34fb11433 100644 --- a/src/intel/compiler/elk/elk_vec4_vs_visitor.cpp +++ b/src/intel/compiler/elk/elk_vec4_vs_visitor.cpp @@ -25,7 +25,7 @@ #include "elk_vec4_vs.h" #include "dev/intel_debug.h" -namespace brw { +namespace elk { void vec4_vs_visitor::emit_prolog() @@ -105,4 +105,4 @@ vec4_vs_visitor::vec4_vs_visitor(const struct brw_compiler *compiler, } -} /* namespace brw */ +} /* namespace elk */