Commit graph

3326 commits

Author SHA1 Message Date
Eladash bbaa93c846
RSX Cache: Prevent crash on failure to obtain cache directory (#10474) 2021-06-19 16:57:07 +03:00
kd-11 9fadd48ea3 vk: Ensure async scheduler thread is never auto-spawned by fxo
- This thread is a resource hog for design reasons.
2021-06-17 00:43:20 +03:00
kd-11 4bf9700562 rsx: Remove unused variable leftover from refactoring 2021-06-17 00:43:20 +03:00
kd-11 966aec7ad7 rsx: Resync excluded memory regions to avoid memory tests failing after flush events
- This is a mostly correct fix, but a corner case exists that can leak old data to the surface cache
2021-06-15 15:42:16 +03:00
kd-11 78972cd611 rsx: Refactor surface inheritance logic 2021-06-15 15:42:16 +03:00
kd-11 c3415bcff2 rsx: Fixup for byte order when passing data via vertex registers that are not inline arrays (register vertex data and push buffers) 2021-06-14 23:20:35 +03:00
kd-11 d3ff67ffb5 rsx: Pass vertex attributes streamed via register write in PS3-correct format
- TODO: Optimize this, we can avoid the double bswap in FIFO and then in attribute push
  Not very important since nobody is doing register push in high-performance path.
2021-06-14 10:24:03 +03:00
Eladash 76bfe54c7e Improve bitwise serialization trait 2021-06-11 16:54:17 +03:00
kd-11 cd6552d344 vk: Properly destroy renderpass cache 2021-06-09 22:35:50 +03:00
kd-11 20bd723e7c rsx: Add floor workaround for GPUs with rounding issues
- Mainly affects nvidia where x/w * w can sometimes return a value smaller than x.
  In such conditions, floor(x) will return x-1 if x is an integer which is horribly wrong and exaggerates minor precision drift to great proportions.
2021-06-09 10:55:55 +03:00
Eladash c918f395b9 Make rsx::simple_array compatible with serialization 2021-06-08 19:29:46 +03:00
Eladash 2169e8d935 Implement serialization.hpp, remove cereal submodule
Bump RSX capture version, use new serializer.
2021-06-07 16:28:42 +03:00
kd-11 ddbe496097 rsx: Fix depth/color mismatch resolve in texture cache
- Sometimes we need a depth texture but only a color texture is available.
2021-06-07 01:03:49 +03:00
kd-11 3f80d0b7d8 rsx: Fix surface deduplication crash 2021-06-07 01:03:49 +03:00
kd-11 568af756cc rsx: Fix expired sampler descriptors
- Rebuilding when strict mode is enabled was incomplete.
  The copy has to be redone if the source has been updated.
2021-06-06 15:37:47 +03:00
xddxd b5f1f50a16 Get rid of mobile Kepler class and add some missing GPUs 2021-06-06 08:07:43 +02:00
kd-11 6ac9e6f9c4 gl: Add some debug visualization to internally verify consistency 2021-06-05 21:02:14 +03:00
kd-11 39815801aa rsx: Implement proper decoding for some obscure fragment instructions
PK4UBG and UP4UBG were dropped from the NV_fragment_program spec in 2002.
Not much information about them remains but seems pretty straightforward.
2021-06-05 21:02:14 +03:00
Nekotekina f2d6b52561 Fix span copy after refactoring
- Add range check at fast path.
- Fix typo in element by element copying.
Should fix #10385
2021-06-01 21:18:25 +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
Nekotekina a1608b636f span: implement as_span workarounds as utils::bless
Minor cleanup.
2021-05-31 15:46:34 +03:00
kd-11 4a32b70aec vk: Validate pipeline state before compiling in case of shader cache moved between GPUs/drivers 2021-05-30 22:35:34 +03:00
kd-11 9199b1b1d8 vk: Improve compatibility with sub-par drivers and hardware
- Adds workarounds for INTEL + MSAA
- Adds support for younger drivers where all features may not be
  implemented.
  Things that won't out-right break the emulation can be
disabled.
2021-05-30 22:35:34 +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
Megamouse 99af70ae59 Include limits.h 2021-05-29 10:09:56 +02:00
Megamouse 5a0b93742c overlays: move more code to cpp 2021-05-29 10:09:56 +02:00
Megamouse f18e80e899 fix some warning spam 2021-05-29 08:17:30 +02:00
Megamouse 210999b874 perf_overlay: fix guide line locations
The guide lines falsely started from the top and not from the bottom, as all datapoints do.
2021-05-29 08:17:30 +02:00
Megamouse 046d029e89 try to fix pad interception 2021-05-29 07:43:09 +02:00
kd-11 9e62e98f79
rsx: Minor refactoring (#10358)
- Fix some misnomers.
- Allow finer grained control over texture section creation routines.
2021-05-27 23:44:07 +01:00
kd-11 763828837b
vk: Forcefully unmap DMA blocks before destroying them (#10359)
- While the vulkan spec explicitly allows destroying mapped blocks, GPUOpen vma_alloc does not.
- Strangely, this issue does not afflict linux users, only windows.
2021-05-27 23:03:46 +01:00
kd-11 f9d9d12f11 vk: Fix slow bo upload + copy when using RADV
- This reverts commit dbcf1b5a03bfef18f404aa6827515af319abd744.
- Avoid unmapping buffers used for GPU upload/download. It is very slow
  on some platforms.
2021-05-27 22:49:13 +03:00
kd-11 56f7359da4 vk: Workaround for slow bo transfer (pinned<->VRAM) when using RADV
- perf shows extremely high number of cycles wasted in memmove glibc method
2021-05-27 01:27:15 +03:00
Megamouse 6fed80333c perf_overlays: only calculate metrics on update
This should give a significant performance boost
2021-05-26 23:26:12 +02:00
Megamouse befd38d9ae perf_overlays: only compile dirty graphs
This should give a small performance boost
2021-05-26 23:26:12 +02:00
Megamouse 98b668b3a8 perf_overlays: add avg and 1p high/low 2021-05-26 23:26:12 +02:00
Megamouse 83d3658ef0 scale debug overlay based on current dpi settings
Depending on the dpi settings, the debug overlay was almost unreadable.
I also took the liberty to refactor some redundant client size calls and to add some margin to the left of the debug text.
2021-05-26 20:31:29 +02:00
kd-11 338dc62474
vk: Fixup on linux + RADV combo (#10341) 2021-05-25 20:40:53 +01:00
kd-11 a736350859 rsx/vk: Use backend configuration to track options that can be modified on a per-device basis 2021-05-25 20:54:17 +03:00
kd-11 156b092dc9 vk: Lock passthrough DMA behind the async streaming option
- Without async streaming this option can introduce artifacts.
  The correct fix for it is to use async streaming which allows the GPU to process texture data in parallel with rendering.
  Without streaming enabled the GPU can sometimes pull stale data via DMA when rendering and find the CPU has modified it.
2021-05-25 20:54:17 +03:00
kd-11 122bb4d829 vk: Avoid repeated chip_class lookup by using generic global function 2021-05-25 20:54:17 +03:00
kd-11 7508949ca8 vk: Add workarounds to disable incompatible options 2021-05-25 20:54:17 +03:00
Nekotekina 2491aad6f2 types.hpp: implement min_v<>, max_v<>, SignedInt, UnsignedInt, FPInt concepts
Restrict smax to only work with signed values for consistency.
Cleanup <climits> includes.
Cleanup <limits> includes.
2021-05-23 19:43:51 +03:00
Nekotekina 160b131de3 types.hpp: implement smin, smax, amin, amax
Rewritten the following global utility constants:
`umax` returns max number, restricted to unsigned.
`smax` returns max signed number, restricted to integrals.
`smin` returns min signed number, restricted to signed.
`amin` returns smin or zero, less restricted.
`amax` returns smax or umax, less restricted.

Fix operators == and <=> for synthesized rel-ops.
2021-05-22 12:10:57 +03:00
Eladash 638f20c80f Improve get_current_cpu_thread() 2021-05-20 09:25:51 +03:00
Nekotekina 04cac6cd33 logs.hpp: refactoring (logs::message)
Make .error/.warning/... callable objects which can be pointed to.
Make .always() more hard to access.
Memory layout optimizations.
2021-05-20 01:08:32 +03:00
kd-11 a84cf030bb Fixup
FreeBSD + concepts = fail
2021-05-15 23:51:12 +03:00
kd-11 c5a06dab0a rsx: Refactor program texture state handling to be persistent across shader swaps 2021-05-15 23:51:12 +03:00
octopoulo fe17c83020 reverted comment 2021-05-12 15:28:30 +03:00