Commit graph

55 commits

Author SHA1 Message Date
kd-11
d577cebd89 gl: Refactor image and command-context handling
- Move texture object code out of the monolithic header
- All texture binds go through the shared state
- Transient texture binds use a dedicated temp image slot shared with native UI
2022-06-04 14:02:33 +03:00
kd-11
60a2a39e88 gl: Deswizzle textures on the GPU 2022-05-31 23:34:14 +03:00
kd-11
55e68441cb gl: Commit to bindless framebuffer object management 2022-05-31 23:34:14 +03:00
kd-11
74696d2e44 gl: Commit to a consistent global state 2022-05-31 23:34:14 +03:00
kd-11
94a3b1cfe8 rsx: Roll back some optimizations
- Just use RGB565 for all blit targets. Avoids really dumb transforms done by GPU hw.
- When X16 is used, all the channels get written to R channel alone. CmdBlit does perform format conversion!
- gl: Force image copy when blit is requested with compatible targets. Avoids format conversion issues.
2021-11-24 16:02:24 +03:00
Megamouse
a50be7a912 GL: resharper findings (too lazy for const functions) 2021-04-30 08:23:16 +02:00
Nekotekina
87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
Nekotekina
a8e0d261b7 types.hpp: more cleanup
Also fix compilation.
2020-12-22 19:08:09 +03:00
Nekotekina
fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +03:00
Nekotekina
36c8654fb8 Remove HERE macro
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
Nekotekina
e055d16b2c Replace verify() with ensure() with auto src location.
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
RipleyTom
af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
kd-11
7553429130 gl: Thread shader source compilation dispatch
- glCompileShader is in itself much slower than anticipated
2020-11-21 20:43:15 +03:00
kd-11
3ddfa288cf rsx: Use multithreaded shader compiler backend 2020-11-21 20:43:15 +03:00
Nekotekina
71f1021648 Fix thread pool entry point and get_cycles()
Fix possible race between thread handle availability.
Don't treat zero thread as invalid one.
Now entry point is full is assembly.
Attempt to fix #9282
Also fix some TLS.
2020-11-21 17:18:42 +03:00
kd-11
dc465df3bc rsx: Enable support for extended range in depth buffer
- Software clipping emulation is used here as OpenGL does not have explicit clip control.
- Hardware clip control for vulkan to be enabled after this.
2020-09-08 15:33:08 +03:00
kd-11
a5ac5a9861 rsx: Separate uint depth formats from float depth formats 2020-08-27 12:52:28 +03:00
AniLeo
3ad12cf5f8 gl: Avoid issuing glDelete calls with m_id == GL_NONE
Applies GL_NONE macro usage where it makes sense
2020-05-16 08:29:00 +01:00
AniLeo
308cdfac35 gl: Rewrite Debug Output
Remove Windows restriction, enable Debug Output for every supported OS
Filter our severity by Khronos severity
Handle and log source and type enums
2020-05-16 08:29:00 +01:00
Eladash
504ba8d824 rsx: Fix grammer issue (binded -> bound) 2020-04-11 21:21:15 +03:00
kd-11
b301fecfd8 gl: Fix async shader compiler
- Removes glFinish hack.
- Adds proper server-side synchronization.
- Adds primary context detection to allow worker threads to be identified.
2020-04-05 16:35:20 +03:00
Nekotekina
e4a81b1d13 Move Log.h to util/logs.hpp 2020-03-07 12:29:23 +03:00
Nekotekina Aux1
c3f3451269 Fix warnings in GLGSRender 2020-03-04 21:23:34 +03:00
Nekotekina
bcbe324534 geometry.h: make conversion operators explicit
It requires static_cast<> to call them.
2020-02-11 13:21:45 +03:00
kd-11
3cc42c1bf8 gl: Fix broken image transfer operations 2020-02-05 18:18:09 +03:00
Nekotekina
15391f45d0 Modernize RSX logging (rsx_log variable) 2020-02-01 11:52:22 +03:00
kd-11
82af17beb1 gl: Optimize image operations
- Avoid double transfers where a transfer to a temp image is done
without scaling and then a secondary transfer follows. Combines the two
steps into one whenever possible which can significantly alleviate
bandwidth problems at higher resolutions. Significant speedup, upto 90%
in some cases (PDF, PDF2)
2020-01-16 22:29:26 +03:00
Nekotekina
377e7d2a73 C-style cast cleanup VI 2019-12-04 17:56:22 +03:00
kd-11
fd751e3e7b rsx: Improve blit format mismatch detection 2019-11-19 13:18:15 +03:00
kd-11
4a0e1c79ed rsx: Improve format validation for blit engine
- Check all possible cases where format mismatch is possible.
- Warn if a slow path is going to be taken. Should help with future
optimizations.
2019-11-18 13:17:00 +03:00
kd-11
105d4b51e6 gl: Use compute shaders for typeless texture decode 2019-10-13 19:00:05 +03:00
kd-11
7a6e2e716f gl: Add a framework for compute shaders 2019-10-13 19:00:05 +03:00
kd-11
88229f4716 gl: Remember to unbind attachments from active framebuffer after clear
- If a stale reference is left lying around (e.g the texture bound to
depth has been deleted and we attach a color image) no operations
actually take place. glCheckFramebufferStatus also does not catch this
problem.
2019-09-30 21:52:43 +03:00
kd-11
2962e05f26 rsx: Implement per-RTT color masks
- Also refactors and simplifies some common code in surface store and rsx core
2019-08-27 21:59:02 +03:00
scribam
db926ee671 rsx: Apply Clang-Tidy fix "performance-unnecessary-value-param" 2019-06-12 15:11:52 +03:00
kd-11
f04a0a2bb6 rsx: Remove some old restrictions affecting memory persistence 2019-04-09 13:40:54 +03:00
kd-11
bb65e45614 rsx: Implement GPU acceleration for rotated images 2019-03-17 21:50:11 +03:00
kd-11
5a4bea8c4f gl: Blit fixup
- Typo fix. I meant to disable scissor test, not stencil test
- Also clean up and simplify/optimize the core logic
2019-01-25 14:34:22 +03:00
kd-11
2a62fa892b rsx: Texture cache refactor
- gl: Include an execution state wrapper to ensure state changes are consistent. Also removes a lot of required 'cleanup' for helper methods
- texture_cache: Make execition context a mandatory field as it is required for all operations. Also removes a lot of situations where duplicate argument is added in for both fixed and vararg fields
- Explicit read/write barrier for framebuffer resources depending on
  usage. Allows for operations like optional memory initialization before
  reading
