diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-06-08 01:43:00 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:35 +0200 |
commit | 7eaa74ad235b669608debaf3583af94bd675b6c6 (patch) | |
tree | 5511c08d77455901f7d69c8b36caec54ed95a930 /src/video_core/renderer_opengl/gl_texture_cache.h | |
parent | gl_shader_util: Move shader utility code to a separate file (diff) | |
download | yuzu-7eaa74ad235b669608debaf3583af94bd675b6c6.tar yuzu-7eaa74ad235b669608debaf3583af94bd675b6c6.tar.gz yuzu-7eaa74ad235b669608debaf3583af94bd675b6c6.tar.bz2 yuzu-7eaa74ad235b669608debaf3583af94bd675b6c6.tar.lz yuzu-7eaa74ad235b669608debaf3583af94bd675b6c6.tar.xz yuzu-7eaa74ad235b669608debaf3583af94bd675b6c6.tar.zst yuzu-7eaa74ad235b669608debaf3583af94bd675b6c6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h index 2e3e02b79..921072ebe 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.h +++ b/src/video_core/renderer_opengl/gl_texture_cache.h @@ -185,6 +185,9 @@ public: const VideoCommon::ImageViewInfo& view_info); explicit ImageView(TextureCacheRuntime&, const VideoCommon::NullImageParams&); + [[nodiscard]] GLuint StorageView(Shader::TextureType texture_type, + Shader::ImageFormat image_format); + [[nodiscard]] GLuint Handle(Shader::TextureType handle_type) const noexcept { return views[static_cast<size_t>(handle_type)]; } @@ -206,16 +209,29 @@ public: } private: - void SetupView(const Device& device, Image& image, Shader::TextureType view_type, GLuint handle, - const VideoCommon::ImageViewInfo& info, - VideoCommon::SubresourceRange view_range); + struct StorageViews { + std::array<GLuint, Shader::NUM_TEXTURE_TYPES> signeds{}; + std::array<GLuint, Shader::NUM_TEXTURE_TYPES> unsigneds{}; + }; + + void SetupView(Shader::TextureType view_type); + + GLuint MakeView(Shader::TextureType view_type, GLenum view_format); std::array<GLuint, Shader::NUM_TEXTURE_TYPES> views{}; std::vector<OGLTextureView> stored_views; + std::unique_ptr<StorageViews> storage_views; GLenum internal_format = GL_NONE; GLuint default_handle = 0; GPUVAddr gpu_addr = 0; u32 buffer_size = 0; + GLuint original_texture = 0; + int num_samples = 0; + VideoCommon::SubresourceRange flat_range; + VideoCommon::SubresourceRange full_range; + std::array<u8, 4> swizzle{}; + bool set_object_label = false; + bool is_render_target = false; }; class ImageAlloc : public VideoCommon::ImageAllocBase {}; |