mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
r300: Remove some dead compiler code.
Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14211>
This commit is contained in:
parent
f7e63ec5d8
commit
acef6b6bb3
2 changed files with 0 additions and 59 deletions
|
|
@ -135,63 +135,6 @@ void rc_calculate_inputs_outputs(struct radeon_compiler * c)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rewrite the program such that everything that source the given input
|
||||
* register will source new_input instead.
|
||||
*/
|
||||
void rc_move_input(struct radeon_compiler * c, unsigned input, struct rc_src_register new_input)
|
||||
{
|
||||
struct rc_instruction * inst;
|
||||
|
||||
c->Program.InputsRead &= ~(1U << input);
|
||||
|
||||
for(inst = c->Program.Instructions.Next; inst != &c->Program.Instructions; inst = inst->Next) {
|
||||
const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->U.I.Opcode);
|
||||
unsigned i;
|
||||
|
||||
for(i = 0; i < opcode->NumSrcRegs; ++i) {
|
||||
if (inst->U.I.SrcReg[i].File == RC_FILE_INPUT && inst->U.I.SrcReg[i].Index == input) {
|
||||
inst->U.I.SrcReg[i].File = new_input.File;
|
||||
inst->U.I.SrcReg[i].Index = new_input.Index;
|
||||
inst->U.I.SrcReg[i].Swizzle = combine_swizzles(new_input.Swizzle, inst->U.I.SrcReg[i].Swizzle);
|
||||
if (!inst->U.I.SrcReg[i].Abs) {
|
||||
inst->U.I.SrcReg[i].Negate ^= new_input.Negate;
|
||||
inst->U.I.SrcReg[i].Abs = new_input.Abs;
|
||||
}
|
||||
|
||||
c->Program.InputsRead |= 1U << new_input.Index;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Rewrite the program such that everything that writes into the given
|
||||
* output register will instead write to new_output. The new_output
|
||||
* writemask is honoured.
|
||||
*/
|
||||
void rc_move_output(struct radeon_compiler * c, unsigned output, unsigned new_output, unsigned writemask)
|
||||
{
|
||||
struct rc_instruction * inst;
|
||||
|
||||
c->Program.OutputsWritten &= ~(1U << output);
|
||||
|
||||
for(inst = c->Program.Instructions.Next; inst != &c->Program.Instructions; inst = inst->Next) {
|
||||
const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->U.I.Opcode);
|
||||
|
||||
if (opcode->HasDstReg) {
|
||||
if (inst->U.I.DstReg.File == RC_FILE_OUTPUT && inst->U.I.DstReg.Index == output) {
|
||||
inst->U.I.DstReg.Index = new_output;
|
||||
inst->U.I.DstReg.WriteMask &= writemask;
|
||||
|
||||
c->Program.OutputsWritten |= 1U << new_output;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Rewrite the program such that a given output is duplicated.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -99,8 +99,6 @@ int rc_if_fail_helper(struct radeon_compiler * c, const char * file, int line, c
|
|||
|
||||
void rc_calculate_inputs_outputs(struct radeon_compiler * c);
|
||||
|
||||
void rc_move_input(struct radeon_compiler * c, unsigned input, struct rc_src_register new_input);
|
||||
void rc_move_output(struct radeon_compiler * c, unsigned output, unsigned new_output, unsigned writemask);
|
||||
void rc_copy_output(struct radeon_compiler * c, unsigned output, unsigned dup_output);
|
||||
void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsigned new_input,
|
||||
int full_vtransform);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue