mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-30 21:54:22 +01:00
Revert "Start of Integer flags implementation"
This reverts #4713. The implementation in that PR is not accurate. It does not reflect the behavior seen in hardware.
This commit is contained in:
parent
45e117b043
commit
34c3ec2f8c
@ -465,14 +465,6 @@ public:
|
|||||||
return operands.size();
|
return operands.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeBlock& GetOperands() {
|
|
||||||
return operands;
|
|
||||||
}
|
|
||||||
|
|
||||||
const NodeBlock& GetOperands() const {
|
|
||||||
return operands;
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] const Node& operator[](std::size_t operand_index) const {
|
[[nodiscard]] const Node& operator[](std::size_t operand_index) const {
|
||||||
return operands.at(operand_index);
|
return operands.at(operand_index);
|
||||||
}
|
}
|
||||||
|
@ -388,54 +388,9 @@ void ShaderIR::SetInternalFlagsFromInteger(NodeBlock& bb, Node value, bool sets_
|
|||||||
if (!sets_cc) {
|
if (!sets_cc) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (value->index()) {
|
|
||||||
case 0: // Operation Node
|
|
||||||
SearchOperands(bb, value);
|
|
||||||
break;
|
|
||||||
case 2: // General Purpose Node
|
|
||||||
if (const auto* gpr = std::get_if<GprNode>(value.get())) {
|
|
||||||
LOG_DEBUG(HW_GPU, "GprNode: index={}", gpr->GetIndex());
|
|
||||||
Node zerop = Operation(OperationCode::LogicalIEqual, std::move(value),
|
|
||||||
Immediate(gpr->GetIndex()));
|
|
||||||
SetInternalFlag(bb, InternalFlag::Zero, std::move(zerop));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
Node zerop = Operation(OperationCode::LogicalIEqual, std::move(value), Immediate(0));
|
Node zerop = Operation(OperationCode::LogicalIEqual, std::move(value), Immediate(0));
|
||||||
SetInternalFlag(bb, InternalFlag::Zero, std::move(zerop));
|
SetInternalFlag(bb, InternalFlag::Zero, std::move(zerop));
|
||||||
LOG_WARNING(HW_GPU, "Node Type: {}", value->index());
|
LOG_WARNING(HW_GPU, "Condition codes implementation is incomplete");
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ShaderIR::SearchOperands(NodeBlock& nb, Node var) {
|
|
||||||
const auto* op = std::get_if<OperationNode>(var.get());
|
|
||||||
if (op == nullptr) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (op->GetOperandsCount() == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto& operand : op->GetOperands()) {
|
|
||||||
switch (operand->index()) {
|
|
||||||
case 0: // Operation Node
|
|
||||||
return SearchOperands(nb, operand);
|
|
||||||
case 2: // General Purpose Node
|
|
||||||
if (const auto* gpr = std::get_if<GprNode>(operand.get())) {
|
|
||||||
LOG_DEBUG(HW_GPU, "Child GprNode: index={}", gpr->GetIndex());
|
|
||||||
Node zerop = Operation(OperationCode::LogicalIEqual, std::move(operand),
|
|
||||||
Immediate(gpr->GetIndex()));
|
|
||||||
SetInternalFlag(nb, InternalFlag::Zero, std::move(zerop));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
LOG_WARNING(HW_GPU, "Child Node Type: {}", operand->index());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Node ShaderIR::BitfieldExtract(Node value, u32 offset, u32 bits) {
|
Node ShaderIR::BitfieldExtract(Node value, u32 offset, u32 bits) {
|
||||||
|
@ -346,9 +346,6 @@ private:
|
|||||||
/// Access a bindless image sampler.
|
/// Access a bindless image sampler.
|
||||||
ImageEntry& GetBindlessImage(Tegra::Shader::Register reg, Tegra::Shader::ImageType type);
|
ImageEntry& GetBindlessImage(Tegra::Shader::Register reg, Tegra::Shader::ImageType type);
|
||||||
|
|
||||||
/// Recursive Iteration over the OperationNode operands, searching for GprNodes.
|
|
||||||
void SearchOperands(NodeBlock& nb, Node var);
|
|
||||||
|
|
||||||
/// Extracts a sequence of bits from a node
|
/// Extracts a sequence of bits from a node
|
||||||
Node BitfieldExtract(Node value, u32 offset, u32 bits);
|
Node BitfieldExtract(Node value, u32 offset, u32 bits);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user