summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/shader_ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/shader/shader_ir.h')
-rw-r--r--src/video_core/shader/shader_ir.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h
index 26c8fde22..2f71a50d2 100644
--- a/src/video_core/shader/shader_ir.h
+++ b/src/video_core/shader/shader_ir.h
@@ -49,7 +49,7 @@ public:
}
u32 GetSize() const {
- return max_offset + sizeof(float);
+ return max_offset + static_cast<u32>(sizeof(float));
}
u32 GetMaxOffset() const {
@@ -165,8 +165,8 @@ public:
return program_manager.GetVariables();
}
- u32 ConvertAddressToNvidiaSpace(const u32 address) const {
- return (address - main_offset) * sizeof(Tegra::Shader::Instruction);
+ u32 ConvertAddressToNvidiaSpace(u32 address) const {
+ return (address - main_offset) * static_cast<u32>(sizeof(Tegra::Shader::Instruction));
}
/// Returns a condition code evaluated from internal flags
@@ -179,6 +179,7 @@ private:
Tegra::Shader::TextureType type;
bool is_array;
bool is_shadow;
+ bool is_buffer;
};
void Decode();
@@ -303,13 +304,17 @@ private:
/// Returns a predicate combiner operation
OperationCode GetPredicateCombiner(Tegra::Shader::PredOperation operation);
+ /// Queries the missing sampler info from the execution context.
+ SamplerInfo GetSamplerInfo(std::optional<SamplerInfo> sampler_info, u32 offset,
+ std::optional<u32> buffer = std::nullopt);
+
/// Accesses a texture sampler
const Sampler& GetSampler(const Tegra::Shader::Sampler& sampler,
- std::optional<SamplerInfo> sampler_info);
+ std::optional<SamplerInfo> sampler_info = std::nullopt);
- // Accesses a texture sampler for a bindless texture.
- const Sampler& GetBindlessSampler(const Tegra::Shader::Register& reg,
- std::optional<SamplerInfo> sampler_info);
+ /// Accesses a texture sampler for a bindless texture.
+ const Sampler& GetBindlessSampler(Tegra::Shader::Register reg,
+ std::optional<SamplerInfo> sampler_info = std::nullopt);
/// Accesses an image.
Image& GetImage(Tegra::Shader::Image image, Tegra::Shader::ImageType type);