summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/decode.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-05-02 06:45:41 +0200
committerGitHub <noreply@github.com>2020-05-02 06:45:41 +0200
commite6b4311178b4f87b67eb2383f2a64520c2a8dd25 (patch)
tree066f25773f9db49747f26ddf94b23a5007502ff8 /src/video_core/shader/decode.cpp
parentMerge pull request #3859 from jbeich/clang (diff)
parentshader/texture: Support multiple unknown sampler properties (diff)
downloadyuzu-e6b4311178b4f87b67eb2383f2a64520c2a8dd25.tar
yuzu-e6b4311178b4f87b67eb2383f2a64520c2a8dd25.tar.gz
yuzu-e6b4311178b4f87b67eb2383f2a64520c2a8dd25.tar.bz2
yuzu-e6b4311178b4f87b67eb2383f2a64520c2a8dd25.tar.lz
yuzu-e6b4311178b4f87b67eb2383f2a64520c2a8dd25.tar.xz
yuzu-e6b4311178b4f87b67eb2383f2a64520c2a8dd25.tar.zst
yuzu-e6b4311178b4f87b67eb2383f2a64520c2a8dd25.zip
Diffstat (limited to 'src/video_core/shader/decode.cpp')
-rw-r--r--src/video_core/shader/decode.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp
index 1167ff4ec..a75a5cc63 100644
--- a/src/video_core/shader/decode.cpp
+++ b/src/video_core/shader/decode.cpp
@@ -32,11 +32,11 @@ void DeduceTextureHandlerSize(VideoCore::GuestDriverProfile& gpu_driver,
u32 count{};
std::vector<u32> bound_offsets;
for (const auto& sampler : used_samplers) {
- if (sampler.IsBindless()) {
+ if (sampler.is_bindless) {
continue;
}
++count;
- bound_offsets.emplace_back(sampler.GetOffset());
+ bound_offsets.emplace_back(sampler.offset);
}
if (count > 1) {
gpu_driver.DeduceTextureHandlerSize(std::move(bound_offsets));
@@ -46,14 +46,14 @@ void DeduceTextureHandlerSize(VideoCore::GuestDriverProfile& gpu_driver,
std::optional<u32> TryDeduceSamplerSize(const Sampler& sampler_to_deduce,
VideoCore::GuestDriverProfile& gpu_driver,
const std::list<Sampler>& used_samplers) {
- const u32 base_offset = sampler_to_deduce.GetOffset();
+ const u32 base_offset = sampler_to_deduce.offset;
u32 max_offset{std::numeric_limits<u32>::max()};
for (const auto& sampler : used_samplers) {
- if (sampler.IsBindless()) {
+ if (sampler.is_bindless) {
continue;
}
- if (sampler.GetOffset() > base_offset) {
- max_offset = std::min(sampler.GetOffset(), max_offset);
+ if (sampler.offset > base_offset) {
+ max_offset = std::min(sampler.offset, max_offset);
}
}
if (max_offset == std::numeric_limits<u32>::max()) {
@@ -353,14 +353,14 @@ void ShaderIR::PostDecode() {
return;
}
for (auto& sampler : used_samplers) {
- if (!sampler.IsIndexed()) {
+ if (!sampler.is_indexed) {
continue;
}
if (const auto size = TryDeduceSamplerSize(sampler, gpu_driver, used_samplers)) {
- sampler.SetSize(*size);
+ sampler.size = *size;
} else {
LOG_CRITICAL(HW_GPU, "Failed to deduce size of indexed sampler");
- sampler.SetSize(1);
+ sampler.size = 1;
}
}
}