2019-01-06 10:44:40 +03:00
kd-11
362eea09a1 whitespace fix only 2019-01-06 10:44:40 +03:00
kd-11
15d5507154 rsx: Rewrite memory inheritance transfers
- Implicitly invoke a memory barrier if actively reading from an unsynchronized texture
- Simplify memory transfer operations
- Should allow more games to work without strict mode
2019-01-06 10:44:40 +03:00
kd-11
2b6e6a9ae9 gl: Fix problems with framebuffer reuse
- Matching attachments with resource id fails because drivers are reusing
  handles!
- Properly sets up stale fbo ref counting and removal
- Properly sets up resource reference test with subsequent removal to
  avoid using a broken fbo entry
2018-09-21 16:32:23 +03:00
kd-11
8c93db342f gl: Reuse framebuffer resources
- WIP optimizations for GL backend
2018-08-18 16:14:30 +03:00
kd-11
6d46ac1ad6 gl: Reimplement textures
- Separate texture data from texture views
2018-04-25 19:14:36 +03:00
kd-11
c191a98ec3 vulkan API fixes
- Fix for texture barriers
- vulkan: Rework texture cache handling of depth surfaces
- Support for scaled depth blit using overlay pass
- Support proper readback of D24S8 in both D32F_S8 and D24U_S8 variants
- Optimize the depth conversion routines with SSE
- vulkan: Replace slow single element copy with std::memcpy
- Check heap status before attempting blit operations
- Bump guard size on upload buffer as well
2018-02-16 16:14:54 +03:00
kd-11
89c548b5d3 rsx: fbo fixes 2.5
- Implement flush-always behaviour to partially fix readback from a currently bound fbo
  - Without this, only the first read is correct, as more draws are added the results become 'wrong'
  - Fixes WCB and cpublit behviour
- Synchronize blit_dst surfaces to avoid data loss when gpu texture scaling is used
  - Its still faster in such cases to disable gpu texture scaling but some types cannot be disabled without force cpu blit (e.g framebuffer transfers)
- Memory management tuning
  - rsx: on-demand texture cache rescanning for unprotected sections
  - rsx: Only framebuffer resources are upscaled
  - Do not resize regular blit engine resources
  - Lazy initialize readback buffer when using opengl
  -- These measures should help minimize vram usage
2018-02-16 16:14:54 +03:00
kd-11
02e571adbc gl: Cleanup some more things
- Avoid referencing GL's null texture
- Improve texture creation helpers
- Remove useless __glcheck from GLHelpers.cpp
2018-02-16 16:14:54 +03:00
kd-11
f20fd217f8 rsx: Reorganize framebuffer setup code
- Fixes some fast paths for framebuffer creation and binding
2018-02-16 16:14:54 +03:00
kd-11
71f69d1d48
rsx/overlays: Introduce 'native' HUD UI and implement some common dialogs (#4011) 2018-01-17 19:14:00 +03:00
Zion Nimchuk
3a9ae2df9e silence warnings in RSX stuff 2017-11-30 18:07:19 +03:00