summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_gen.h
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2018-09-19 07:18:20 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2018-10-06 17:27:54 +0200
commit752faff2bcfa536a9efc81416156b1d42d05a2cc (patch)
treec048696cd6e5a7798ef5985662d30d197a8d90e1 /src/video_core/renderer_opengl/gl_shader_gen.h
parentImplemented Texture Processing Modes in TEXS and TLDS (diff)
downloadyuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.tar
yuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.tar.gz
yuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.tar.bz2
yuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.tar.lz
yuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.tar.xz
yuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.tar.zst
yuzu-752faff2bcfa536a9efc81416156b1d42d05a2cc.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_gen.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.h b/src/video_core/renderer_opengl/gl_shader_gen.h
index d53b93ad5..e56f39e78 100644
--- a/src/video_core/renderer_opengl/gl_shader_gen.h
+++ b/src/video_core/renderer_opengl/gl_shader_gen.h
@@ -75,8 +75,9 @@ class SamplerEntry {
public:
SamplerEntry(Maxwell::ShaderStage stage, std::size_t offset, std::size_t index,
- Tegra::Shader::TextureType type, bool is_array)
- : offset(offset), stage(stage), sampler_index(index), type(type), is_array(is_array) {}
+ Tegra::Shader::TextureType type, bool is_array, bool is_shadow)
+ : offset(offset), stage(stage), sampler_index(index), type(type), is_array(is_array),
+ is_shadow(is_shadow) {}
std::size_t GetOffset() const {
return offset;
@@ -117,6 +118,8 @@ public:
}
if (is_array)
glsl_type += "Array";
+ if (is_shadow)
+ glsl_type += "Shadow";
return glsl_type;
}
@@ -128,6 +131,10 @@ public:
return is_array;
}
+ bool IsShadow() const {
+ return is_shadow;
+ }
+
u32 GetHash() const {
return (static_cast<u32>(stage) << 16) | static_cast<u32>(sampler_index);
}
@@ -147,7 +154,8 @@ private:
Maxwell::ShaderStage stage; ///< Shader stage where this sampler was used.
std::size_t sampler_index; ///< Value used to index into the generated GLSL sampler array.
Tegra::Shader::TextureType type; ///< The type used to sample this texture (Texture2D, etc)
- bool is_array; ///< Whether the texture is being sampled as an array texture or not.
+ bool is_array; ///< Whether the texture is being sampled as an array texture or not.
+ bool is_shadow; ///< Whether the texture is being sampled as a depth texture or not.
};
struct ShaderEntries {