diff options
author | Fernando S <fsahmkow27@gmail.com> | 2021-12-22 17:36:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-22 17:36:05 +0100 |
commit | 648c7b4ed6fb86d6f98a6e19301c53c1ccfdd512 (patch) | |
tree | 6e489900becbae18884335745d9e3409761c319e /src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | |
parent | Merge pull request #7599 from FernandoS27/primrestart-vulkan (diff) | |
parent | Address format clang (diff) | |
download | yuzu-648c7b4ed6fb86d6f98a6e19301c53c1ccfdd512.tar yuzu-648c7b4ed6fb86d6f98a6e19301c53c1ccfdd512.tar.gz yuzu-648c7b4ed6fb86d6f98a6e19301c53c1ccfdd512.tar.bz2 yuzu-648c7b4ed6fb86d6f98a6e19301c53c1ccfdd512.tar.lz yuzu-648c7b4ed6fb86d6f98a6e19301c53c1ccfdd512.tar.xz yuzu-648c7b4ed6fb86d6f98a6e19301c53c1ccfdd512.tar.zst yuzu-648c7b4ed6fb86d6f98a6e19301c53c1ccfdd512.zip |
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp index ad84966b5..14f470812 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp @@ -44,14 +44,6 @@ Id AttrPointer(EmitContext& ctx, Id pointer_type, Id vertex, Id base, Args&&... } } -bool IsLegacyAttribute(IR::Attribute attribute) { - return (attribute >= IR::Attribute::ColorFrontDiffuseR && - attribute <= IR::Attribute::ColorBackSpecularA) || - attribute == IR::Attribute::FogCoordinate || - (attribute >= IR::Attribute::FixedFncTexture0S && - attribute <= IR::Attribute::FixedFncTexture9Q); -} - template <typename... Args> Id OutputAccessChain(EmitContext& ctx, Id result_type, Id base, Args&&... args) { if (ctx.stage == Stage::TessellationControl) { @@ -83,17 +75,6 @@ std::optional<OutAttr> OutputAttrPointer(EmitContext& ctx, IR::Attribute attr) { return OutputAccessChain(ctx, ctx.output_f32, info.id, index_id); } } - if (IsLegacyAttribute(attr)) { - if (attr == IR::Attribute::FogCoordinate) { - return OutputAccessChain(ctx, ctx.output_f32, ctx.OutputLegacyAttribute(attr), - ctx.Const(0u)); - } else { - const u32 element{static_cast<u32>(attr) % 4}; - const Id element_id{ctx.Const(element)}; - return OutputAccessChain(ctx, ctx.output_f32, ctx.OutputLegacyAttribute(attr), - element_id); - } - } switch (attr) { case IR::Attribute::PointSize: return ctx.output_point_size; @@ -327,18 +308,6 @@ Id EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, Id vertex) { const Id value{ctx.OpLoad(type->id, pointer)}; return type->needs_cast ? ctx.OpBitcast(ctx.F32[1], value) : value; } - if (IsLegacyAttribute(attr)) { - if (attr == IR::Attribute::FogCoordinate) { - const Id attr_ptr{AttrPointer(ctx, ctx.input_f32, vertex, - ctx.InputLegacyAttribute(attr), ctx.Const(0u))}; - return ctx.OpLoad(ctx.F32[1], attr_ptr); - } else { - const Id element_id{ctx.Const(element)}; - const Id attr_ptr{AttrPointer(ctx, ctx.input_f32, vertex, - ctx.InputLegacyAttribute(attr), element_id)}; - return ctx.OpLoad(ctx.F32[1], attr_ptr); - } - } switch (attr) { case IR::Attribute::PrimitiveId: return ctx.OpBitcast(ctx.F32[1], ctx.OpLoad(ctx.U32[1], ctx.primitive_id)); |