Commit graph

108 commits

Author SHA1 Message Date
kd-11 d25ba03e82 vk: Lazy evaluate renderpass scope
- Spamming the driver with renderpass open/close cycles is bad for performance.
2020-03-15 18:39:40 +03:00
kd-11 9af52d12a8 vk: Improve events
- Make events properly managed objects.
- Add a workaround for AMD's broken event status query
2020-03-01 00:16:02 +03:00
kd-11 5eb314fbbb vk: Add execution barriers.
- Useful for debugging
2020-03-01 00:16:02 +03:00
Nekotekina 7069e7265f RSX: move g_dma_manager to g_fxo 2020-02-23 13:12:50 +03:00
kd-11 6220206cbc vk: Implement 2D array textures required for new font subsystem 2020-02-22 15:07:14 +03:00
Nekotekina 15391f45d0 Modernize RSX logging (rsx_log variable) 2020-02-01 11:52:22 +03:00
kd-11 175f78f5b3 vk: Lower default compute heap size to 64M
- There is no need to guess and use a large memory footprint as the heap is
now dynamic.
2020-01-15 15:42:36 +03:00
kd-11 3d96fe79cc vk: Implement dynamic sized compute heap
- Implements a dynamically sized compute heap to allow growing up the
size if it is too small.
2020-01-15 15:42:36 +03:00
kd-11 db5d03c340 vk: Generate dynamic binding table based on the capability of the drivers
- This alleviates constraints imposed on shaders to allow running on some not-so-great platforms.
2020-01-09 15:38:23 +03:00
kd-11 cdd9c12132 vk: Emulate conditional rendering for AMD 2019-12-29 13:49:46 +03:00
kd-11 a51395370e vk: Implement multithreaded command submission
- A few nagging issues remain, specifically that partial command stream
  largely caused by poor synchronization structures for partial CS flush
  and also the fact that occlusion map entries wait on a command buffer
  and not an EID!
2019-12-29 13:49:46 +03:00
Nekotekina 377e7d2a73 C-style cast cleanup VI 2019-12-04 17:56:22 +03:00
kd-11 8234bdb8f0 vk: Check for heap change events after a grow to avoid spec violations
- Avoid referencing the old buffer in stale views. Status can be set
globally if requested during heap creation.
2019-11-10 17:53:12 +03:00
kd-11 357e0d2097 vk: Implement explicit runtime flags to manage events like heap sync 2019-11-10 17:53:12 +03:00
kd-11 f359342721 rsx: Implement mutable ring buffers with grow support 2019-11-10 17:53:12 +03:00
kd-11 3bb70e837a vk: Silly copypasta 2019-10-22 13:44:49 +03:00
kd-11 97ed95d21b vk: Add video memory manager to monitor VRAM usage 2019-10-18 14:46:37 +03:00
kd-11 4f088a102c vk: Add kepler and maxwell tables 2019-10-16 22:40:50 +03:00
kd-11 acc986be3f vk: Add chip family detection 2019-09-26 20:12:25 +03:00
kd-11 212ac19c11 vk: Reimplement DMA synchronization 2019-09-12 23:32:21 +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
kd-11 dfe709d464 rsx: Surface cache restructuring
- Further improve aliased data preservation by unconditionally scanning.
  Its is possible for cache aliasing to occur when doing memory split.
