mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-27 14:10:25 +01:00
tgsi: Remove return type from tgsi_instruction_texture
This return type is never used. Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36765>
This commit is contained in:
parent
eb1a093965
commit
6da8752758
7 changed files with 7 additions and 58 deletions
|
|
@ -45,7 +45,6 @@ struct ntt_insn {
|
|||
struct ureg_dst dst[2];
|
||||
struct ureg_src src[4];
|
||||
enum tgsi_texture_type tex_target;
|
||||
enum tgsi_return_type tex_return_type;
|
||||
struct tgsi_texture_offset tex_offset[4];
|
||||
|
||||
unsigned mem_qualifier;
|
||||
|
|
@ -2852,21 +2851,6 @@ ntt_emit_texture(struct ntt_compile *c, nir_tex_instr *instr)
|
|||
|
||||
s.srcs[s.i++] = sampler;
|
||||
|
||||
enum tgsi_return_type tex_type;
|
||||
switch (instr->dest_type) {
|
||||
case nir_type_float32:
|
||||
tex_type = TGSI_RETURN_TYPE_FLOAT;
|
||||
break;
|
||||
case nir_type_int32:
|
||||
tex_type = TGSI_RETURN_TYPE_SINT;
|
||||
break;
|
||||
case nir_type_uint32:
|
||||
tex_type = TGSI_RETURN_TYPE_UINT;
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE("unknown texture type");
|
||||
}
|
||||
|
||||
struct ureg_dst tex_dst;
|
||||
if (instr->op == nir_texop_query_levels)
|
||||
tex_dst = ureg_writemask(ntt_temp(c), TGSI_WRITEMASK_W);
|
||||
|
|
@ -2878,7 +2862,6 @@ ntt_emit_texture(struct ntt_compile *c, nir_tex_instr *instr)
|
|||
|
||||
struct ntt_insn *insn = ntt_insn(c, tex_opcode, tex_dst, s.srcs[0], s.srcs[1], s.srcs[2], s.srcs[3]);
|
||||
insn->tex_target = target;
|
||||
insn->tex_return_type = tex_type;
|
||||
insn->is_tex = true;
|
||||
|
||||
int tex_offset_src = nir_tex_instr_src_index(instr, nir_tex_src_offset);
|
||||
|
|
@ -3109,7 +3092,7 @@ ntt_emit_block_ureg(struct ntt_compile *c, struct nir_block *block)
|
|||
}
|
||||
ureg_tex_insn(c->ureg, insn->opcode,
|
||||
insn->dst, opcode_info->num_dst,
|
||||
insn->tex_target, insn->tex_return_type,
|
||||
insn->tex_target,
|
||||
insn->tex_offset,
|
||||
num_offsets,
|
||||
insn->src, opcode_info->num_src);
|
||||
|
|
|
|||
|
|
@ -731,7 +731,6 @@ tgsi_default_instruction_texture( void )
|
|||
|
||||
instruction_texture.Texture = TGSI_TEXTURE_UNKNOWN;
|
||||
instruction_texture.NumOffsets = 0;
|
||||
instruction_texture.ReturnType = TGSI_RETURN_TYPE_UNKNOWN;
|
||||
instruction_texture.Padding = 0;
|
||||
|
||||
return instruction_texture;
|
||||
|
|
@ -741,7 +740,6 @@ static struct tgsi_instruction_texture
|
|||
tgsi_build_instruction_texture(
|
||||
unsigned texture,
|
||||
unsigned num_offsets,
|
||||
unsigned return_type,
|
||||
struct tgsi_instruction *instruction,
|
||||
struct tgsi_header *header )
|
||||
{
|
||||
|
|
@ -749,7 +747,6 @@ tgsi_build_instruction_texture(
|
|||
|
||||
instruction_texture.Texture = texture;
|
||||
instruction_texture.NumOffsets = num_offsets;
|
||||
instruction_texture.ReturnType = return_type;
|
||||
instruction_texture.Padding = 0;
|
||||
instruction->Texture = 1;
|
||||
|
||||
|
|
@ -1101,7 +1098,6 @@ tgsi_build_full_instruction(
|
|||
*instruction_texture = tgsi_build_instruction_texture(
|
||||
full_inst->Texture.Texture,
|
||||
full_inst->Texture.NumOffsets,
|
||||
full_inst->Texture.ReturnType,
|
||||
instruction,
|
||||
header );
|
||||
|
||||
|
|
|
|||
|
|
@ -1339,7 +1339,7 @@ void
|
|||
ureg_emit_texture(struct ureg_program *ureg,
|
||||
unsigned extended_token,
|
||||
enum tgsi_texture_type target,
|
||||
enum tgsi_return_type return_type, unsigned num_offsets)
|
||||
unsigned num_offsets)
|
||||
{
|
||||
union tgsi_any_token *out, *insn;
|
||||
|
||||
|
|
@ -1351,7 +1351,6 @@ ureg_emit_texture(struct ureg_program *ureg,
|
|||
out[0].value = 0;
|
||||
out[0].insn_texture.Texture = target;
|
||||
out[0].insn_texture.NumOffsets = num_offsets;
|
||||
out[0].insn_texture.ReturnType = return_type;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1438,7 +1437,6 @@ ureg_tex_insn(struct ureg_program *ureg,
|
|||
const struct ureg_dst *dst,
|
||||
unsigned nr_dst,
|
||||
enum tgsi_texture_type target,
|
||||
enum tgsi_return_type return_type,
|
||||
const struct tgsi_texture_offset *texoffsets,
|
||||
unsigned nr_offset,
|
||||
const struct ureg_src *src,
|
||||
|
|
@ -1461,8 +1459,7 @@ ureg_tex_insn(struct ureg_program *ureg,
|
|||
nr_dst,
|
||||
nr_src);
|
||||
|
||||
ureg_emit_texture( ureg, insn.extended_token, target, return_type,
|
||||
nr_offset );
|
||||
ureg_emit_texture( ureg, insn.extended_token, target, nr_offset );
|
||||
|
||||
for (i = 0; i < nr_offset; i++)
|
||||
ureg_emit_texture_offset( ureg, &texoffsets[i]);
|
||||
|
|
|
|||
|
|
@ -553,7 +553,6 @@ ureg_tex_insn(struct ureg_program *ureg,
|
|||
const struct ureg_dst *dst,
|
||||
unsigned nr_dst,
|
||||
enum tgsi_texture_type target,
|
||||
enum tgsi_return_type return_type,
|
||||
const struct tgsi_texture_offset *texoffsets,
|
||||
unsigned nr_offset,
|
||||
const struct ureg_src *src,
|
||||
|
|
@ -597,7 +596,6 @@ void
|
|||
ureg_emit_texture(struct ureg_program *ureg,
|
||||
unsigned insn_token,
|
||||
enum tgsi_texture_type target,
|
||||
enum tgsi_return_type return_type,
|
||||
unsigned num_offsets);
|
||||
|
||||
void
|
||||
|
|
@ -757,7 +755,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \
|
|||
struct ureg_src src1 ) \
|
||||
{ \
|
||||
enum tgsi_opcode opcode = TGSI_OPCODE_##op; \
|
||||
enum tgsi_return_type return_type = TGSI_RETURN_TYPE_UNKNOWN; \
|
||||
struct ureg_emit_insn_result insn; \
|
||||
if (ureg_dst_is_empty(dst)) \
|
||||
return; \
|
||||
|
|
@ -767,8 +764,7 @@ static inline void ureg_##op( struct ureg_program *ureg, \
|
|||
0, \
|
||||
1, \
|
||||
2); \
|
||||
ureg_emit_texture( ureg, insn.extended_token, target, \
|
||||
return_type, 0 ); \
|
||||
ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \
|
||||
ureg_emit_dst( ureg, dst ); \
|
||||
ureg_emit_src( ureg, src0 ); \
|
||||
ureg_emit_src( ureg, src1 ); \
|
||||
|
|
@ -835,7 +831,6 @@ static inline void ureg_##op( struct ureg_program *ureg, \
|
|||
struct ureg_src src3 ) \
|
||||
{ \
|
||||
enum tgsi_opcode opcode = TGSI_OPCODE_##op; \
|
||||
enum tgsi_return_type return_type = TGSI_RETURN_TYPE_UNKNOWN; \
|
||||
struct ureg_emit_insn_result insn; \
|
||||
if (ureg_dst_is_empty(dst)) \
|
||||
return; \
|
||||
|
|
@ -845,8 +840,7 @@ static inline void ureg_##op( struct ureg_program *ureg, \
|
|||
0, \
|
||||
1, \
|
||||
4); \
|
||||
ureg_emit_texture( ureg, insn.extended_token, target, \
|
||||
return_type, 0 ); \
|
||||
ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \
|
||||
ureg_emit_dst( ureg, dst ); \
|
||||
ureg_emit_src( ureg, src0 ); \
|
||||
ureg_emit_src( ureg, src1 ); \
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ struct ntr_insn {
|
|||
struct ureg_dst dst[2];
|
||||
struct ureg_src src[4];
|
||||
enum tgsi_texture_type tex_target;
|
||||
enum tgsi_return_type tex_return_type;
|
||||
struct tgsi_texture_offset tex_offset[4];
|
||||
|
||||
unsigned mem_qualifier;
|
||||
|
|
@ -1426,21 +1425,6 @@ ntr_emit_texture(struct ntr_compile *c, nir_tex_instr *instr)
|
|||
|
||||
s.srcs[s.i++] = sampler;
|
||||
|
||||
enum tgsi_return_type tex_type;
|
||||
switch (instr->dest_type) {
|
||||
case nir_type_float32:
|
||||
tex_type = TGSI_RETURN_TYPE_FLOAT;
|
||||
break;
|
||||
case nir_type_int32:
|
||||
tex_type = TGSI_RETURN_TYPE_SINT;
|
||||
break;
|
||||
case nir_type_uint32:
|
||||
tex_type = TGSI_RETURN_TYPE_UINT;
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE("unknown texture type");
|
||||
}
|
||||
|
||||
struct ureg_dst tex_dst;
|
||||
if (instr->op == nir_texop_query_levels)
|
||||
tex_dst = ureg_writemask(ntr_temp(c), TGSI_WRITEMASK_W);
|
||||
|
|
@ -1453,7 +1437,6 @@ ntr_emit_texture(struct ntr_compile *c, nir_tex_instr *instr)
|
|||
struct ntr_insn *insn =
|
||||
ntr_insn(c, tex_opcode, tex_dst, s.srcs[0], s.srcs[1], s.srcs[2], s.srcs[3]);
|
||||
insn->tex_target = target;
|
||||
insn->tex_return_type = tex_type;
|
||||
insn->is_tex = true;
|
||||
|
||||
int tex_offset_src = nir_tex_instr_src_index(instr, nir_tex_src_offset);
|
||||
|
|
@ -1676,8 +1659,7 @@ ntr_emit_block_ureg(struct ntr_compile *c, struct nir_block *block)
|
|||
num_offsets = i + 1;
|
||||
}
|
||||
ureg_tex_insn(c->ureg, insn->opcode, insn->dst, opcode_info->num_dst, insn->tex_target,
|
||||
insn->tex_return_type, insn->tex_offset, num_offsets, insn->src,
|
||||
opcode_info->num_src);
|
||||
insn->tex_offset, num_offsets, insn->src, opcode_info->num_src);
|
||||
} else {
|
||||
ureg_insn(c->ureg, insn->opcode, insn->dst, opcode_info->num_dst, insn->src,
|
||||
opcode_info->num_src, insn->precise);
|
||||
|
|
|
|||
|
|
@ -1195,7 +1195,6 @@ sample_ureg_emit(struct ureg_program *ureg,
|
|||
tgsi_opcode,
|
||||
&dst, 1,
|
||||
TGSI_TEXTURE_UNKNOWN,
|
||||
TGSI_RETURN_TYPE_UNKNOWN,
|
||||
&texoffsets, num_offsets,
|
||||
src, num_src);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -231,7 +231,6 @@ enum tgsi_return_type {
|
|||
TGSI_RETURN_TYPE_SINT,
|
||||
TGSI_RETURN_TYPE_UINT,
|
||||
TGSI_RETURN_TYPE_FLOAT,
|
||||
TGSI_RETURN_TYPE_UNKNOWN,
|
||||
TGSI_RETURN_TYPE_COUNT
|
||||
};
|
||||
|
||||
|
|
@ -701,8 +700,7 @@ struct tgsi_instruction_texture
|
|||
{
|
||||
unsigned Texture : 8; /* TGSI_TEXTURE_ */
|
||||
unsigned NumOffsets : 4;
|
||||
unsigned ReturnType : 3; /* TGSI_RETURN_TYPE_x */
|
||||
unsigned Padding : 17;
|
||||
unsigned Padding : 20;
|
||||
};
|
||||
|
||||
/* for texture offsets in GLSL and DirectX.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue