tex->component = old_tex->component;
tex->texture_index = old_tex->texture_index;
- tex->texture_array_size = old_tex->texture_array_size;
tex->sampler_index = old_tex->sampler_index;
nir_ssa_dest_init(&tex->instr, &tex->dest,
src_init(&instr->src[i].src);
instr->texture_index = 0;
- instr->texture_array_size = 0;
instr->sampler_index = 0;
memcpy(instr->tg4_offsets, default_tg4_offsets, sizeof(instr->tg4_offsets));
*/
unsigned texture_index;
- /** The size of the texture array or 0 if it's not an array */
- unsigned texture_array_size;
-
/** The sampler index
*
* The following operations do not require a sampler and, as such, this
memcpy(ntex->tg4_offsets, tex->tg4_offsets, sizeof(tex->tg4_offsets));
ntex->texture_index = tex->texture_index;
- ntex->texture_array_size = tex->texture_array_size;
ntex->sampler_index = tex->sampler_index;
ntex->texture_non_uniform = tex->texture_non_uniform;
for (unsigned j = 0; j < 2; ++j)
hash = HASH(hash, instr->tg4_offsets[i][j]);
hash = HASH(hash, instr->texture_index);
- hash = HASH(hash, instr->texture_array_size);
hash = HASH(hash, instr->sampler_index);
hash = HASH(hash, instr->texture_non_uniform);
hash = HASH(hash, instr->sampler_non_uniform);
tex1->is_new_style_shadow != tex2->is_new_style_shadow ||
tex1->component != tex2->component ||
tex1->texture_index != tex2->texture_index ||
- tex1->texture_array_size != tex2->texture_array_size ||
tex1->sampler_index != tex2->sampler_index) {
return false;
}
src->src_type = is_sampler ?
nir_tex_src_sampler_offset :
nir_tex_src_texture_offset;
-
- instr->texture_array_size = array_elements;
} else {
nir_tex_instr_remove_src(instr, src_idx);
}
instr->sampler_index = base_index;
} else {
instr->texture_index = base_index;
- instr->texture_array_size = array_elements;
}
}
unsigned instr_type:4;
unsigned num_srcs:4;
unsigned op:4;
- unsigned texture_array_size:12;
unsigned dest:8;
+ unsigned _pad:12;
} tex;
struct {
unsigned instr_type:4;
{
assert(tex->num_srcs < 16);
assert(tex->op < 16);
- assert(tex->texture_array_size < 1024);
union packed_instr header;
header.u32 = 0;
header.tex.instr_type = tex->instr.type;
header.tex.num_srcs = tex->num_srcs;
header.tex.op = tex->op;
- header.tex.texture_array_size = tex->texture_array_size;
write_dest(ctx, &tex->dest, header, tex->instr.type);
tex->op = header.tex.op;
tex->texture_index = blob_read_uint32(ctx->blob);
- tex->texture_array_size = header.tex.texture_array_size;
tex->sampler_index = blob_read_uint32(ctx->blob);
if (tex->op == nir_texop_tg4)
blob_copy_bytes(ctx->blob, tex->tg4_offsets, sizeof(tex->tg4_offsets));
src->src_type = is_sampler ?
nir_tex_src_sampler_offset :
nir_tex_src_texture_offset;
-
- instr->texture_array_size = array_elements;
} else {
nir_tex_instr_remove_src(instr, src_idx);
}
lower_tex_deref(tex, nir_tex_src_sampler_deref,
&tex->sampler_index, plane, state);
-
- /* The backend only ever uses this to mark used surfaces. We don't care
- * about that little optimization so it just needs to be non-zero.
- */
- tex->texture_array_size = 1;
}
static void
tex->component = old_tex->component;
tex->texture_index = old_tex->texture_index;
- tex->texture_array_size = old_tex->texture_array_size;
tex->sampler_index = old_tex->sampler_index;
tex->is_array = old_tex->is_array;
{
/* TODO */
//assert (!instr->sampler);
- //assert (!instr->texture_array_size);
int texture_index = instr->texture_index;
int sampler_index = texture_index;