diff options
author | bunnei <bunneidev@gmail.com> | 2019-04-18 03:45:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-18 03:45:56 +0200 |
commit | 4294062516c91c8fdabbcb5b5bcde641c03c9218 (patch) | |
tree | 8420493647f54dbab66b3b654115e8c509f536d6 /src/video_core/renderer_opengl/gl_rasterizer.h | |
parent | Merge pull request #2348 from FernandoS27/guest-bindless (diff) | |
parent | gl_sampler_cache: Port sampler cache to OpenGL (diff) | |
download | yuzu-4294062516c91c8fdabbcb5b5bcde641c03c9218.tar yuzu-4294062516c91c8fdabbcb5b5bcde641c03c9218.tar.gz yuzu-4294062516c91c8fdabbcb5b5bcde641c03c9218.tar.bz2 yuzu-4294062516c91c8fdabbcb5b5bcde641c03c9218.tar.lz yuzu-4294062516c91c8fdabbcb5b5bcde641c03c9218.tar.xz yuzu-4294062516c91c8fdabbcb5b5bcde641c03c9218.tar.zst yuzu-4294062516c91c8fdabbcb5b5bcde641c03c9218.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.h | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index d4c2cf80e..a0e056142 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h @@ -25,6 +25,7 @@ #include "video_core/renderer_opengl/gl_primitive_assembler.h" #include "video_core/renderer_opengl/gl_rasterizer_cache.h" #include "video_core/renderer_opengl/gl_resource_manager.h" +#include "video_core/renderer_opengl/gl_sampler_cache.h" #include "video_core/renderer_opengl/gl_shader_cache.h" #include "video_core/renderer_opengl/gl_shader_manager.h" #include "video_core/renderer_opengl/gl_state.h" @@ -72,34 +73,6 @@ public: "The maximum size of a constbuffer must be a multiple of the size of GLvec4"); private: - class SamplerInfo { - public: - OGLSampler sampler; - - /// Creates the sampler object, initializing its state so that it's in sync with the - /// SamplerInfo struct. - void Create(); - /// Syncs the sampler object with the config, updating any necessary state. - void SyncWithConfig(const Tegra::Texture::TSCEntry& info); - - private: - Tegra::Texture::TextureFilter mag_filter = Tegra::Texture::TextureFilter::Nearest; - Tegra::Texture::TextureFilter min_filter = Tegra::Texture::TextureFilter::Nearest; - Tegra::Texture::TextureMipmapFilter mipmap_filter = - Tegra::Texture::TextureMipmapFilter::None; - Tegra::Texture::WrapMode wrap_u = Tegra::Texture::WrapMode::ClampToEdge; - Tegra::Texture::WrapMode wrap_v = Tegra::Texture::WrapMode::ClampToEdge; - Tegra::Texture::WrapMode wrap_p = Tegra::Texture::WrapMode::ClampToEdge; - bool use_depth_compare = false; - Tegra::Texture::DepthCompareFunc depth_compare_func = - Tegra::Texture::DepthCompareFunc::Always; - GLvec4 border_color = {}; - float min_lod = 0.0f; - float max_lod = 16.0f; - float lod_bias = 0.0f; - float max_anisotropic = 1.0f; - }; - struct FramebufferConfigState { bool using_color_fb{}; bool using_depth_fb{}; @@ -204,6 +177,7 @@ private: RasterizerCacheOpenGL res_cache; ShaderCacheOpenGL shader_cache; GlobalRegionCacheOpenGL global_cache; + SamplerCacheOpenGL sampler_cache; Core::System& system; @@ -219,8 +193,6 @@ private: FramebufferConfigState current_framebuffer_config_state; std::pair<bool, bool> current_depth_stencil_usage{}; - std::array<SamplerInfo, Tegra::Engines::Maxwell3D::Regs::NumTextureSamplers> texture_samplers; - static constexpr std::size_t STREAM_BUFFER_SIZE = 128 * 1024 * 1024; OGLBufferCache buffer_cache; PrimitiveAssembler primitive_assembler{buffer_cache}; |