mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-18 15:27:53 +00:00
video_core: Implement API agnostic view based texture cache
Implements an API agnostic texture view based texture cache. Classes defined here are intended to be inherited by the API implementation and used in API-specific code. This implementation exposes protected virtual functions to be called from the implementer. Before executing any surface copies methods (defined in API-specific code) it tries to detect if the overlapping surface is a superset and if it is, it creates a view. Views are references of a subset of a surface, it can be a superset view (the same as referencing the whole texture). Current code manages 1D, 1D array, 2D, 2D array, cube maps and cube map arrays with layer and mipmap level views. Texture 3D slices views are not implemented. If the view attempt fails, the fast path is invoked with the overlapping textures (defined in the implementer). If that one fails (returning nullptr) it will flush and reload the texture.
This commit is contained in:
parent
57835877df
commit
04bc917f62
3 changed files with 974 additions and 0 deletions
|
@ -106,6 +106,8 @@ add_library(video_core STATIC
|
|||
textures/decoders.cpp
|
||||
textures/decoders.h
|
||||
textures/texture.h
|
||||
texture_cache.cpp
|
||||
texture_cache.h
|
||||
video_core.cpp
|
||||
video_core.h
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue