summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFeng Chen <vonchenplus@gmail.com>2021-09-02 17:34:51 +0200
committerFeng Chen <vonchenplus@gmail.com>2021-09-02 17:34:51 +0200
commit1e2a89d3061bbee3c73cd55fb8d580b56aabacec (patch)
tree641e9e88512f3479c19b2e6bd8fe41bb2b80b840 /src
parentAdd colorfront and txtcoord support (diff)
downloadyuzu-1e2a89d3061bbee3c73cd55fb8d580b56aabacec.tar
yuzu-1e2a89d3061bbee3c73cd55fb8d580b56aabacec.tar.gz
yuzu-1e2a89d3061bbee3c73cd55fb8d580b56aabacec.tar.bz2
yuzu-1e2a89d3061bbee3c73cd55fb8d580b56aabacec.tar.lz
yuzu-1e2a89d3061bbee3c73cd55fb8d580b56aabacec.tar.xz
yuzu-1e2a89d3061bbee3c73cd55fb8d580b56aabacec.tar.zst
yuzu-1e2a89d3061bbee3c73cd55fb8d580b56aabacec.zip
Diffstat (limited to 'src')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_context.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp
index 89c75c52d..ff0501b76 100644
--- a/src/shader_recompiler/backend/spirv/emit_context.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_context.cpp
@@ -1202,10 +1202,14 @@ void EmitContext::DefineInputs(const IR::Program& program) {
}
}
if (loads.AllComponents(IR::Attribute::ColorFrontDiffuseR)) {
- input_front_color = DefineInput(*this, F32[4], true);
+ const Id id{DefineInput(*this, F32[4], true)};
+ Decorate(id, spv::Decoration::Location, static_cast<u32>(55));
+ input_front_color = id;
}
- if (loads.AllComponents(IR::Attribute::FixedFncTexture0S)) {
- input_txt_coord = DefineInput(*this, F32[4], true);
+ if (loads.AnyComponent(IR::Attribute::FixedFncTexture0S)) {
+ const Id id{DefineInput(*this, F32[4], true)};
+ Decorate(id, spv::Decoration::Location, static_cast<u32>(56));
+ input_txt_coord = id;
}
if (loads[IR::Attribute::InstanceId]) {
if (profile.support_vertex_instance_id) {
@@ -1289,7 +1293,9 @@ void EmitContext::DefineOutputs(const IR::Program& program) {
output_position = DefineOutput(*this, F32[4], invocations, spv::BuiltIn::Position);
}
if (info.stores.AnyComponent(IR::Attribute::ColorFrontDiffuseR) || stage == Stage::VertexB) {
- output_front_color = DefineOutput(*this, F32[4], invocations);
+ const Id id{DefineOutput(*this, F32[4], invocations)};
+ Decorate(id, spv::Decoration::Location, static_cast<u32>(55));
+ output_front_color = id;
}
if (info.stores[IR::Attribute::PointSize] || runtime_info.fixed_state_point_size) {
if (stage == Stage::Fragment) {
@@ -1324,7 +1330,9 @@ void EmitContext::DefineOutputs(const IR::Program& program) {
}
if (info.stores.AnyComponent(IR::Attribute::FixedFncTexture0S)) {
- output_txt_coord = DefineOutput(*this, F32[4], invocations);
+ const Id id{DefineOutput(*this, F32[4], invocations)};
+ Decorate(id, spv::Decoration::Location, static_cast<u32>(56));
+ output_txt_coord = id;
}
for (size_t index = 0; index < IR::NUM_GENERICS; ++index) {