diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-18 23:00:00 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-02-13 06:17:24 +0100 |
commit | 3da87d3f12d39b9a52625fa9e5e0c5defc0ac440 (patch) | |
tree | e7aba23cfda1ab2402c1d35f4c45d6b799523189 /src/video_core/renderer_opengl/gl_buffer_cache.h | |
parent | buffer_cache: Heuristically detect stream buffers (diff) | |
download | yuzu-3da87d3f12d39b9a52625fa9e5e0c5defc0ac440.tar yuzu-3da87d3f12d39b9a52625fa9e5e0c5defc0ac440.tar.gz yuzu-3da87d3f12d39b9a52625fa9e5e0c5defc0ac440.tar.bz2 yuzu-3da87d3f12d39b9a52625fa9e5e0c5defc0ac440.tar.lz yuzu-3da87d3f12d39b9a52625fa9e5e0c5defc0ac440.tar.xz yuzu-3da87d3f12d39b9a52625fa9e5e0c5defc0ac440.tar.zst yuzu-3da87d3f12d39b9a52625fa9e5e0c5defc0ac440.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_buffer_cache.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.h b/src/video_core/renderer_opengl/gl_buffer_cache.h index f4d8871a9..35c9deb51 100644 --- a/src/video_core/renderer_opengl/gl_buffer_cache.h +++ b/src/video_core/renderer_opengl/gl_buffer_cache.h @@ -39,8 +39,6 @@ public: void MakeResident(GLenum access) noexcept; - [[nodiscard]] GLuint SubBuffer(u32 offset); - [[nodiscard]] GLuint64EXT HostGpuAddr() const noexcept { return address; } @@ -50,13 +48,9 @@ public: } private: - void CreateMemoryObjects(BufferCacheRuntime& runtime); - GLuint64EXT address = 0; - Vulkan::MemoryCommit memory_commit; OGLBuffer buffer; GLenum current_residency_access = GL_NONE; - std::vector<std::pair<OGLBuffer, u32>> subs; }; class BufferCacheRuntime { @@ -127,7 +121,7 @@ public: } [[nodiscard]] bool HasFastBufferSubData() const noexcept { - return device.HasFastBufferSubData(); + return has_fast_buffer_sub_data; } private: @@ -140,16 +134,22 @@ private: const Device& device; const Vulkan::Device* vulkan_device; Vulkan::MemoryAllocator* vulkan_memory_allocator; - std::optional<StreamBuffer> stream_buffer; - - u32 max_attributes = 0; + bool has_fast_buffer_sub_data = false; bool use_assembly_shaders = false; bool has_unified_vertex_buffers = false; + u32 max_attributes = 0; + + std::optional<StreamBuffer> stream_buffer; + std::array<std::array<OGLBuffer, VideoCommon::NUM_GRAPHICS_UNIFORM_BUFFERS>, VideoCommon::NUM_STAGES> fast_uniforms; + std::array<std::array<OGLBuffer, VideoCommon::NUM_GRAPHICS_UNIFORM_BUFFERS>, + VideoCommon::NUM_STAGES> + copy_uniforms; + std::array<OGLBuffer, VideoCommon::NUM_COMPUTE_UNIFORM_BUFFERS> copy_compute_uniforms; u32 index_buffer_offset = 0; }; |