Просмотр исходного кода

shader_ir: Remove Ipa primitive

ReinUsesLisp 7 лет назад
Родитель
Сommit
52223313b1

+ 0 - 8
src/video_core/renderer_opengl/gl_shader_decompiler.cpp

@@ -1204,12 +1204,6 @@ private:
         return expr;
         return expr;
     }
     }
 
 
-    std::string Ipa(Operation operation) {
-        const auto& attribute = operation[0];
-        // TODO(Rodrigo): Special IPA attribute interactions
-        return Visit(attribute);
-    }
-
     std::string Bra(Operation operation) {
     std::string Bra(Operation operation) {
         const auto target = std::get<ImmediateNode>(*operation[0]);
         const auto target = std::get<ImmediateNode>(*operation[0]);
         code.AddLine(fmt::format("jmp_to = 0x{:x}u;", target.GetValue()));
         code.AddLine(fmt::format("jmp_to = 0x{:x}u;", target.GetValue()));
@@ -1448,8 +1442,6 @@ private:
         &GLSLDecompiler::F4TextureQueryLod,
         &GLSLDecompiler::F4TextureQueryLod,
         &GLSLDecompiler::F4TexelFetch,
         &GLSLDecompiler::F4TexelFetch,
 
 
-        &GLSLDecompiler::Ipa,
-
         &GLSLDecompiler::Bra,
         &GLSLDecompiler::Bra,
         &GLSLDecompiler::PushFlowStack, // Ssy
         &GLSLDecompiler::PushFlowStack, // Ssy
         &GLSLDecompiler::PushFlowStack, // Brk
         &GLSLDecompiler::PushFlowStack, // Brk

+ 2 - 3
src/video_core/shader/decode/other.cpp

@@ -134,9 +134,8 @@ u32 ShaderIR::DecodeOther(BasicBlock& bb, u32 pc) {
         const Tegra::Shader::IpaMode input_mode{instr.ipa.interp_mode.Value(),
         const Tegra::Shader::IpaMode input_mode{instr.ipa.interp_mode.Value(),
                                                 instr.ipa.sample_mode.Value()};
                                                 instr.ipa.sample_mode.Value()};
 
 
-        const Node input_attr = GetInputAttribute(attribute.index, attribute.element, input_mode);
-        const Node ipa = Operation(OperationCode::Ipa, input_attr);
-        const Node value = GetSaturatedFloat(ipa, instr.ipa.saturate);
+        const Node attr = GetInputAttribute(attribute.index, attribute.element, input_mode);
+        const Node value = GetSaturatedFloat(attr, instr.ipa.saturate);
 
 
         SetRegister(bb, instr.gpr0, value);
         SetRegister(bb, instr.gpr0, value);
         break;
         break;

+ 0 - 2
src/video_core/shader/shader_ir.h

@@ -161,8 +161,6 @@ enum class OperationCode {
     F4TextureQueryLod,        /// (MetaTexture, float[N] coords) -> float4
     F4TextureQueryLod,        /// (MetaTexture, float[N] coords) -> float4
     F4TexelFetch,             /// (MetaTexture, int[N], int) -> float4
     F4TexelFetch,             /// (MetaTexture, int[N], int) -> float4
 
 
-    Ipa, /// (abuf src) -> float
-
     Bra,  /// (uint branch_target) -> void
     Bra,  /// (uint branch_target) -> void
     Ssy,  /// (uint branch_target) -> void
     Ssy,  /// (uint branch_target) -> void
     Pbk,  /// (uint branch_target) -> void
     Pbk,  /// (uint branch_target) -> void