- Also sets up for RCB/RDB implementation
2019-08-18 20:45:48 +03:00
kd-11 2548057ea0 vk: Improve AMD driver support
- Workaround broken fp16 in AMDVLK/RADV
- Do not disable primitive restart as the issue seems to have been fixed
2019-07-09 16:27:59 +03:00
kd-11 ae93b417ec vk: Handle emergency commandbuffer close with dangling queries
- TODO: Refactoring
2019-07-03 15:52:16 +03:00
kd-11 d69e8288ad vk: Restructure commandbuffer submission into tagged event IDs
- Tagged eventIDs can be used to safely delete resources that are no
longer used
- TODO: Expand gc to collect images as well
- TODO: Fix the texture cache to avoid over-allocating image resources
2019-07-03 15:52:16 +03:00
JohnHolmesII 23094b48bb Fix warnings related to -Wswitch
Add default cases.
Move default breaks to newline
Add proper handling in some instances.
Add missing enums to switches
2019-06-28 01:40:52 +03:00
kd-11 4a5bbba277 rsx: Enable MSAA
- vk: Enable depth buffer resolve+unresolve
- vk: Add AMD stenciling extension support
- rsx: Temporarily disables MSAA-compatible hacks such as transparency AA
- TODO: Add paths to optionally disable MSAA
2019-06-14 16:19:52 +03:00
scribam a02a8642b0 rsx: Apply Clang-Tidy fix "modernize-make-unique" 2019-06-12 15:11:52 +03:00
Nekotekina dfd50d0185 Implement std::bit_cast<>
Partial implementation of std::bit_cast from C++20.
Also fix most strict-aliasing rule break warnings (gcc).
2019-06-02 23:22:16 +03:00
scribam 99c1f87289 vk: Fix memory value in comments to match with the code below 2019-06-01 22:59:23 +03:00
kd-11 57eb892153 vk: Refactor framebuffers
- Refactor out framebuffers from the renderer core
- Use a proper cache with sorted queues for faster searching
2019-05-28 15:28:30 +03:00
kd-11 507ec8252b vk: Refactor renderpass management
- Ensures the current renderpass matches the image properties even when a cyclic reference is detected
- Solves SDK debug output error spam due to mismatching layouts and renderpasses
2019-05-25 14:07:29 +03:00
kd-11 46ba53f122 vk: Propagate more information to the driver
- Pass "correct" layout to descriptors
- TODO: Fix renderpass attachment descriptors which are inadvertently doing silent transitions
2019-05-22 01:18:46 +03:00
kd-11 a245d9fb24 vk: DOuble general-purpose heap allocation to 128M and add a better diagnostic message for OOM 2019-05-19 17:33:21 +03:00
kd-11 4037225e98 vk: Workaround for cyclic feedback loops
- Transition attachments to LAYOUT_GENERAL in case of a feedback loop
  - Fixes appearance of garbage along polygon edges in some
post-processing passes.
  - Also reverse this transition when rendering goes back to normal
2019-05-17 16:41:17 +03:00
kd-11 2bec304cca vk: Allow some drivers to bypass window polling if not needed 2019-05-05 13:37:55 +03:00
kd-11 463b1b220d rsx: Improve accuracy of shadow compare Ops when non-integer depth formats are used
- The fixed-point D24S8 format does special Z clamping during compare which matches PS3 behaviour
- D32S8 is a floating point format and comparison with Dref > 1 always fails causing black edges/borders
2019-04-25 16:23:05 +03:00
kd-11 366e4c2422 rsx: Preliminary support for format conversions using typeless resolve 2019-04-09 13:40:54 +03:00
kd-11 d731c07ade vk: Fix typeless resource management
- Fixes bugs that appear with high resolution scaling
2019-03-22 21:27:15 +03:00
kd-11 a49a0f2a86 vk/gl: Synchronization improvements
- Properly wait for the buffer transfer operation to finish before map/readback!
- Change vkFence to vkEvent which works more like a GL fence which is what is needed.
- Implement supporting methods and functions
- Do not destroy fence by immediately waiting after copying to dma buffer
2019-03-17 21:50:11 +03:00
kd-11 19ff95da70 vk: Fix usage of VK_IMAGE_LAYOUT_GENERAL
- Properly synchronize when transitioning to/from GENERAL layout.
- General layout requires full pipeline dependency since its used in a 'general' sense. As such, its use is to be largely avoided.
2019-02-07 11:40:17 +03:00
kd-11 3bfa564ef8 vk/windows: Try to keep msq thread from ever stopping
- NVIDIA drivers hook into the msq before our nativeEvent handler. This means NV is aware of events before rpcs3 is aware of them and sometimes stops until a new event is triggered.
  If rpcs3 is inside a driver call at this time, the system will deadlock since the driver waits for msq which waits for the renderer which waits for the driver.
- Use explicit hook management to control window events
- Add fence timeout to attempt detection of surface loss events
2019-01-31 21:53:02 +03:00
kd-11 fa9b448686 vk: Spec fixups
- Disable DEPTH<->RGBA typeless transfers for now as they require a lot more work to work for all vendors
- Do not allow switching layouts to UNDEFINED/PREINITIALIZED formats
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 9c45ce6d37 vk: Reimplement typeless memory allocation to handle resolution upscaling 2019-01-06 10:44:40 +03:00
kd-11 815f4aa63b vk: Improve logging of device names and driver versions 2018-09-03 18:24:20 +03:00
kd-11 e23435a190 vk: whitespace fix only 2018-09-03 18:24:20 +03:00
kd-11 21e1911112 vk: Improve fence wait logic 2018-08-24 14:52:22 +03:00
kd-11 f0a91484a0 vk: Implement double-buffered heaps for platforms without universal support for host visibility (APPLE) 2018-08-23 22:54:56 +03:00
kd-11 cc7848b3ef vulkan: Fix blit engine transfer to ARGB8 render target memory 2018-08-18 16:14:30 +03:00