Fernando Sahmkow
53ef935c5f
texture_cache: Correct copying between compressed and uncompressed formats
2019-06-20 21:38:33 -03:00
Fernando Sahmkow
34dff4c9bc
texture_cache: Only load on recycle with accurate GPU.
...
Testing so far has proven this to be quite safe as texture memory read
added a 2-5ms load to the current cache.
2019-06-20 21:38:33 -03:00
Fernando Sahmkow
14741d6113
Fix rebase errors
2019-06-20 21:38:33 -03:00
Fernando Sahmkow
731371c1b9
texture_cache: Handle uncontinuous surfaces.
2019-06-20 21:38:33 -03:00
Fernando Sahmkow
a5e50d06a0
texture_cache: return null surface on invalid address
2019-06-20 21:38:33 -03:00
Fernando Sahmkow
164cceaa2f
texture_cache: Add checks for texture buffers.
2019-06-20 21:38:33 -03:00
Fernando Sahmkow
367c709367
texture_cache: Fermi2D reform and implement View Mirage
...
This also does some fixes on compressed textures reinterpret and on the
Fermi2D engine in general.
2019-06-20 21:38:33 -03:00
ReinUsesLisp
733553ad40
gl_shader_decompiler: Implement image binding settings
2019-06-20 21:38:33 -03:00
ReinUsesLisp
c98832105a
shader: Implement bindless images
2019-06-20 21:38:33 -03:00
ReinUsesLisp
6788a49ac5
shader: Decode SUST and implement backing image functionality
2019-06-20 21:38:33 -03:00
ReinUsesLisp
af8c8e61f6
gl_rasterizer: Track texture buffer usage
2019-06-20 21:38:33 -03:00
ReinUsesLisp
bdffcf8326
video_core: Make ARB_buffer_storage a required extension
2019-06-20 21:36:12 -03:00
ReinUsesLisp
ee8a7b7b12
gl_rasterizer_cache: Use texture buffers to emulate texture buffers
2019-06-20 21:36:12 -03:00
ReinUsesLisp
86b444c020
maxwell_3d: Partially implement texture buffers as 1D textures
2019-06-20 21:36:12 -03:00
ReinUsesLisp
1c558b0e10
gl_shader_decompiler: Allow 1D textures to be texture buffers
2019-06-20 21:36:12 -03:00
ReinUsesLisp
d8d988dc9d
shader: Implement texture buffers
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
ec163a77da
texture_cache: loose TryReconstructSurface when accurate GPU is not on.
...
Also corrects some asserts.
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
1007f11f59
texture_cache: Document the most important methods.
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
a26869f770
texture_cache: Try to Reconstruct Surface on bigger than overlap.
...
This fixes clouds in SMO Cap Kingdom and lens on Cloud Kingdom.
Also moved accurate_gpu setting check to Pick Strategy
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
119ff5e3e3
texture_cache: Implement Guard mechanism
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
7738bf1c71
texture_cache: General Fixes
...
Fixed ASTC mipmaps loading
Fixed alignment on openGL upload/download
Fixed Block Height Calculation
Removed unalign_height
2019-06-20 21:36:12 -03:00
ReinUsesLisp
6a33b75653
surface_params: Ensure pitch is always written to avoid surface leaks
2019-06-20 21:36:12 -03:00
ReinUsesLisp
fd5689cebb
gl_framebuffer_cache: Use a hashed struct to cache framebuffers
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
1c89caf07d
texture_cache return invalid buffer on deactivated color_mask
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
a725ea9172
engine_upload: Addapt to new Texture Cache
2019-06-20 21:36:12 -03:00
ReinUsesLisp
139f480f0c
surface_params: Optimize CreateForTexture
...
Instead of using Common::AlignUp, use Common::AlignBits to align the
texture compression factor.
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
b83b4591f4
gl_texture_cache: Make main views be proxy textures instead of a full view.
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
e018035ab8
texture_cache: Add ASync Protections
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
2dba5f3a16
Remove Framebuffer reconfiguration and restrict rendertarget protection
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
210cd9f3f6
texture_cache: Implement GPU Dirty Flags
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
5fd215869f
texture_cache: Optimize GetMipBlockHeight and GetMipBlockDepth
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
d69931c30f
texture_cache: Implement L1_Inner_cache
2019-06-20 21:36:12 -03:00
ReinUsesLisp
20b0916f0a
video_core: Use un-shifted block sizes to avoid integer divisions
...
Instead of storing all block width, height and depths in their shifted
form:
block_width = 1U << block_shift;
Store them like they are provided by the emulated hardware (their
block_shift form). This way we can avoid doing the costly
Common::AlignUp operation to align texture sizes and drop CPU integer
divisions with bitwise logic (defined in Common::AlignBits).
2019-06-20 21:36:12 -03:00
ReinUsesLisp
bb53d144ec
texture_cache: Change internal cache from lists to vectors
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
fe0259c6b9
Reduce amount of size calculations.
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
830ff8a985
texture_cache: Correct premature texceptions
...
Due to our current infrastructure, it is possible for a mipmap to be set
on as a render target before a texception of that mipmap's superset be
set afterwards. This is problematic as we rely on texture views to set
up texceptions and protecting render targets targets for 3D texture
rendering.
One simple solution is to configure framebuffers after texture setup but
this brings other problems. This solution, forces a reconfiguration of
the framebuffers after such event happens.
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
0688a6a904
texture_cache: Implement guest flushing
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
0d0cbc1a4c
Fixes to mipmap's process and reconstruct process
2019-06-20 21:36:12 -03:00
ReinUsesLisp
a8dd825648
surface_base: Add parenthesis to EmplaceOverview's predicate
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
4a45fde9ce
Texture Cache: Implement Blitting and Fermi Copies
2019-06-20 21:36:12 -03:00
ReinUsesLisp
dd2cb6eb72
surface_view: Add constructor for ViewParams
2019-06-20 21:36:12 -03:00
ReinUsesLisp
499c58fded
surface_base: Split BreakDown into layered and non-layered variants
2019-06-20 21:36:12 -03:00
ReinUsesLisp
e08ae64b94
surface_base: Silence truncation warnings and minor renames and reordering
2019-06-20 21:36:12 -03:00
ReinUsesLisp
38fe4aec5c
copy_params: Use constructor instead of C-like initialization
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
8bec2b9d95
Correct Mipmaps View method in Texture Cache
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
7de28451ca
Change texture_cache chaching from GPUAddr to CacheAddr
...
This also reverses the changes to make invalidation and flushing through
the GPU address.
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
1e50fed257
Corrections to Structural Matching
...
The texture will now be reconstructed if the width only matches on GoB
alignment.
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
b6863a26bd
Implement Texture Cache V2
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
3adcd6cc60
Correct Surface Base and Views for new Texture Cache
2019-06-20 21:36:12 -03:00
Fernando Sahmkow
8d338ca4b0
Add OGLTextureView
2019-06-20 21:36:12 -03:00