diff options
author | Jason Ekstrand <[email protected]> | 2020-02-24 21:16:01 -0600 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-26 18:29:49 +0000 |
commit | 349898a967f1bf28271454d88b3f1a36a4db2e06 (patch) | |
tree | cd29e4c6b48a47202beef0824c8719118f741cc9 /src/compiler/nir | |
parent | ec2f905ca8fda0deaba4fa099a9e47028c11d7e9 (diff) |
nir: Drop nir_tex_instr::texture_array_size
It's set by lots of things and we spend a lot of time maintaining it but
no one actually uses the value for anything useful.
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3940>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3940>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir.c | 1 | ||||
-rw-r--r-- | src/compiler/nir/nir.h | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_clone.c | 1 | ||||
-rw-r--r-- | src/compiler/nir/nir_instr_set.c | 2 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_samplers.c | 3 | ||||
-rw-r--r-- | src/compiler/nir/nir_serialize.c | 5 |
6 files changed, 1 insertions, 14 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 123f3e44502..e3569d1f80b 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -548,7 +548,6 @@ nir_tex_instr_create(nir_shader *shader, unsigned num_srcs) 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)); diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 1547bf0c641..804e2d82519 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1884,9 +1884,6 @@ typedef struct { */ 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 diff --git a/src/compiler/nir/nir_clone.c b/src/compiler/nir/nir_clone.c index d1938918d5e..d5ae7f17793 100644 --- a/src/compiler/nir/nir_clone.c +++ b/src/compiler/nir/nir_clone.c @@ -419,7 +419,6 @@ clone_tex(clone_state *state, const nir_tex_instr *tex) 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; diff --git a/src/compiler/nir/nir_instr_set.c b/src/compiler/nir/nir_instr_set.c index 9ddcdcb4dc2..212afbf3dac 100644 --- a/src/compiler/nir/nir_instr_set.c +++ b/src/compiler/nir/nir_instr_set.c @@ -274,7 +274,6 @@ hash_tex(uint32_t hash, const nir_tex_instr *instr) 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); @@ -659,7 +658,6 @@ nir_instrs_equal(const nir_instr *instr1, const nir_instr *instr2) 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; } diff --git a/src/compiler/nir/nir_lower_samplers.c b/src/compiler/nir/nir_lower_samplers.c index 5a440f7117c..b60e6aa63b7 100644 --- a/src/compiler/nir/nir_lower_samplers.c +++ b/src/compiler/nir/nir_lower_samplers.c @@ -83,8 +83,6 @@ lower_tex_src_to_offset(nir_builder *b, 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); } @@ -93,7 +91,6 @@ lower_tex_src_to_offset(nir_builder *b, instr->sampler_index = base_index; } else { instr->texture_index = base_index; - instr->texture_array_size = array_elements; } } diff --git a/src/compiler/nir/nir_serialize.c b/src/compiler/nir/nir_serialize.c index 0be80faf9a1..ddb9628b3c1 100644 --- a/src/compiler/nir/nir_serialize.c +++ b/src/compiler/nir/nir_serialize.c @@ -672,8 +672,8 @@ union packed_instr { 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; @@ -1460,7 +1460,6 @@ write_tex(write_ctx *ctx, const nir_tex_instr *tex) { assert(tex->num_srcs < 16); assert(tex->op < 16); - assert(tex->texture_array_size < 1024); union packed_instr header; header.u32 = 0; @@ -1468,7 +1467,6 @@ write_tex(write_ctx *ctx, const nir_tex_instr *tex) 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); @@ -1508,7 +1506,6 @@ read_tex(read_ctx *ctx, union packed_instr header) 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)); |