summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_cache.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-02-19 02:58:32 +0100
committerbunnei <bunneidev@gmail.com>2019-03-15 03:34:42 +0100
commit2eaf6c41a4686028c0abc84d1be6fd48a67cf49f (patch)
tree6ad0848c848aea68e637386cad5068e13c831b92 /src/video_core/renderer_opengl/gl_shader_cache.h
parentMerge pull request #2233 from ReinUsesLisp/morton-cleanup (diff)
downloadyuzu-2eaf6c41a4686028c0abc84d1be6fd48a67cf49f.tar
yuzu-2eaf6c41a4686028c0abc84d1be6fd48a67cf49f.tar.gz
yuzu-2eaf6c41a4686028c0abc84d1be6fd48a67cf49f.tar.bz2
yuzu-2eaf6c41a4686028c0abc84d1be6fd48a67cf49f.tar.lz
yuzu-2eaf6c41a4686028c0abc84d1be6fd48a67cf49f.tar.xz
yuzu-2eaf6c41a4686028c0abc84d1be6fd48a67cf49f.tar.zst
yuzu-2eaf6c41a4686028c0abc84d1be6fd48a67cf49f.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_cache.h')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.h b/src/video_core/renderer_opengl/gl_shader_cache.h
index 97eed192f..81fe716b4 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.h
+++ b/src/video_core/renderer_opengl/gl_shader_cache.h
@@ -39,18 +39,18 @@ using PrecompiledShaders = std::unordered_map<u64, GLShader::ProgramResult>;
class CachedShader final : public RasterizerCacheObject {
public:
- explicit CachedShader(VAddr addr, u64 unique_identifier, Maxwell::ShaderProgram program_type,
- ShaderDiskCacheOpenGL& disk_cache,
+ explicit CachedShader(VAddr guest_addr, u64 unique_identifier,
+ Maxwell::ShaderProgram program_type, ShaderDiskCacheOpenGL& disk_cache,
const PrecompiledPrograms& precompiled_programs,
- ProgramCode&& program_code, ProgramCode&& program_code_b);
+ ProgramCode&& program_code, ProgramCode&& program_code_b, u8* host_ptr);
- explicit CachedShader(VAddr addr, u64 unique_identifier, Maxwell::ShaderProgram program_type,
- ShaderDiskCacheOpenGL& disk_cache,
+ explicit CachedShader(VAddr guest_addr, u64 unique_identifier,
+ Maxwell::ShaderProgram program_type, ShaderDiskCacheOpenGL& disk_cache,
const PrecompiledPrograms& precompiled_programs,
- GLShader::ProgramResult result);
+ GLShader::ProgramResult result, u8* host_ptr);
- VAddr GetAddr() const override {
- return addr;
+ VAddr GetCpuAddr() const override {
+ return guest_addr;
}
std::size_t GetSizeInBytes() const override {
@@ -91,7 +91,8 @@ private:
ShaderDiskCacheUsage GetUsage(GLenum primitive_mode, BaseBindings base_bindings) const;
- VAddr addr{};
+ u8* host_ptr{};
+ VAddr guest_addr{};
u64 unique_identifier{};
Maxwell::ShaderProgram program_type{};
ShaderDiskCacheOpenGL& disk_cache;