Commit graph

6388 commits

Author SHA1 Message Date
eladash 33fe0fdd6b Add missng check for key in cellAudioSetNotifyEventQueue
key is checked once according to hw test.
2019-11-03 14:59:47 +03:00
Nekotekina f75661bfae Fix ALSA and PULSE building on Linux (workaround) 2019-11-01 20:41:16 +03:00
Nekotekina 35249d2578 Implement multi_cas with atomic2 type
stx::atomic2 is a "fat atomic" for use with multi_cas.
stx::multi_cas is minimal transaction routine.
2019-11-01 20:41:16 +03:00
kd-11 bbed791ee0 vk: Add explicit support for identity image views
- Allows bypassing all remap shenanigans to make some operations that
rely on the raw image to work correctly.
2019-11-01 19:35:46 +03:00
Emmanuel Gil Peyrot 03a2d36c7e Audio: don’t build ALSA, PulseAudio or FAudio backends when disabled 2019-10-31 15:46:20 +03:00
kd-11 63bbf11a76 vk: Add video out calibration pass
- Adds gamma correction and RGB range filters to output to match PS3
2019-10-31 14:43:24 +03:00
kd-11 78aefe5b5e rsx/overlays: Add support for other primitive types other than triangle_strips 2019-10-31 14:43:24 +03:00
Nekotekina e3e7051ed3 Minor optimization in BufferUtils.cpp
Don't use PSHUFB for horizontal operations.
Utilize PHMINPOSUW to compute max as well:
 + sse41_hmin_epu16
 + sse41_hmax_epu16
