diff options
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_gen.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_gen.h | 14 |
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 { |