Lines Matching defs:tex
7092 struct r600_bytecode_tex tex;
7101 memset(&tex, 0, sizeof(struct r600_bytecode_tex));
7102 tex.op = i == 0 ? FETCH_OP_GET_GRADIENTS_H : FETCH_OP_GET_GRADIENTS_V;
7103 tex.src_gpr = interp_gpr;
7104 tex.src_sel_x = interp_base_chan + 0;
7105 tex.src_sel_y = interp_base_chan + 1;
7106 tex.src_sel_z = 0;
7107 tex.src_sel_w = 0;
7108 tex.dst_gpr = i == 0 ? gradientsH : gradientsV;
7109 tex.dst_sel_x = 0;
7110 tex.dst_sel_y = 1;
7111 tex.dst_sel_z = 7;
7112 tex.dst_sel_w = 7;
7113 tex.inst_mod = 1; // Use per pixel gradient calculation
7114 tex.sampler_id = 0;
7115 tex.resource_id = tex.sampler_id;
7116 r = r600_bytecode_add_tex(ctx->bc, &tex);
7555 struct r600_bytecode_tex tex;
7873 memset(&tex, 0, sizeof(struct r600_bytecode_tex));
7874 tex.op = FETCH_OP_SET_CUBEMAP_INDEX;
7875 tex.sampler_id = tgsi_tex_get_src_gpr(ctx, sampler_src_reg);
7876 tex.resource_id = tex.sampler_id + R600_MAX_CONST_BUFFERS;
7877 tex.src_gpr = r600_get_temp(ctx);
7878 tex.src_sel_x = 0;
7879 tex.src_sel_y = 0;
7880 tex.src_sel_z = 0;
7881 tex.src_sel_w = 0;
7882 tex.dst_sel_x = tex.dst_sel_y = tex.dst_sel_z = tex.dst_sel_w = 7;
7883 tex.coord_type_x = 1;
7884 tex.coord_type_y = 1;
7885 tex.coord_type_z = 1;
7886 tex.coord_type_w = 1;
7890 alu.dst.sel = tex.src_gpr;
7898 r = r600_bytecode_add_tex(ctx->bc, &tex);
8046 memset(&tex, 0, sizeof(struct r600_bytecode_tex));
8047 tex.op = FETCH_OP_GET_TEXTURE_RESINFO;
8048 tex.sampler_id = tgsi_tex_get_src_gpr(ctx, sampler_src_reg);
8049 tex.sampler_index_mode = sampler_index_mode;
8050 tex.resource_id = tex.sampler_id + R600_MAX_CONST_BUFFERS;
8051 tex.resource_index_mode = sampler_index_mode;
8052 tex.dst_gpr = treg;
8053 tex.src_sel_x = 4;
8054 tex.src_sel_y = 4;
8055 tex.src_sel_z = 4;
8056 tex.src_sel_w = 4;
8057 tex.dst_sel_x = 0;
8058 tex.dst_sel_y = 1;
8059 tex.dst_sel_z = 7;
8060 tex.dst_sel_w = 7;
8061 r = r600_bytecode_add_tex(ctx->bc, &tex);
8275 memset(&tex, 0, sizeof(struct r600_bytecode_tex));
8276 tex.op = FETCH_OP_LD;
8277 tex.inst_mod = 1; /* to indicate this is ldfptr */
8278 tex.sampler_id = tgsi_tex_get_src_gpr(ctx, sampler_src_reg);
8279 tex.sampler_index_mode = sampler_index_mode;
8280 tex.resource_id = tex.sampler_id + R600_MAX_CONST_BUFFERS;
8281 tex.resource_index_mode = sampler_index_mode;
8282 tex.src_gpr = src_gpr;
8283 tex.dst_gpr = temp;
8284 tex.dst_sel_x = 7; /* mask out these components */
8285 tex.dst_sel_y = 7;
8286 tex.dst_sel_z = 7;
8287 tex.dst_sel_w = 0; /* store X */
8288 tex.src_sel_x = 0;
8289 tex.src_sel_y = 1;
8290 tex.src_sel_z = 2;
8291 tex.src_sel_w = 3;
8292 tex.offset_x = offset_x;
8293 tex.offset_y = offset_y;
8294 tex.offset_z = offset_z;
8295 r = r600_bytecode_add_tex(ctx->bc, &tex);
8455 memset(&tex, 0, sizeof(struct r600_bytecode_tex));
8456 tex.op = opcode;
8458 tex.sampler_id = tgsi_tex_get_src_gpr(ctx, sampler_src_reg);
8459 tex.sampler_index_mode = sampler_index_mode;
8460 tex.resource_id = tex.sampler_id + R600_MAX_CONST_BUFFERS;
8461 tex.resource_index_mode = sampler_index_mode;
8462 tex.src_gpr = src_gpr;
8463 tex.dst_gpr = ctx->file_offset[inst->Dst[0].Register.File] + inst->Dst[0].Register.Index;
8467 tex.inst_mod = 1; /* per pixel gradient calculation instead of per 2x2 quad */
8478 tex.inst_mod = 0;
8481 tex.inst_mod = texture_component_select;
8485 tex.dst_sel_x = (inst->Dst[0].Register.WriteMask & 1) ? 0 : 7;
8486 tex.dst_sel_y = (inst->Dst[0].Register.WriteMask & 2) ? 1 : 7;
8487 tex.dst_sel_z = (inst->Dst[0].Register.WriteMask & 4) ? 2 : 7;
8488 tex.dst_sel_w = (inst->Dst[0].Register.WriteMask & 8) ? 3 : 7;
8491 tex.dst_sel_x = (inst->Dst[0].Register.WriteMask & 1) ? 1 : 7;
8492 tex.dst_sel_y = (inst->Dst[0].Register.WriteMask & 2) ? 2 : 7;
8493 tex.dst_sel_z = (inst->Dst[0].Register.WriteMask & 4) ? 0 : 7;
8494 tex.dst_sel_w = (inst->Dst[0].Register.WriteMask & 8) ? 3 : 7;
8498 tex.dst_sel_x = (inst->Dst[0].Register.WriteMask & 2) ? 1 : 7;
8499 tex.dst_sel_y = (inst->Dst[0].Register.WriteMask & 1) ? 0 : 7;
8500 tex.dst_sel_z = 7;
8501 tex.dst_sel_w = 7;
8504 tex.dst_sel_x = 3;
8505 tex.dst_sel_y = 7;
8506 tex.dst_sel_z = 7;
8507 tex.dst_sel_w = 7;
8510 tex.dst_sel_x = (inst->Dst[0].Register.WriteMask & 1) ? 0 : 7;
8511 tex.dst_sel_y = (inst->Dst[0].Register.WriteMask & 2) ? 1 : 7;
8512 tex.dst_sel_z = (inst->Dst[0].Register.WriteMask & 4) ? 2 : 7;
8513 tex.dst_sel_w = (inst->Dst[0].Register.WriteMask & 8) ? 3 : 7;
8518 tex.src_sel_x = 4;
8519 tex.src_sel_y = 4;
8520 tex.src_sel_z = 4;
8521 tex.src_sel_w = 4;
8523 tex.src_sel_x = 0;
8524 tex.src_sel_y = 1;
8525 tex.src_sel_z = 2;
8526 tex.src_sel_w = 3;
8528 tex.src_sel_x = ctx->src[0].swizzle[0];
8529 tex.src_sel_y = ctx->src[0].swizzle[1];
8530 tex.src_sel_z = ctx->src[0].swizzle[2];
8531 tex.src_sel_w = ctx->src[0].swizzle[3];
8532 tex.src_rel = ctx->src[0].rel;
8539 tex.src_sel_x = 1;
8540 tex.src_sel_y = 0;
8541 tex.src_sel_z = 3;
8542 tex.src_sel_w = 2; /* route Z compare or Lod value into W */
8547 tex.coord_type_x = 1;
8548 tex.coord_type_y = 1;
8550 tex.coord_type_z = 1;
8551 tex.coord_type_w = 1;
8553 tex.offset_x = offset_x;
8554 tex.offset_y = offset_y;
8558 tex.offset_z = 0;
8561 tex.offset_z = offset_z;
8573 tex.src_sel_w = tex.src_sel_z;
8581 tex.coord_type_y = 0;
8582 array_index_offset_channel = tex.src_sel_y;
8585 tex.coord_type_z = 0;
8586 tex.src_sel_z = tex.src_sel_y;
8587 array_index_offset_channel = tex.src_sel_z;
8591 tex.coord_type_z = 0;
8592 array_index_offset_channel = tex.src_sel_z;
8597 tex.coord_type_z = 0;
8605 alu.src[0].sel = tex.src_gpr;
8607 alu.src[0].rel = tex.src_rel;
8609 alu.dst.sel = tex.src_gpr;
8611 alu.dst.rel = tex.src_rel;
8624 tex.src_sel_z = 7;
8625 tex.src_sel_w = 7;
8628 tex.src_sel_y = 7;
8629 tex.src_sel_w = 7;
8632 tex.src_sel_y = 7;
8633 tex.src_sel_z = 7;
8634 tex.src_sel_w = 7;
8646 r = r600_bytecode_add_tex(ctx->bc, &tex);
9589 struct r600_bytecode_tex tex;
9636 memset(&tex, 0, sizeof(struct r600_bytecode_tex));
9637 tex.op = ctx->inst_info->op;
9638 tex.sampler_id = R600_IMAGE_REAL_RESOURCE_OFFSET + inst->Src[0].Register.Index;
9639 tex.sampler_index_mode = sampler_index_mode;
9640 tex.resource_id = tex.sampler_id;
9641 tex.resource_index_mode = sampler_index_mode;
9642 tex.src_sel_x = 4;
9643 tex.src_sel_y = 4;
9644 tex.src_sel_z = 4;
9645 tex.src_sel_w = 4;
9646 tex.dst_sel_x = (inst->Dst[0].Register.WriteMask & 1) ? 0 : 7;
9647 tex.dst_sel_y = (inst->Dst[0].Register.WriteMask & 2) ? 1 : 7;
9648 tex.dst_sel_z = (inst->Dst[0].Register.WriteMask & 4) ? 2 : 7;
9649 tex.dst_sel_w = (inst->Dst[0].Register.WriteMask & 8) ? 3 : 7;
9650 tex.dst_gpr = ctx->file_offset[inst->Dst[0].Register.File] + inst->Dst[0].Register.Index;
9651 r = r600_bytecode_add_tex(ctx->bc, &tex);