Commit graph

155 commits

Author SHA1 Message Date
kd-11
942dbbc8fa vk: Add explicit sync when doing copy_image_to_buffer 2023-06-27 16:41:30 +03:00
kd-11
12f213ffad rsx: Trim the number of in-flight invalidated resources (temp cache)
- This drastically improves memory allocation behavior.
  Holding too many invalidated resources can lead to a cascading overallocation error as old resources hold refs to even older resources and nothing gets deleted.
2023-06-01 19:25:50 +03:00
kd-11
7d710cbf8c rsx: Do not allow 'compatible' check to pass if the size does not match
- It's not worth it. We end up with a mish-mash of internal configuration parameters that don't match the surface.
  Maybe with more abstraction it can work, but there is little benefit.
2023-05-15 12:28:19 +03:00
kd-11
9d432187aa vk: Fix bug that made fall-out barriers never get triggered 2022-12-28 17:37:50 +03:00
kd-11
b13165f95a vk/rtts: Account for corner case where the same texture can be bound to more than 1 slot 2022-12-28 17:37:50 +03:00
kd-11
110c20d25f vk: Restructure framebuffer loop barrier management 2022-12-28 17:37:50 +03:00
kd-11
04fb86556a rsx: Fix surface metadata life-cycle
- Beware of clone operations. Blindly inheriting the parent's metadata is wrong.
- It is possible, especially when reusing a pre-existing slice, that the parent and child info has diverged
2022-12-17 20:16:58 +03:00
kd-11
bf96cbe980 rsx: Fix const RTV/DSV cast from texture cache 2022-12-17 20:16:58 +03:00
kd-11
a05e3f02b8 rsx: Avoid expensive protection scan by sharing some data between surface and texture cache 2022-12-17 20:16:58 +03:00
kd-11
102d30db2d vk: Update support for framebuffer loops to comply with current spec 2022-09-28 12:55:31 +03:00
kd-11
1fc0191311 Fix build 2022-08-23 23:49:46 +03:00
kd-11
1f9e04f72d rsx/vk: Implement flushing surface cache blocks to linear mem 2022-08-23 23:49:46 +03:00
kd-11
f981e05908 rsx: Do not lie about surface details 2022-08-20 01:23:15 +03:00
kd-11
71e35c8b4d vk: Implement support for VK_EXT_attachment_feedback_loop_layout 2022-08-19 14:29:20 +03:00
kd-11
e179adc4a0 rsx: Refactor surface cache storage 2022-08-09 18:32:54 +03:00
kd-11
64b4cfa59f rsx: Erase surface background when reloading after a pitch mismatch 2022-08-07 22:14:49 +03:00
kd-11
c799ffd223 rsx: Stubs for pitch conversion 2022-08-07 22:14:49 +03:00
RipleyTom
a4d715e25d Warning Fixes 2022-03-23 19:35:10 +01:00
kd-11
af0e1f609e Fix vulkan compilation warnings 2022-03-23 11:26:06 +03:00
kd-11
bc7ed8eaab rsx/vk: Rework MSAA implementation 2022-03-17 22:02:20 +03:00
kd-11
0df903090d rsx: Optimize metrics a bit
- For some reason this has a massive impact on performance above some arbitrary threshold of calls
  Shows up under surface_cache::get_merged_memory_region when doing gathers.