2019-10-30 18:52:34 +03:00
Nekotekina b1968769b7 Minor cleanup in BufferUtils.cpp
Replace inline asm with intrinsic using target attribute trick.
2019-10-30 17:53:51 +03:00
linkmauve cfd5cf6bdb Optimise primitive_restart::upload_untouched() (#6881)
* rsx: Optimise primitive_restart::upload_untouched() with SSE4.1

This optimisation is only applied when skip_restart is false.

I’ve only tested the u16 codepath, as it is the one used in NieR.

In some very unscientific profiling, this function used to take 2.76% of
the total frame time at the save point of the port town, it now takes
about 0.40%.

* rsx: Mark all SSE4.1 functions with attributes on gcc and clang

This assures the compiler we will take care of only calling these
functions after having checked that the CPU does support these
instructions.

* rsx: Add an AVX2 implementation of primitive restart ibo upload

* rsx: Remove redefinition of SSE4.1 instructions

Now that clang is aware that our functions are compiled with SSE4.1, it
lets us generate this code using its intrinsics.

* rsx: Optimise vector to scalar conversion

This is done using minpos and srli intrinsics and generate less code
than before.

Thanks Nekotekina for the suggestion!
2019-10-30 16:42:44 +03:00
kd-11 35794dc3f2 vk: Add checks for alphaToOne support
- This feature is very rarely used, as alphaToCoverage is commonly used as a replacement for blending, not in addition to it.
2019-10-30 01:06:28 +03:00
Eladash f41f5054f7 sys_spu Fixup after #6864 2019-10-29 23:13:16 +03:00
kd-11 eda09489b2 vk: Optionally ignore depth bounds testing on hardware that does not
support it.
2019-10-29 20:03:54 +03:00
kd-11 7a5c20ef85 vk: Minor spec touchups
- Simplify active instance management. While multicontext support will
be required in future, this is better done with multiple logical devices
rather than multiple instances.
- Destroy the WSI surface on exit
- Enable depthBoundsTest explicitly. TODO: Properly check for supported
features.
2019-10-29 20:03:54 +03:00
kd-11 aa3eeaa417 rsx: Separate subresource_layout:dim_in_block and
subresource_layout::dim_in_texel

- These two are not always linked when working with compressed textures.
The actual texels extend past the actual size of the image if the size
is not aligned. e.g if height is 1, the real height is 4, but its not
possible to determine this from the aligned size. It could be 1, 2, 3 or
4 for example.
- Fixes image out-of-bounds writes when uploading from CPU
2019-10-29 20:03:54 +03:00
Eladash b99992d570 sys_spu: Fix SNR and Inbound Mailbox state reset
Also remove bugged ESTAT check at sys_spu_thread_write_spu_mb.
2019-10-29 18:34:28 +03:00
Eladash 739f68271f SPU LLVM: fix MFC CMD enqueuing 2019-10-29 18:16:08 +03:00
Eladash f88a135b5b Fix lv2_config_service_event event id reset 2019-10-29 18:15:26 +03:00
Eladash 114b9498bf Remove unjustified use of idm::import_existing in sys_config 2019-10-29 18:15:26 +03:00
Eladash 8b6383b489 lv2: Correct alignment of some attributes structs 2019-10-29 18:15:41 +03:00
Eladash 3e4cbf67f6 sys_rwlock_wlock: Fix typo 2019-10-29 18:15:26 +03:00
Eladash 42fc698186 rsx: Enable primitive restart index only when needed (#6889)
* rsx: Enable primitive restart index only when needed

* rsx: Use if with initializer in read_put()
2019-10-28 23:16:27 +03:00
Hula Hoop 200ec5c4b3 Super-important PR (#6900)
* Fix capitalisation errors and typos

* Oops
2019-10-28 17:44:44 +03:00
kd-11 479d92d075 vk: Fix uninitialized (and wrong) variable access 2019-10-28 15:20:45 +03:00
kd-11 b0708367c2 vk: Round lod bias to the nearest 0.5 to lower number of permutations when nearest mipmap sampling is used
- The lambda values will be rounded to the nearest integer anyway
2019-10-28 15:20:45 +03:00
kd-11 3e8dfede1c vk: Modify sampler cache to uniquely identify all the input parameters
- Avoids iteration when variable mipmap counts or lod bias parameters change
2019-10-28 15:20:45 +03:00
kd-11 ad2add9574 rsx:: Use fcmp correctly 2019-10-28 15:20:45 +03:00
kd-11 d04241ad25 rsx: Allow compressed textures to be unaligned in size
- Align based on row length but let the texture itself be of arbitrary dimensions
2019-10-28 15:20:45 +03:00
Emmanuel Gil Peyrot 69e9ee26f6 rsx: Make input_is_swizzled a template parameter
This lowers the relative cost of this function from ~2.25% to ~1.80% on
gcc 9 which I found quite surprising, some of it probably gets inlined
better in the callers, but I haven’t been able to isolate which parts.
2019-10-28 13:28:51 +03:00
Eladash 65e47490c4 cellSysCacheClear/Mount() improved
Clear() error checking simplified a bit
Mount() now clears cache if ID was changed from last or NULL specified.

Implemented vfs::host::remove_all():
Clear() now uses vfs::host::remove_all() to match behaviour on Windows with ps3
2019-10-27 15:56:16 +03:00
Nekotekina 83f253636a SPU LLVM: verbose patchpoints in "giga table" 2019-10-27 13:04:05 +03:00
Nekotekina 16edb5bdd0 SPU Analyser: don't compile on "analyser failed" 2019-10-27 13:04:05 +03:00
Nekotekina 5f00b32867 SPU: fixup for duplicates in recompilers
Fixup for the edge case.
2019-10-27 13:04:05 +03:00
Nekotekina 37dbbce194 SPU LLVM: Enable "Giga table" in Mega mode
Was previously only enabled in Giga mode.
Also fill the table with branch patchpoints.
2019-10-27 13:04:05 +03:00
Nekotekina 8c28c4e8ec SPU: Make recompilers lock-free. 2019-10-26 23:33:18 +03:00
Nekotekina 9ac6ef6494 SPU: cleanup former OOM handling
Remove cpu_flag::jit_return.
It's obsolete now, and worked only in SPU ASMJIT anyway.
2019-10-26 21:24:12 +03:00
MSuih f3ed26e9db Small warnings cleanup (#6671)
* Ignore more warnings

These are intentional

* Signed/unsigned mismatch when comparing

* Explictly cast values

* Intentionally discard a nodiscard value

* Change ppu_tid to u32

* Do not use POSIX function name on Windows

* Qt: Use horizontalAdvance instead of width

* Change progress variables to u32
2019-10-25 13:32:21 +03:00
arabek 63a0b97dd1 Normalize audio when downmixing to avoid clipping (#6867)
* Normalize audio when downmixing to avoid clipping

Idea came from this topic:
https://hydrogenaud.io/index.php?topic=104214.msg855199#msg855199

Fixes very loud audio in Motorstorm (and probably other games
when playing over headphones/stereo speakers with
Downmix to Stereo option enabled)
2019-10-25 12:56:47 +03:00
Oschowa 06433d614a Implement FAudio backend (#6374) 2019-10-24 22:26:29 +03:00
Marin Baron 4599d58413 Fix debug build gcc/clang linker.
Create temporary variable to resolve undefined reference.

[ 98%] Linking CXX executable ../bin/rpcs3
/usr/bin/ld : Emu/librpcs3_emu.a(sys_vm.cpp.o) : dans la fonction « sys_vm_t::~sys_vm_t() » :
/mnt/raid/Git/rpcs3/rpcs3/Emu/Cell/lv2/sys_vm.cpp:21 : référence indéfinie vers « id_manager::id_traits<sys_vm_t, void>::invalid »
collect2: erreur: ld a retourné le statut de sortie 1
make[2]: *** [rpcs3/CMakeFiles/rpcs3.dir/build.make:426: bin/rpcs3] Error 1
2019-10-24 14:34:38 +03:00
JohnHolmesII 0842724f94 Update cellVoice.cpp
Caused warnings. Not sure what the actual intention was, this may need to be inverted.
This commit assumes that erase() returning 0 is a sign that deletion
failed, or that there was corruption. There should be a port there.
2019-10-24 14:19:52 +03:00
Emmanuel Gil Peyrot 9253f7d645 Audio: don’t build XAudio2 backend on Linux
The files already had a #ifdef _WIN32, but this avoid even trying to
compile their translation unit.

I was surprised to see XAudio2 being mentioned on Linux, this makes sure
no one else will get this surprise.
2019-10-24 14:16:29 +03:00
Nekotekina 6e19881b82 Update LLVM (10) 2019-10-23 16:01:14 +03:00
kd-11 d53d7bb598 vk: Restore vega native use of FP16 in shaders
- AMD proprietary drivers should work fine
2019-10-23 12:20:06 +03:00
Emmanuel Gil Peyrot 54d95373d0 Support fullscreen properly on Wayland
The current behaviour when going fullscreen from windowed was to keep
the previous size of the swapchain, with black borders on all sides,
which looks quite ugly.

The root of this issue is that rpcs3 only checks for frame resize if
vkQueuePresent() returns VK_SUBOPTIMAL_KHR, which drivers can’t do on
Wayland, see https://gitlab.freedesktop.org/mesa/mesa/issues/1979
2019-10-23 12:19:46 +03:00
kd-11 e04b6cd7c0 rsx: Copypasta fix
- r1 is always float4 never half4. Its a full-width register unlike the
other outputs which are optionally half-width.
2019-10-23 00:50:24 +03:00
Zion f1d474f932 Bump version built on to 16.04, Update clang to 8, update Qt to 5.12.3 2019-10-22 21:52:01 +03:00
kd-11 00bc3fe658 Drop d3d12 backend 2019-10-22 21:45:14 +03:00
Emmanuel Gil Peyrot 14c63ec014 Fix misleading indent. 2019-10-22 16:11:43 +03:00
Emmanuel Gil Peyrot 9d1b7af2eb Avoid std::move() for copy elision
This could disable zero-copy optimisations, which is the opposite of
what we want.
2019-10-22 16:11:43 +03:00