From 32c1bc6a67820f9df21c8f64f4df078b015aa7da Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Wed, 6 Nov 2019 04:32:43 -0300 Subject: shader/texture: Deduce texture buffers from locker Instead of specializing shaders to separate texture buffers from 1D textures, use the locker to deduce them while they are being decoded. --- src/video_core/renderer_opengl/gl_shader_disk_cache.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/video_core/renderer_opengl/gl_shader_disk_cache.h') diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.h b/src/video_core/renderer_opengl/gl_shader_disk_cache.h index db23ada93..55311dc6d 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.h @@ -4,7 +4,6 @@ #pragma once -#include #include #include #include @@ -37,7 +36,6 @@ struct ShaderDiskCacheDump; using ProgramCode = std::vector; using ShaderDumpsMap = std::unordered_map; -using TextureBufferUsage = std::bitset<64>; /// Allocated bindings used by an OpenGL shader program struct BaseBindings { @@ -61,11 +59,10 @@ static_assert(std::is_trivially_copyable_v); struct ProgramVariant { BaseBindings base_bindings; GLenum primitive_mode{}; - TextureBufferUsage texture_buffer_usage{}; bool operator==(const ProgramVariant& rhs) const { - return std::tie(base_bindings, primitive_mode, texture_buffer_usage) == - std::tie(rhs.base_bindings, rhs.primitive_mode, rhs.texture_buffer_usage); + return std::tie(base_bindings, primitive_mode) == + std::tie(rhs.base_bindings, rhs.primitive_mode); } bool operator!=(const ProgramVariant& rhs) const { @@ -112,7 +109,6 @@ template <> struct hash { std::size_t operator()(const OpenGL::ProgramVariant& variant) const noexcept { return std::hash()(variant.base_bindings) ^ - std::hash()(variant.texture_buffer_usage) ^ (static_cast(variant.primitive_mode) << 6); } }; -- cgit v1.2.3