diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-09-25 09:53:18 -0400 |
|---|---|---|
| committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-10-25 09:01:30 -0400 |
| commit | 33fcec3502f5dd5a99b7a8337128b7c99bfba908 (patch) | |
| tree | 4f41d09678600fc3e12708f8a4f8ae2f05c37ad1 /src/video_core/shader/shader_ir.h | |
| parent | 8909f52166bf9c27d52b5a722efbd46d1a11e876 (diff) | |
Shader_IR: allow lookup of texture samplers within the shader_ir for instructions that don't provide it
Diffstat (limited to 'src/video_core/shader/shader_ir.h')
| -rw-r--r-- | src/video_core/shader/shader_ir.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h index e3b568d3e..3a3e381d2 100644 --- a/src/video_core/shader/shader_ir.h +++ b/src/video_core/shader/shader_ir.h @@ -173,6 +173,13 @@ public: private: friend class ASTDecoder; + + struct SamplerInfo { + Tegra::Shader::TextureType type; + bool is_array; + bool is_shadow; + }; + void Decode(); NodeBlock DecodeRange(u32 begin, u32 end); @@ -297,12 +304,11 @@ private: /// Accesses a texture sampler const Sampler& GetSampler(const Tegra::Shader::Sampler& sampler, - Tegra::Shader::TextureType type, bool is_array, bool is_shadow); + std::optional<SamplerInfo> sampler_info); // Accesses a texture sampler for a bindless texture. const Sampler& GetBindlessSampler(const Tegra::Shader::Register& reg, - Tegra::Shader::TextureType type, bool is_array, - bool is_shadow); + std::optional<SamplerInfo> sampler_info); /// Accesses an image. Image& GetImage(Tegra::Shader::Image image, Tegra::Shader::ImageType type); |
