From 33ac7b85750fec847012a8498d58eaeaa2697da3 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Mon, 25 Jan 2021 08:20:36 +0100 Subject: [PATCH] early-access version 1376 --- README.md | 2 +- src/video_core/shader/node.h | 8 ----- src/video_core/shader/shader_ir.cpp | 51 ++--------------------------- src/video_core/shader/shader_ir.h | 3 -- 4 files changed, 4 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index 76f962f4e..80c82d93c 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1375. +This is the source code for early-access 1376. ## Legal Notice diff --git a/src/video_core/shader/node.h b/src/video_core/shader/node.h index c9840b75e..b54d33763 100755 --- a/src/video_core/shader/node.h +++ b/src/video_core/shader/node.h @@ -465,14 +465,6 @@ public: return operands.size(); } - NodeBlock& GetOperands() { - return operands; - } - - const NodeBlock& GetOperands() const { - return operands; - } - [[nodiscard]] const Node& operator[](std::size_t operand_index) const { return operands.at(operand_index); } diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp index 625a5eb46..a4987ffc6 100755 --- a/src/video_core/shader/shader_ir.cpp +++ b/src/video_core/shader/shader_ir.cpp @@ -388,54 +388,9 @@ void ShaderIR::SetInternalFlagsFromInteger(NodeBlock& bb, Node value, bool sets_ if (!sets_cc) { return; } - switch (value->index()) { - case 0: // Operation Node - SearchOperands(bb, value); - break; - case 2: // General Purpose Node - if (const auto* gpr = std::get_if(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)); - SetInternalFlag(bb, InternalFlag::Zero, std::move(zerop)); - LOG_WARNING(HW_GPU, "Node Type: {}", value->index()); - break; - } -} - -void ShaderIR::SearchOperands(NodeBlock& nb, Node var) { - const auto* op = std::get_if(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(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 zerop = Operation(OperationCode::LogicalIEqual, std::move(value), Immediate(0)); + SetInternalFlag(bb, InternalFlag::Zero, std::move(zerop)); + LOG_WARNING(HW_GPU, "Condition codes implementation is incomplete"); } Node ShaderIR::BitfieldExtract(Node value, u32 offset, u32 bits) { diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h index 0928620bb..1cd7c14d7 100755 --- a/src/video_core/shader/shader_ir.h +++ b/src/video_core/shader/shader_ir.h @@ -350,9 +350,6 @@ private: /// Access a bindless image sampler. 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 Node BitfieldExtract(Node value, u32 offset, u32 bits);