mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
aco: rename p_early_exit_if to if_not
It exits the shaders if the condition is false, not true. Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Daniel Schürmann <None> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32731>
This commit is contained in:
parent
13421a9fef
commit
c279e63a79
5 changed files with 8 additions and 8 deletions
|
|
@ -69,7 +69,7 @@ needs_exact(aco_ptr<Instruction>& instr)
|
|||
} else if (instr->isFlatLike()) {
|
||||
return instr->flatlike().disable_wqm;
|
||||
} else {
|
||||
/* Require Exact for p_jump_to_epilog because if p_exit_early_if is
|
||||
/* Require Exact for p_jump_to_epilog because if p_exit_early_if_not is
|
||||
* emitted inside the same block, the main FS will always jump to the PS
|
||||
* epilog without considering the exec mask.
|
||||
*/
|
||||
|
|
@ -467,7 +467,7 @@ process_instructions(exec_ctx& ctx, Block* block, std::vector<aco_ptr<Instructio
|
|||
exit_cond = andn2->definitions[1].getTemp();
|
||||
}
|
||||
|
||||
instr->opcode = aco_opcode::p_exit_early_if;
|
||||
instr->opcode = aco_opcode::p_exit_early_if_not;
|
||||
instr->operands[0] = bld.scc(exit_cond);
|
||||
assert(!ctx.handle_wqm || (info.exec[0].type & mask_type_wqm) == 0);
|
||||
|
||||
|
|
@ -524,7 +524,7 @@ process_instructions(exec_ctx& ctx, Block* block, std::vector<aco_ptr<Instructio
|
|||
}
|
||||
|
||||
/* End shader if global mask is zero. */
|
||||
instr->opcode = aco_opcode::p_exit_early_if;
|
||||
instr->opcode = aco_opcode::p_exit_early_if_not;
|
||||
instr->operands[0] = bld.scc(exit_cond.getTemp());
|
||||
bld.insert(std::move(instr));
|
||||
|
||||
|
|
|
|||
|
|
@ -2340,7 +2340,7 @@ lower_to_hw_instr(Program* program)
|
|||
handle_operands(copy_operations, &ctx, program->gfx_level, pi);
|
||||
break;
|
||||
}
|
||||
case aco_opcode::p_exit_early_if: {
|
||||
case aco_opcode::p_exit_early_if_not: {
|
||||
/* don't bother with an early exit near the end of the program */
|
||||
if ((block->instructions.size() - 1 - instr_idx) <= 5 &&
|
||||
block->instructions.back()->opcode == aco_opcode::s_endpgm) {
|
||||
|
|
@ -2910,7 +2910,7 @@ lower_to_hw_instr(Program* program)
|
|||
block->instructions = std::move(ctx.instructions);
|
||||
}
|
||||
|
||||
/* If block with p_end_with_regs is not the last block (i.e. p_exit_early_if may append exit
|
||||
/* If block with p_end_with_regs is not the last block (i.e. p_exit_early_if_not may append exit
|
||||
* block at last), create an exit block for it to branch to.
|
||||
*/
|
||||
int last_block_index = program->blocks.size() - 1;
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ insn("p_end_wqm")
|
|||
insn("p_discard_if")
|
||||
insn("p_demote_to_helper")
|
||||
insn("p_is_helper")
|
||||
insn("p_exit_early_if")
|
||||
insn("p_exit_early_if_not")
|
||||
|
||||
# simulates proper bpermute behavior using v_readlane_b32
|
||||
# definitions: result VGPR, temp EXEC, clobbered VCC
|
||||
|
|
|
|||
|
|
@ -555,7 +555,7 @@ HazardResult
|
|||
perform_hazard_query(hazard_query* query, Instruction* instr, bool upwards)
|
||||
{
|
||||
/* don't schedule discards downwards */
|
||||
if (!upwards && instr->opcode == aco_opcode::p_exit_early_if)
|
||||
if (!upwards && instr->opcode == aco_opcode::p_exit_early_if_not)
|
||||
return hazard_fail_unreorderable;
|
||||
|
||||
/* In Primitive Ordered Pixel Shading, await overlapped waves as late as possible, and notify
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ BEGIN_TEST(d3d11_derivs.discard)
|
|||
|
||||
/* The discard gets emitted as demote_if. */
|
||||
//>> s2: %_:exec, s1: %cond:scc = s_wqm_b64 %_
|
||||
//>> p_exit_early_if (kill)%cond:scc
|
||||
//>> p_exit_early_if_not (kill)%cond:scc
|
||||
//>> v4: %_ = image_sample (kill)%_, (kill)%_, v1: undef, (kill)%_, (kill)%_ 2d
|
||||
pbld.print_ir(VK_SHADER_STAGE_FRAGMENT_BIT, "ACO IR");
|
||||
END_TEST
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue