Lines Matching defs:tex

512    } tex;
675 } tex;
1511 write_tex(write_ctx *ctx, const nir_tex_instr *tex)
1513 assert(tex->num_srcs < 16);
1514 assert(tex->op < 32);
1519 header.tex.instr_type = tex->instr.type;
1520 header.tex.num_srcs = tex->num_srcs;
1521 header.tex.op = tex->op;
1523 write_dest(ctx, &tex->dest, header, tex->instr.type);
1525 blob_write_uint32(ctx->blob, tex->texture_index);
1526 blob_write_uint32(ctx->blob, tex->sampler_index);
1527 if (tex->op == nir_texop_tg4)
1528 blob_write_bytes(ctx->blob, tex->tg4_offsets, sizeof(tex->tg4_offsets));
1532 .u.sampler_dim = tex->sampler_dim,
1533 .u.dest_type = tex->dest_type,
1534 .u.coord_components = tex->coord_components,
1535 .u.is_array = tex->is_array,
1536 .u.is_shadow = tex->is_shadow,
1537 .u.is_new_style_shadow = tex->is_new_style_shadow,
1538 .u.is_sparse = tex->is_sparse,
1539 .u.component = tex->component,
1540 .u.texture_non_uniform = tex->texture_non_uniform,
1541 .u.sampler_non_uniform = tex->sampler_non_uniform,
1542 .u.array_is_lowered_cube = tex->array_is_lowered_cube,
1546 for (unsigned i = 0; i < tex->num_srcs; i++) {
1549 src.tex.src_type = tex->src[i].src_type;
1550 write_src_full(ctx, &tex->src[i].src, src);
1557 nir_tex_instr *tex = nir_tex_instr_create(ctx->nir, header.tex.num_srcs);
1559 read_dest(ctx, &tex->dest, &tex->instr, header);
1561 tex->op = header.tex.op;
1562 tex->texture_index = blob_read_uint32(ctx->blob);
1563 tex->sampler_index = blob_read_uint32(ctx->blob);
1564 if (tex->op == nir_texop_tg4)
1565 blob_copy_bytes(ctx->blob, tex->tg4_offsets, sizeof(tex->tg4_offsets));
1569 tex->sampler_dim = packed.u.sampler_dim;
1570 tex->dest_type = packed.u.dest_type;
1571 tex->coord_components = packed.u.coord_components;
1572 tex->is_array = packed.u.is_array;
1573 tex->is_shadow = packed.u.is_shadow;
1574 tex->is_new_style_shadow = packed.u.is_new_style_shadow;
1575 tex->is_sparse = packed.u.is_sparse;
1576 tex->component = packed.u.component;
1577 tex->texture_non_uniform = packed.u.texture_non_uniform;
1578 tex->sampler_non_uniform = packed.u.sampler_non_uniform;
1579 tex->array_is_lowered_cube = packed.u.array_is_lowered_cube;
1581 for (unsigned i = 0; i < tex->num_srcs; i++) {
1582 union packed_src src = read_src(ctx, &tex->src[i].src, &tex->instr);
1583 tex->src[i].src_type = src.tex.src_type;
1586 return tex;