Commit graph

3515 commits

Author SHA1 Message Date
kd-11
39ef39aa4e rsx: Exercise caution when testing for overlaps in invalidated sections 2021-12-24 15:13:33 +03:00
kd-11
56dd09f4fe rsx: Handle floating point shenanigans
- If near and far clip are too close together, the API will not distinguish between them leading to out of bounds values
2021-12-22 22:08:53 +03:00
kd-11
de495952fd rsx: Enable fallback for devices without wide integer Z buffers 2021-12-22 22:08:53 +03:00
kd-11
1ce5349199 rsx: Remove zclip hackery
- Calculates precise Z value as requested by the game
- Works properly if the underlying Z format matches the PS3 1:1 but may cause minor problems otherwise
2021-12-22 22:08:53 +03:00
Nekotekina
12e3c9e08b Use PAUSE in vk::query_pool_manager::get_query_result 2021-12-21 23:28:09 +03:00
Nekotekina
262ff01619 Use aligned stores in write_index_array_data_to_buffer
Ensure that target buffer is cache line aligned.
Improve stx::make_single to support alignment.
2021-12-21 23:28:09 +03:00
Nekotekina
76ccaf5e6f BufferUtils: refactoring
Optimize CPU capability tests for arch-tuned builds.
Separate streaming and non-streaming utilities.
Rewritten copy_data_swap_u32(_cmp) with AVX2 path.
2021-12-21 23:28:09 +03:00
nastys
47e4a95d8f
Fix remap_vector redefinition on macOS (#11271) 2021-12-21 10:36:09 +01:00
nastys
08333e0876
macOS moltenVK support and SIGBUS handling (#11252) 2021-12-12 21:35:56 +01:00
kd-11
d523f9cc6b rsx: Avoid skipping input mask checks due to static flow control 2021-12-08 23:58:32 +03:00
kd-11
7ca15c60bb rsx: Improve image aspect tests
- Replace old format-based detection with proper aspect test.
  Explicit image aspect has been available for a long time, but older
  code was not updated.
2021-12-08 23:58:32 +03:00
Nekotekina
d6420b8803 Put std::hash specialization out of std 2021-12-07 13:04:10 +03:00
DH
49c02854f5 [rsx] reduce size of config structs 2021-12-02 21:36:57 +03:00
DH
cccfb89aa0 [Config] Use std::less<> for std::map<...>
Reduces amount of string copies
[Utilities] fmt::replace_all: avoid creation of temporary strings
2021-12-02 21:36:57 +03:00
kd-11
02832d9623
rsx: Add some sensible fallbacks (#11219)
* rsx: Add some sensible fallbacks

* Update GLPresent.cpp

* Update VKPresent.cpp

* Update rsx_utils.h

* Update rsx_utils.cpp
2021-12-02 16:02:08 +03:00
kd-11
9bb46aa944 rsx: Simplify unconstrained aspect ratio conversion
- There is a reason resolutions are defined by only a height variable.
2021-12-01 21:55:53 +01:00
Megamouse
aea1ec2594 avconf: Add const to fxo references 2021-12-01 21:55:53 +01:00
kd-11
22a7b026e7 rsx: Fix image scaling
- Specifically fixes a corner case where double transforms are required.
  Technically this can be made more readable using transformation matrices:
  * M1 = transform_virtual_to_physical()
  * M2 = transform_image_to_virtual()
  * M3 = M1 * M2
  * Result = Input * M3
  But we don't use a CPU-side matrix library and it is not reasonable to do this on the GPU.
2021-12-01 21:55:53 +01:00
Megamouse
c8d4a0dcdc VK/GL: honor game's aspect ratio when scaling 2021-12-01 21:55:53 +01:00
kd-11
38bfefcdfa vk: Fix incorrect mixed transfer modes for mipmapped VTC 2021-11-28 01:44:21 +03:00
kd-11
44fe6f6d39 rsx: Fix sloppy format matching test 2021-11-27 17:47:41 +03:00
orbea
a84223bdc6 rpcs3: Fix the DATADIR path for AppImage
Even when DATADIR is defined the other paths may still be correct.

Fixes: https://github.com/RPCS3/rpcs3/issues/11195
2021-11-24 19:14:06 +01:00
kd-11
4df1a938b1 Unused var 2021-11-24 16:02:24 +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
kd-11
a21c6c4628 rsx: Fix handling of scaling requests for packed formats
- One does not simply interpolate RGB565 components as U16 data!
2021-11-24 16:02:24 +03:00
kd-11
58f0fa3ca5 gl: Enable handling of X16 blit targets 2021-11-24 16:02:24 +03:00
kd-11
97bd8f7bc1 rsx: Update sampler format class when inheriting mipmap slices/sections 2021-11-24 16:02:24 +03:00
AniLeo
1df8f52a9f vk: Remove lavapipe workaround
Current lavapipe version now has support for 
shaderStorageBufferArrayDynamicIndexing
2021-11-23 22:48:46 +01:00
orbea
59f253ba24 cmake: Use GNUInstalldirs 2021-11-22 21:45:55 +01:00
Megamouse
7eee9e7b05 overlays: simplify backup icon copy procedure 2021-11-20 08:43:46 +01:00
Megamouse
0f7534c755 VK: fix NVIDIA driverVersion check 2021-11-16 09:31:16 +01:00
Megamouse
4d0330bf82 rsx: fix possible segfault 2021-11-16 09:31:16 +01:00
Megamouse
f6e04ffdd2 overlays: add stick input to native dialogs 2021-11-16 01:38:33 +01:00
Megamouse
44b42f68fd overlays: add R3, L3 and PS buttons
Unused at the moment
2021-11-16 01:38:33 +01:00
Megamouse
ff5e31f396 overlays: add system sounds 2021-11-15 23:03:30 +01:00
kd-11
59b1c324a9 rsx: Properly implement immediate mode rendering
- Treat the draw commands as being consumed on-the-fly with ATTR0 as provoking attribute
- Analysing streams sent to RSX and the results implies they are consumed fully inline.
  This only makes sense if a provoking attribute is present. The 'static' register is truly the immediate register for the draw.
2021-11-15 18:14:15 +03:00
kd-11
1f627caa81 rsx: Clear some leaking register state between runs 2021-11-15 18:14:15 +03:00
kd-11
7e3eab9915 rsx: Fix texture state propagation between unrelated draw calls
- Older games can load all textures before a draw sequence and then swap shaders for different draws.
- Optimizations in texture state streaming make it so that only referenced data is carried forward.
2021-11-09 12:39:49 +03:00
Megamouse
88bb26afb4 vk: make upscaler dynamic
The config option was marked as dynamic, but was never actually changed ingame
2021-11-06 01:02:54 +01:00
kd-11
f7eacf70ec rsx: Restore shader disassembler to working state 2021-11-05 23:55:07 +03:00
kd-11
933d96af5f vk: Do not clip region using renderpass renderarea, we have scissor for that 2021-11-04 21:05:15 +03:00
kd-11
ad00c44231 rsx: Configure pitch correctly for pitch-zero textures (1D) 2021-11-03 16:58:30 +03:00
Eladash
b84e95d768 rsx: Fixate time stamp of VBLANK 2021-11-01 10:04:53 +01:00
Eladash
4369fb234e rsx: Fix typo in VBLANK processing regarding emulation pause 2021-11-01 10:04:53 +01:00
Eladash
58040d478a rsx: Implement NTSC fixup mode, improve VBLANK accuracy 2021-11-01 10:04:53 +01:00
kd-11
5b0ef401f7 rsx: Fix sampling in X when 0 pitch is given
- A pitch of 0 still allows 1-dimensional addressing.
2021-10-31 14:32:42 +03:00
Megamouse
1650dd1c7d overlays: fix graph offset error after applying new config
I already had this figured out last time but forgot the dynamic config use case.
2021-10-31 10:14:08 +01:00
Megamouse
84f123041a overlays: fix offset of right edge oriented graphs when detail level is none 2021-10-31 10:14:08 +01:00
Megamouse
f258ae795c Add more logging for Emulator Stop events
This should give us more insight into the conditions that cause emulation stops.
This may also help find false issue reports.
2021-10-31 04:12:47 +01:00
Megamouse
33e80a733d overlays: fix trophy notification sound in queue 2021-10-30 22:44:30 +02:00