diff options
author | Feng Chen <vonchenplus@gmail.com> | 2021-09-07 06:34:35 +0200 |
---|---|---|
committer | Feng Chen <vonchenplus@gmail.com> | 2021-09-07 06:34:35 +0200 |
commit | 9cdf2383e99fac2110d788da070f16b2b5c678e7 (patch) | |
tree | a4857abbacebf3659e6b5c647eceb5a64146a26b /src/shader_recompiler/backend/spirv/emit_context.cpp | |
parent | Dynamic get unused location (diff) | |
download | yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.tar yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.tar.gz yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.tar.bz2 yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.tar.lz yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.tar.xz yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.tar.zst yuzu-9cdf2383e99fac2110d788da070f16b2b5c678e7.zip |
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_context.cpp')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_context.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp index 2809f9281..f048174cb 100644 --- a/src/shader_recompiler/backend/spirv/emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/emit_context.cpp @@ -428,6 +428,8 @@ Id DescType(EmitContext& ctx, Id sampled_type, Id pointer_type, u32 count) { return pointer_type; } } + +constexpr size_t NUM_FIXEDFNCTEXTURE = 10; } // Anonymous namespace void VectorTypes::Define(Sirit::Module& sirit_ctx, Id base_type, std::string_view name) { @@ -1272,7 +1274,7 @@ void EmitContext::DefineInputs(const IR::Program& program) { Decorate(id, spv::Decoration::Location, location); input_front_color = id; } - for (size_t index = 0; index < IR::NUM_FIXEDFNCTEXTURE; ++index) { + for (size_t index = 0; index < NUM_FIXEDFNCTEXTURE; ++index) { if (loads.AnyComponent(IR::Attribute::FixedFncTexture0S + index * 4)) { if (ununsed_location.empty()) { throw RuntimeError("Unable to get an unused location"); @@ -1352,7 +1354,7 @@ void EmitContext::DefineOutputs(const IR::Program& program) { Decorate(id, spv::Decoration::Location, location); output_front_color = id; } - for (size_t index = 0; index < IR::NUM_FIXEDFNCTEXTURE; ++index) { + for (size_t index = 0; index < NUM_FIXEDFNCTEXTURE; ++index) { if (info.stores.AnyComponent(IR::Attribute::FixedFncTexture0S + index * 4)) { if (ununsed_location.empty()) { throw RuntimeError("Unable to get an unused location"); |