diff options
author | Billy Laws <blaws05@gmail.com> | 2023-01-05 23:10:21 +0100 |
---|---|---|
committer | Billy Laws <blaws05@gmail.com> | 2023-01-05 23:18:10 +0100 |
commit | 58fec43768c837c63453e87df8f337a2d139324a (patch) | |
tree | 161a20fc84cdc3c3086a470ca7afd09fe9f56169 /src/shader_recompiler/backend | |
parent | externals: Update sirit (diff) | |
download | yuzu-58fec43768c837c63453e87df8f337a2d139324a.tar yuzu-58fec43768c837c63453e87df8f337a2d139324a.tar.gz yuzu-58fec43768c837c63453e87df8f337a2d139324a.tar.bz2 yuzu-58fec43768c837c63453e87df8f337a2d139324a.tar.lz yuzu-58fec43768c837c63453e87df8f337a2d139324a.tar.xz yuzu-58fec43768c837c63453e87df8f337a2d139324a.tar.zst yuzu-58fec43768c837c63453e87df8f337a2d139324a.zip |
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | 11 | ||||
-rw-r--r-- | src/shader_recompiler/backend/spirv/spirv_emit_context.cpp | 5 |
2 files changed, 9 insertions, 7 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 1590debc4..0cd87a48f 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 @@ -321,11 +321,12 @@ Id EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, Id vertex) { case IR::Attribute::PositionY: case IR::Attribute::PositionZ: case IR::Attribute::PositionW: - return ctx.OpLoad(ctx.F32[1], ctx.need_input_position_indirect ? - AttrPointer(ctx, ctx.input_f32, vertex, ctx.input_position, - ctx.u32_zero_value, ctx.Const(element)) - : AttrPointer(ctx, ctx.input_f32, vertex, ctx.input_position, - ctx.Const(element))); + return ctx.OpLoad( + ctx.F32[1], + ctx.need_input_position_indirect + ? AttrPointer(ctx, ctx.input_f32, vertex, ctx.input_position, ctx.u32_zero_value, + ctx.Const(element)) + : AttrPointer(ctx, ctx.input_f32, vertex, ctx.input_position, ctx.Const(element))); case IR::Attribute::InstanceId: if (ctx.profile.support_vertex_instance_id) { return ctx.OpBitcast(ctx.F32[1], ctx.OpLoad(ctx.U32[1], ctx.instance_id)); diff --git a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp index f874622b8..a0c155fdb 100644 --- a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp @@ -729,7 +729,7 @@ void EmitContext::DefineAttributeMemAccess(const Info& info) { else return OpAccessChain(input_f32, input_position, u32_zero_value, masked_index); - } else { + } else { if (is_array) return OpAccessChain(input_f32, input_position, vertex, masked_index); else @@ -1390,7 +1390,8 @@ void EmitContext::DefineInputs(const IR::Program& program) { static_cast<unsigned>(spv::BuiltIn::Position)); Decorate(input_position_struct, spv::Decoration::Block); } else { - const spv::BuiltIn built_in{is_fragment ? spv::BuiltIn::FragCoord : spv::BuiltIn::Position}; + const spv::BuiltIn built_in{is_fragment ? spv::BuiltIn::FragCoord + : spv::BuiltIn::Position}; input_position = DefineInput(*this, F32[4], true, built_in); if (profile.support_geometry_shader_passthrough) { |