2022-03-08 22:06:26 +03:00
kd-11
6ffd38c393 vk: Only enable DCC workaround if the format features allow it 2022-01-22 13:16:48 +03:00
nastys
c7140df5f8 Initial support for Apple GPUs 2022-01-22 00:17:17 +01:00
kd-11
6d737e61fd rsx: Use 32 bit integers for pitch
- RSX max pitch = 65536 which requires 17 bits
2022-01-10 12:27:30 +03:00
kd-11
92749f011e vk: Experimental workaround to just disable compression
Applies some flags to disable aggressive optimizations on some hw.
Currently applies to AMD cards which will avoid compression if mutable
format is enabled.
This is a temporary workaround.
2021-08-23 09:34:56 +03:00
kd-11
8848dc6673 vk: Improve driver compatibility
- Add workarounds to disable compression on mesa drivers
- Separate intel proprietary vs mesa into two enumerants
2021-08-17 20:19:45 +03:00
kd-11
d53f2f10fb rsx/vk: Improve recovery during OOM situations
- Do not spill when running on IGP with only one heap as it will just crash anyway.
- Do not handle collapse operations when OOM. This will likely just crash and there are better ways to handle old surfaces.
- Spill or remove everything not in the current working set
- TODO: MSAA spill without VRAM allocations
2021-07-17 21:28:11 +03:00
kd-11
c18e5e07cc vk: Implement VRAM spilling
- The idea is to shift memory to "shared graphics memory" when VRAM is running out
2021-07-15 18:05:35 +03:00
kd-11
000414c47d vk: Refactor surface cache by moving code to cpp file 2021-07-15 18:05:35 +03:00
kd-11
2ffa8f4623 vk: Rename rsx::vk_render_targets to vk::surface_cache
- Makes some changes much easier going forward to pull in vk-specific stuff into vk namespace.
- TODO: The same thing needs to happen with GL
2021-07-15 18:05:35 +03:00
kd-11
88abf3a6ba vk: Introduce the concept of VRAM allocation pools
- Each buffer or image has to declare which pool it belongs to. This will aid with memory management down the line.
2021-07-15 18:05:35 +03:00
kd-11
98f534b1bd vk: Rewrite partial clear shader
- Completely removes the feedback loop and replaces with hardware channel masking
2021-06-01 12:54:10 +03:00
kd-11
f85881c18c vk: Enable use of input attachments 2021-06-01 12:54:10 +03:00
Ani
a49446c9e9
Replace gsl::span for std::span (c++20) (#7531)
* Replace gsl::span for std::span (c++20)
* Replace gsl::byte with std::byte

Co-authored-by: Bevan Weiss <bevan.weiss@gmail.com>
2021-05-30 17:10:46 +03:00
kd-11
1a73b0a0da rsx: Fix transfer barriers not triggering resolve target initialization 2021-05-12 12:32:24 +03:00
kd-11
e3944bc67f rsx: Handle transfer_read differently from transfer_write
- Transfer writes are expected to clobber surface cache contents. Do NOT reload from CPU memory for writes.
- TODO: During transfer write to surface cache objects, lock memory if it was unlocked to avoid silly problems.
2021-05-09 13:07:47 +03:00
kd-11
1d9dd8d29d vk: Add support for tagging objects to ease debugging
- Makes use of VK_EXT_debug_utils
2021-04-28 16:53:02 +03:00
kd-11
9609767c51 vk: Refactor render target code 2021-04-26 00:33:05 +03:00
kd-11
be1238cc95 vk: Add support for queue family migration and refactor some texture upload code 2021-02-26 15:08:14 +03:00
kd-11
c2cbc62be6 vk: Refactor some uber-headers
- VKHelpers was the rug everything was swept under for a long time.
  This commit essentially deprecates its usage across most of the backend.
2021-01-10 12:04:31 +03:00
Nekotekina
b7bf316c1a Don't randomly include "stdafx.h"
It's file for precompiled headers.
Include what is used, don't rely on transitive includes.
2020-12-22 14:32:30 +03:00
Nekotekina
77352a2a86 Replace uint32_t with u32 2020-12-18 12:23:53 +03:00
Nekotekina
fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +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
0e7a705254 rsx: Resolution scaling overhaul
- Enforce square pixels instead of per-axis scaling
2020-11-18 09:29:34 +03:00
Megamouse
a3eb5c2d63 More Header cleanup 2020-11-06 22:14:05 +01:00
kd-11
a50ea09053 rsx: Properly pass format_class information during RTV/DSV resource barrier
- Also takes the opportunity to remove repeating code in a minor refactor.
2020-09-22 12:19:54 +03:00
kd-11
6d2cb94e3e gl/vk: Support swizzled data for RCB/RDB 2020-09-07 22:31:57 +03:00
kd-11
9e4bec8cec vk: Fix some missing render target declarations 2020-08-27 12:52:28 +03:00