diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-01-05 23:36:21 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2020-01-24 21:43:31 +0100 |
commit | 037ea431ceb93e93274fdcf9fb724819639d04fd (patch) | |
tree | 7357dac5799959d2dc7dbe78346cb8cbd1a5400b /src/video_core/shader/decode | |
parent | Shader_IR: Setup Indexed Samplers on the IR (diff) | |
download | yuzu-037ea431ceb93e93274fdcf9fb724819639d04fd.tar yuzu-037ea431ceb93e93274fdcf9fb724819639d04fd.tar.gz yuzu-037ea431ceb93e93274fdcf9fb724819639d04fd.tar.bz2 yuzu-037ea431ceb93e93274fdcf9fb724819639d04fd.tar.lz yuzu-037ea431ceb93e93274fdcf9fb724819639d04fd.tar.xz yuzu-037ea431ceb93e93274fdcf9fb724819639d04fd.tar.zst yuzu-037ea431ceb93e93274fdcf9fb724819639d04fd.zip |
Diffstat (limited to 'src/video_core/shader/decode')
-rw-r--r-- | src/video_core/shader/decode/texture.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/shader/decode/texture.cpp b/src/video_core/shader/decode/texture.cpp index 886650d9e..e7c38f5d6 100644 --- a/src/video_core/shader/decode/texture.cpp +++ b/src/video_core/shader/decode/texture.cpp @@ -383,7 +383,7 @@ const Sampler* ShaderIR::GetSampler(const Tegra::Shader::Sampler& sampler, // Otherwise create a new mapping for this sampler const auto next_index = static_cast<u32>(used_samplers.size()); return &used_samplers.emplace_back(next_index, offset, info.type, info.is_array, info.is_shadow, - info.is_buffer); + info.is_buffer, false); } const Sampler* ShaderIR::GetBindlessSampler(Tegra::Shader::Register reg, @@ -417,7 +417,7 @@ const Sampler* ShaderIR::GetBindlessSampler(Tegra::Shader::Register reg, // Otherwise create a new mapping for this sampler const auto next_index = static_cast<u32>(used_samplers.size()); return &used_samplers.emplace_back(next_index, offset, buffer, info.type, info.is_array, - info.is_shadow, info.is_buffer); + info.is_shadow, info.is_buffer, false); } else if (const auto array_sampler_info = std::get_if<ArraySamplerNode>(&*tracked_sampler_info)) { const u32 base_offset = array_sampler_info->GetBaseOffset() / 4; @@ -430,14 +430,15 @@ const Sampler* ShaderIR::GetBindlessSampler(Tegra::Shader::Register reg, if (it != used_samplers.end()) { ASSERT(!it->IsBindless() && it->GetType() == info.type && it->IsArray() == info.is_array && it->IsShadow() == info.is_shadow && - it->IsBuffer() == info.is_buffer); + it->IsBuffer() == info.is_buffer && it->IsIndexed()); return &*it; } + uses_indexed_samplers = true; // Otherwise create a new mapping for this sampler const auto next_index = static_cast<u32>(used_samplers.size()); return &used_samplers.emplace_back(next_index, base_offset, info.type, info.is_array, - info.is_shadow, info.is_buffer); + info.is_shadow, info.is_buffer, true); } return nullptr; } |