Lines Matching refs:fs_reg
49 fs_inst::init(enum opcode opcode, uint8_t exec_size, const fs_reg &dst, in init()
50 const fs_reg *src, unsigned sources) in init()
54 this->src = new fs_reg[MAX2(sources, 3)]; in init()
100 fs_inst::fs_inst(enum opcode opcode, uint8_t exec_size, const fs_reg &dst) in fs_inst()
105 fs_inst::fs_inst(enum opcode opcode, uint8_t exec_size, const fs_reg &dst, in fs_inst()
106 const fs_reg &src0) in fs_inst()
108 const fs_reg src[1] = { src0 }; in fs_inst()
112 fs_inst::fs_inst(enum opcode opcode, uint8_t exec_size, const fs_reg &dst, in fs_inst()
113 const fs_reg &src0, const fs_reg &src1) in fs_inst()
115 const fs_reg src[2] = { src0, src1 }; in fs_inst()
119 fs_inst::fs_inst(enum opcode opcode, uint8_t exec_size, const fs_reg &dst, in fs_inst()
120 const fs_reg &src0, const fs_reg &src1, const fs_reg &src2) in fs_inst()
122 const fs_reg src[3] = { src0, src1, src2 }; in fs_inst()
126 fs_inst::fs_inst(enum opcode opcode, uint8_t exec_width, const fs_reg &dst, in fs_inst()
127 const fs_reg src[], unsigned sources) in fs_inst()
136 this->src = new fs_reg[MAX2(that.sources, 3)]; in fs_inst()
151 fs_reg *src = new fs_reg[MAX2(num_sources, 3)]; in resize_sources()
164 const fs_reg &dst, in VARYING_PULL_CONSTANT_LOAD()
165 const fs_reg &surf_index, in VARYING_PULL_CONSTANT_LOAD()
166 const fs_reg &varying_offset, in VARYING_PULL_CONSTANT_LOAD()
180 fs_reg vec4_offset = vgrf(glsl_type::uint_type); in VARYING_PULL_CONSTANT_LOAD()
189 fs_reg vec4_result = bld.vgrf(BRW_REGISTER_TYPE_F, 4); in VARYING_PULL_CONSTANT_LOAD()
194 fs_reg dw = offset(vec4_result, bld, (const_offset & 0xf) / 4); in VARYING_PULL_CONSTANT_LOAD()
224 ubld.MOV(ubld.null_reg_f(), fs_reg(VGRF, grf, BRW_REGISTER_TYPE_F)); in DEP_RESOLVE_MOV()
356 fs_reg reg = this->src[0]; in is_copy_payload()
406 fs_reg::init() in init()
414 fs_reg::fs_reg() in fs_reg() function in fs_reg
420 fs_reg::fs_reg(struct ::brw_reg reg) : in fs_reg() function in fs_reg
434 fs_reg::equals(const fs_reg &r) const in equals()
441 fs_reg::is_contiguous() const in is_contiguous()
447 fs_reg::component_size(unsigned width) const in component_size()
509 fs_reg
514 fs_reg ts = fs_reg(retype(brw_vec4_reg(BRW_ARCHITECTURE_REGISTER_FILE, in get_timestamp()
519 fs_reg dst = fs_reg(VGRF, alloc.allocate(1), BRW_REGISTER_TYPE_UD); in get_timestamp()
550 const fs_reg timestamp = get_timestamp(ibld); in emit_shader_time_end()
559 const fs_reg shader_end_time = component(timestamp, 0); in emit_shader_time_end()
564 const fs_reg reset = component(timestamp, 2); in emit_shader_time_end()
569 fs_reg start = shader_start_time; in emit_shader_time_end()
571 const fs_reg diff = component(fs_reg(VGRF, alloc.allocate(1), in emit_shader_time_end()
592 fs_reg value) in SHADER_TIME_ADD()
597 fs_reg payload; in SHADER_TIME_ADD()
603 bld.emit(SHADER_OPCODE_SHADER_TIME_ADD, fs_reg(), payload, offset, value); in SHADER_TIME_ADD()
897 flag_mask(const fs_reg &r, unsigned sz) in flag_mask()
998 fs_reg
1002 return fs_reg(VGRF, alloc.allocate(type_size_scalar(type) * reg_width), in vgrf()
1006 fs_reg::fs_reg(enum brw_reg_file file, int nr) in fs_reg() function in fs_reg
1015 fs_reg::fs_reg(enum brw_reg_file file, int nr, enum brw_reg_type type) in fs_reg() function in fs_reg
1037 fs_visitor::emit_fragcoord_interpolation(fs_reg wpos) in emit_fragcoord_interpolation()
1051 bld.MOV(wpos, fs_reg(brw_vec8_grf(payload.source_depth_reg, 0))); in emit_fragcoord_interpolation()
1103 fs_reg *
1106 fs_reg *reg = new(this->mem_ctx) fs_reg(vgrf(glsl_type::bool_type)); in emit_frontfacing_interpolation()
1120 fs_reg g0 = fs_reg(retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_W)); in emit_frontfacing_interpolation()
1135 fs_reg g1_6 = fs_reg(retype(brw_vec1_grf(1, 6), BRW_REGISTER_TYPE_D)); in emit_frontfacing_interpolation()
1145 fs_visitor::compute_sample_position(fs_reg dst, fs_reg int_sample_pos) in compute_sample_position()
1167 fs_reg *
1173 fs_reg *reg = new(this->mem_ctx) fs_reg(vgrf(glsl_type::vec2_type)); in emit_samplepos_setup()
1174 fs_reg pos = *reg; in emit_samplepos_setup()
1175 fs_reg int_sample_x = vgrf(glsl_type::int_type); in emit_samplepos_setup()
1176 fs_reg int_sample_y = vgrf(glsl_type::int_type); in emit_samplepos_setup()
1194 abld.MOV(int_sample_x, fs_reg(sample_pos_reg)); in emit_samplepos_setup()
1196 abld.half(0).MOV(half(int_sample_x, 0), fs_reg(sample_pos_reg)); in emit_samplepos_setup()
1198 fs_reg(suboffset(sample_pos_reg, 16))); in emit_samplepos_setup()
1204 abld.MOV(int_sample_y, fs_reg(suboffset(sample_pos_reg, 1))); in emit_samplepos_setup()
1207 fs_reg(suboffset(sample_pos_reg, 1))); in emit_samplepos_setup()
1209 fs_reg(suboffset(sample_pos_reg, 17))); in emit_samplepos_setup()
1216 fs_reg *
1224 fs_reg *reg = new(this->mem_ctx) fs_reg(vgrf(glsl_type::uint_type)); in emit_sampleid_setup()
1261 fs_reg tmp(VGRF, alloc.allocate(1), BRW_REGISTER_TYPE_UW); in emit_sampleid_setup()
1263 abld.SHR(tmp, fs_reg(stride(retype(brw_vec1_grf(1, 0), in emit_sampleid_setup()
1268 const fs_reg t1 = component(fs_reg(VGRF, alloc.allocate(1), in emit_sampleid_setup()
1270 const fs_reg t2(VGRF, alloc.allocate(1), BRW_REGISTER_TYPE_UW); in emit_sampleid_setup()
1296 .AND(t1, fs_reg(retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UD)), in emit_sampleid_setup()
1312 fs_reg *
1319 fs_reg *reg = new(this->mem_ctx) fs_reg(vgrf(glsl_type::int_type)); in emit_samplemaskin_setup()
1321 fs_reg coverage_mask(retype(brw_vec8_grf(payload.sample_mask_in_reg, 0), in emit_samplemaskin_setup()
1340 fs_reg one = vgrf(glsl_type::int_type); in emit_samplemaskin_setup()
1341 fs_reg enabled_mask = vgrf(glsl_type::int_type); in emit_samplemaskin_setup()
1352 fs_reg
1353 fs_visitor::resolve_source_modifiers(const fs_reg &src) in resolve_source_modifiers()
1358 fs_reg temp = bld.vgrf(src.type); in resolve_source_modifiers()
1412 fs_reg hdr = abld.vgrf(BRW_REGISTER_TYPE_UD, 1); in emit_gs_thread_end()
1413 abld.MOV(hdr, fs_reg(retype(brw_vec8_grf(1, 0), BRW_REGISTER_TYPE_UD))); in emit_gs_thread_end()
1417 fs_reg payload = abld.vgrf(BRW_REGISTER_TYPE_UD, 2); in emit_gs_thread_end()
1418 fs_reg *sources = ralloc_array(mem_ctx, fs_reg, 2); in emit_gs_thread_end()
1419 sources[0] = fs_reg(retype(brw_vec8_grf(1, 0), BRW_REGISTER_TYPE_UD)); in emit_gs_thread_end()
2235 fs_visitor::get_pull_locs(const fs_reg &src, in get_pull_locs()
2294 const fs_reg dst = ubld.vgrf(BRW_REGISTER_TYPE_UD); in lower_constant_loads()
2542 fs_reg tmp = inst->src[1]; in opt_algebraic()
2806 mask_relative_to(const fs_reg &r, const fs_reg &s, unsigned ds) in mask_relative_to()
2926 regions_overlap(fs_reg(MRF, scan_inst->base_mrf), scan_inst->mlen * REG_SIZE, in compute_to_mrf()
3064 fs_reg(UNIFORM, 0, BRW_REGISTER_TYPE_F)); in emit_repclear_shader()
3072 .MOV(vec4(brw_message_reg(color_mrf)), fs_reg(reg)); in emit_repclear_shader()
3417 const fs_reg payload = ubld.group(8, 0).vgrf(BRW_REGISTER_TYPE_UD); in lower_uniform_pull_constant_loads()
3453 fs_reg dst = inst->dst; in lower_load_payload()
3464 fs_reg mov_dst = retype(dst, BRW_REGISTER_TYPE_UD); in lower_load_payload()
3465 fs_reg mov_src = retype(inst->src[i], BRW_REGISTER_TYPE_UD); in lower_load_payload()
3494 fs_reg compr4_dst = retype(dst, inst->src[i].type); in lower_load_payload()
3499 fs_reg mov_dst = retype(dst, inst->src[i].type); in lower_load_payload()
3571 fs_reg imm(VGRF, alloc.allocate(dispatch_width / 8), in lower_integer_multiplication()
3628 fs_reg orig_dst = inst->dst; in lower_integer_multiplication()
3629 fs_reg low = inst->dst; in lower_integer_multiplication()
3637 low = fs_reg(VGRF, alloc.allocate(regs_written(inst)), in lower_integer_multiplication()
3644 fs_reg high(VGRF, alloc.allocate(regs_written(inst)), in lower_integer_multiplication()
3681 const fs_reg acc = retype(brw_acc_reg(inst->exec_size), in lower_integer_multiplication()
3771 fs_reg *dst, fs_reg color, unsigned components) in setup_color_payload()
3774 fs_reg tmp = bld.vgrf(BRW_REGISTER_TYPE_F, 4); in setup_color_payload()
3796 const fs_reg &color0 = inst->src[FB_WRITE_LOGICAL_SRC_COLOR0]; in lower_fb_write_logical_send()
3797 const fs_reg &color1 = inst->src[FB_WRITE_LOGICAL_SRC_COLOR1]; in lower_fb_write_logical_send()
3798 const fs_reg &src0_alpha = inst->src[FB_WRITE_LOGICAL_SRC_SRC0_ALPHA]; in lower_fb_write_logical_send()
3799 const fs_reg &src_depth = inst->src[FB_WRITE_LOGICAL_SRC_SRC_DEPTH]; in lower_fb_write_logical_send()
3800 const fs_reg &dst_depth = inst->src[FB_WRITE_LOGICAL_SRC_DST_DEPTH]; in lower_fb_write_logical_send()
3801 const fs_reg &src_stencil = inst->src[FB_WRITE_LOGICAL_SRC_SRC_STENCIL]; in lower_fb_write_logical_send()
3802 fs_reg sample_mask = inst->src[FB_WRITE_LOGICAL_SRC_OMASK]; in lower_fb_write_logical_send()
3809 fs_reg sources[15]; in lower_fb_write_logical_send()
3834 sources[length] = fs_reg(VGRF, bld.shader->alloc.allocate(1)); in lower_fb_write_logical_send()
3837 fs_reg(brw_vec8_grf(payload.aa_dest_stencil_reg, 0))); in lower_fb_write_logical_send()
3842 sources[length] = fs_reg(VGRF, bld.shader->alloc.allocate(1), in lower_fb_write_logical_send()
3920 fs_reg payload = fs_reg(VGRF, -1, BRW_REGISTER_TYPE_F); in lower_fb_write_logical_send()
3929 load = bld.LOAD_PAYLOAD(fs_reg(MRF, 1, BRW_REGISTER_TYPE_F), in lower_fb_write_logical_send()
3952 const fs_reg header = ubld.group(8, 0).vgrf(BRW_REGISTER_TYPE_UD, length); in lower_fb_read_logical_send()
3966 const fs_reg &coordinate, in lower_sampler_logical_send_gen4()
3967 const fs_reg &shadow_c, in lower_sampler_logical_send_gen4()
3968 const fs_reg &lod, const fs_reg &lod2, in lower_sampler_logical_send_gen4()
3969 const fs_reg &surface, in lower_sampler_logical_send_gen4()
3970 const fs_reg &sampler, in lower_sampler_logical_send_gen4()
3976 fs_reg msg_begin(MRF, 1, BRW_REGISTER_TYPE_F); in lower_sampler_logical_send_gen4()
3977 fs_reg msg_end = msg_begin; in lower_sampler_logical_send_gen4()
4072 const fs_reg &coordinate, in lower_sampler_logical_send_gen5()
4073 const fs_reg &shadow_c, in lower_sampler_logical_send_gen5()
4074 const fs_reg &lod, const fs_reg &lod2, in lower_sampler_logical_send_gen5()
4075 const fs_reg &sample_index, in lower_sampler_logical_send_gen5()
4076 const fs_reg &surface, in lower_sampler_logical_send_gen5()
4077 const fs_reg &sampler, in lower_sampler_logical_send_gen5()
4081 fs_reg message(MRF, 2, BRW_REGISTER_TYPE_F); in lower_sampler_logical_send_gen5()
4082 fs_reg msg_coords = message; in lower_sampler_logical_send_gen5()
4097 fs_reg msg_end = offset(msg_coords, bld, coord_components); in lower_sampler_logical_send_gen5()
4098 fs_reg msg_lod = offset(msg_coords, bld, 4); in lower_sampler_logical_send_gen5()
4101 fs_reg msg_shadow = msg_lod; in lower_sampler_logical_send_gen5()
4168 is_high_sampler(const struct gen_device_info *devinfo, const fs_reg &sampler) in is_high_sampler()
4178 const fs_reg &coordinate, in lower_sampler_logical_send_gen7()
4179 const fs_reg &shadow_c, in lower_sampler_logical_send_gen7()
4180 fs_reg lod, const fs_reg &lod2, in lower_sampler_logical_send_gen7()
4181 const fs_reg &sample_index, in lower_sampler_logical_send_gen7()
4182 const fs_reg &mcs, in lower_sampler_logical_send_gen7()
4183 const fs_reg &surface, in lower_sampler_logical_send_gen7()
4184 const fs_reg &sampler, in lower_sampler_logical_send_gen7()
4185 const fs_reg &tg4_offset, in lower_sampler_logical_send_gen7()
4192 fs_reg sources[MAX_SAMPLER_MESSAGE_SIZE]; in lower_sampler_logical_send_gen7()
4208 fs_reg header = retype(sources[0], BRW_REGISTER_TYPE_UD); in lower_sampler_logical_send_gen7()
4247 fs_reg tmp = ubld1.vgrf(BRW_REGISTER_TYPE_UD); in lower_sampler_logical_send_gen7()
4397 const fs_reg src_payload = fs_reg(VGRF, bld.shader->alloc.allocate(mlen), in lower_sampler_logical_send_gen7()
4418 const fs_reg &coordinate = inst->src[TEX_LOGICAL_SRC_COORDINATE]; in lower_sampler_logical_send()
4419 const fs_reg &shadow_c = inst->src[TEX_LOGICAL_SRC_SHADOW_C]; in lower_sampler_logical_send()
4420 const fs_reg &lod = inst->src[TEX_LOGICAL_SRC_LOD]; in lower_sampler_logical_send()
4421 const fs_reg &lod2 = inst->src[TEX_LOGICAL_SRC_LOD2]; in lower_sampler_logical_send()
4422 const fs_reg &sample_index = inst->src[TEX_LOGICAL_SRC_SAMPLE_INDEX]; in lower_sampler_logical_send()
4423 const fs_reg &mcs = inst->src[TEX_LOGICAL_SRC_MCS]; in lower_sampler_logical_send()
4424 const fs_reg &surface = inst->src[TEX_LOGICAL_SRC_SURFACE]; in lower_sampler_logical_send()
4425 const fs_reg &sampler = inst->src[TEX_LOGICAL_SRC_SAMPLER]; in lower_sampler_logical_send()
4426 const fs_reg &tg4_offset = inst->src[TEX_LOGICAL_SRC_TG4_OFFSET]; in lower_sampler_logical_send()
4454 static fs_reg
4455 emit_surface_header(const fs_builder &bld, const fs_reg &sample_mask) in emit_surface_header()
4458 const fs_reg dst = ubld.vgrf(BRW_REGISTER_TYPE_UD); in emit_surface_header()
4466 const fs_reg &sample_mask) in lower_surface_logical_send()
4469 const fs_reg &addr = inst->src[0]; in lower_surface_logical_send()
4470 const fs_reg &src = inst->src[1]; in lower_surface_logical_send()
4471 const fs_reg &surface = inst->src[2]; in lower_surface_logical_send()
4472 const UNUSED fs_reg &dims = inst->src[3]; in lower_surface_logical_send()
4473 const fs_reg &arg = inst->src[4]; in lower_surface_logical_send()
4482 fs_reg *const components = new fs_reg[sz]; in lower_surface_logical_send()
4483 const fs_reg payload = bld.vgrf(BRW_REGISTER_TYPE_UD, sz); in lower_surface_logical_send()
4521 fs_reg tmp = bld.vgrf(BRW_REGISTER_TYPE_UD); in lower_varying_pull_constant_logical_send()
4528 const fs_reg payload(MRF, FIRST_PULL_LOAD_MRF(devinfo->gen), in lower_varying_pull_constant_logical_send()
4560 const fs_reg src0 = is_int_div ? inst->src[1] : inst->src[0]; in lower_math_logical_send()
4561 const fs_reg src1 = is_int_div ? inst->src[0] : inst->src[1]; in lower_math_logical_send()
4567 bld.MOV(fs_reg(MRF, inst->base_mrf + 1, src1.type), src1); in lower_math_logical_send()
4651 fs_reg()); in lower_logical_sends()
4663 fs_reg()); in lower_logical_sends()
5229 static fs_reg
5233 const fs_reg src = horiz_offset(inst->src[i], lbld.group()); in emit_unzip()
5242 const fs_reg tmp = lbld.vgrf(inst->src[i].type, inst->components_read(i)); in emit_unzip()
5316 static fs_reg
5324 const fs_reg dst = horiz_offset(inst->dst, lbld_after.group()); in emit_zip()
5329 const fs_reg tmp = lbld_after.vgrf(inst->dst.type, dst_size); in emit_zip()
5707 const fs_reg ®) in get_instruction_generating_reg()
6082 inst->dst = fs_reg(VGRF, alloc.allocate(dispatch_width / 8), in fixup_3src_null_dest()
6249 fs_reg channels_uw = bld.vgrf(BRW_REGISTER_TYPE_UW); in run_tcs_single_patch()
6250 fs_reg channels_ud = bld.vgrf(BRW_REGISTER_TYPE_UD); in run_tcs_single_patch()
6251 bld.MOV(channels_uw, fs_reg(brw_imm_uv(0x76543210))); in run_tcs_single_patch()
6260 fs_reg t = bld.vgrf(BRW_REGISTER_TYPE_UD); in run_tcs_single_patch()
6261 fs_reg instance_times_8 = bld.vgrf(BRW_REGISTER_TYPE_UD); in run_tcs_single_patch()
6262 bld.AND(t, fs_reg(retype(brw_vec1_grf(0, 2), BRW_REGISTER_TYPE_UD)), in run_tcs_single_patch()
6283 fs_reg srcs[3] = { in run_tcs_single_patch()
6284 fs_reg(retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UD)), in run_tcs_single_patch()
6285 fs_reg(brw_imm_ud(WRITEMASK_X << 16)), in run_tcs_single_patch()
6286 fs_reg(brw_imm_ud(0)), in run_tcs_single_patch()
6288 fs_reg payload = bld.vgrf(BRW_REGISTER_TYPE_UD, 3); in run_tcs_single_patch()
6926 fs_reg *
6931 fs_reg *reg = new(this->mem_ctx) fs_reg(vgrf(glsl_type::uvec3_type)); in emit_cs_work_group_id_setup()
7170 const fs_reg tmp = component(bld.vgrf(BRW_REGISTER_TYPE_UD), 0); in brw_fs_test_dispatch_packing()
7171 const fs_reg mask = (stage == MESA_SHADER_FRAGMENT ? brw_vmask_reg() : in brw_fs_test_dispatch_packing()