diff options
author | bunnei <bunneidev@gmail.com> | 2019-03-22 23:41:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-22 23:41:12 +0100 |
commit | e5893db3e618fd276733a24eebc0606c5fd1e7f2 (patch) | |
tree | 5a3ae98bb04d3fb3f513a51504b63940e70c5130 /src/video_core/renderer_opengl/gl_rasterizer_cache.h | |
parent | Merge pull request #2277 from bunnei/fix-smo-transitions (diff) | |
parent | memory_manager: Cleanup FindFreeRegion. (diff) | |
download | yuzu-e5893db3e618fd276733a24eebc0606c5fd1e7f2.tar yuzu-e5893db3e618fd276733a24eebc0606c5fd1e7f2.tar.gz yuzu-e5893db3e618fd276733a24eebc0606c5fd1e7f2.tar.bz2 yuzu-e5893db3e618fd276733a24eebc0606c5fd1e7f2.tar.lz yuzu-e5893db3e618fd276733a24eebc0606c5fd1e7f2.tar.xz yuzu-e5893db3e618fd276733a24eebc0606c5fd1e7f2.tar.zst yuzu-e5893db3e618fd276733a24eebc0606c5fd1e7f2.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer_cache.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index c919dd29b..c644271d0 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -109,6 +109,11 @@ struct SurfaceParams { return size; } + /// Returns true if the parameters constitute a valid rasterizer surface. + bool IsValid() const { + return gpu_addr && host_ptr && height && width; + } + /// Returns the exact size of the memory occupied by a layer in a texture in VRAM, including /// mipmaps. std::size_t LayerMemorySize() const { @@ -210,7 +215,7 @@ struct SurfaceParams { /// Creates SurfaceParams for a depth buffer configuration static SurfaceParams CreateForDepthBuffer( - u32 zeta_width, u32 zeta_height, Tegra::GPUVAddr zeta_address, Tegra::DepthFormat format, + u32 zeta_width, u32 zeta_height, GPUVAddr zeta_address, Tegra::DepthFormat format, u32 block_width, u32 block_height, u32 block_depth, Tegra::Engines::Maxwell3D::Regs::InvMemoryLayout type); @@ -232,7 +237,7 @@ struct SurfaceParams { } /// Initializes parameters for caching, should be called after everything has been initialized - void InitCacheParameters(Tegra::GPUVAddr gpu_addr); + void InitCacheParameters(GPUVAddr gpu_addr); std::string TargetName() const { switch (target) { @@ -297,7 +302,7 @@ struct SurfaceParams { bool srgb_conversion; // Parameters used for caching u8* host_ptr; - Tegra::GPUVAddr gpu_addr; + GPUVAddr gpu_addr; std::size_t size_in_bytes; std::size_t size_in_bytes_gl; |