Commit Graph

7899 Commits

Author SHA1 Message Date
Nekotekina
1880a17f79 SPU recs: implement spu_runtime::find
Use this function to link to existing functions from branch patchpoints.
Don't compile from branch patchpoints.
2019-03-23 02:43:41 +03:00
Nekotekina
31304f4234 SPU rec: refactor some trampoline generation
Move branch/dispatch trampoline generation at startup.
2019-03-23 02:43:41 +03:00
Nekotekina
3794f65bb6 Add cpu_flag::jit_return 2019-03-23 02:43:41 +03:00
Nekotekina
849411693a PPU LLVM: add MemoryManager3
For temporary allocations.
Add flags in jit_compiler constructor.
2019-03-23 02:43:41 +03:00
Nekotekina
466d58ccef SPU LLVM: fix branch patchpoints
Forgot to passthrough 3rd arg (rip)
2019-03-23 02:43:41 +03:00
kd-11
41b87cf577 rsx: Blit engine fixes
- If a transfer writes to a RTT and depth mismatch happens, create a local target and the upload function will likely resolve between the two
- If a surface is rejected, reset the target region!
2019-03-22 21:27:15 +03:00
kd-11
86ad204636 rsx: Rebase output region when using upload-fallback path 2019-03-22 21:27:15 +03:00
kd-11
dbc8e70ddd rsx: Silence some compiler noise 2019-03-22 21:27:15 +03:00
kd-11
3a4e3fa53a rsx: Fix use-after-modify condition when inserting a draw command out of order
- Fixes barrier->range rebase after the insert
2019-03-22 21:27:15 +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
adc59f9810 rsx: Fix blit transfers when texel sizes mismatch
- Also refactors some bpp handling code
- Simplify texture intersection test to use a normalized/uniform coordinate space
- Fix broken bounds checking as well
2019-03-22 21:27:15 +03:00
kd-11
b879b32271 rsx: Fix bpp calculation taking resolution scaling into account
- Do not rely on image->width(), use surface_width() instead for unscaled values
- Refactor/clean GL rendertarget class a bit
2019-03-20 10:05:54 +03:00
kd-11
03fca73cf4 rsx: Fix blit intersection falling outside the available texture
- Just becaue we have a hit inside the tile of interest does not guarantee that it sits inside the texture!
2019-03-20 10:05:54 +03:00
Jan Beich
1a13d3ae4e OpenBSD doesn't have mcontext_t
`<signal.h>` provides `typedef struct sigcontext ucontext_t`
2019-03-19 22:24:49 +03:00
Jan Beich
1f845a3634 Don't try to build libusb on FreeBSD
CMake Error at 3rdparty/libusb/libusb/os/CMakeLists.txt:90 (message):
  Unsupported platform FreeBSD.  Currently only support Windows, OSX, &
  Linux.
2019-03-19 22:24:49 +03:00
Matias Morán
3eb2bcad39 Update DualShock 3 warning 2019-03-18 22:46:02 +00:00
RipleyTom
63bbe459ea DS3 pad handler 2019-03-18 19:05:02 +03:00
RipleyTom
f2aaad11bb Adds libusb 2019-03-18 19:05:02 +03:00
kd-11
3ef16bee47 rsx: Fix texture lookups and avoid out-of-bounds copies/transfers 2019-03-17 21:50:11 +03:00
kd-11
bb65e45614 rsx: Implement GPU acceleration for rotated images 2019-03-17 21:50:11 +03:00
kd-11
5260f4b47d rsx: Improvements to memory flush mechanism
- Batch dma transfers whenever possible and do them in one go
- vk: Always ensure that queued dma transfers are visible to the GPU before they are needed by the host
  Requires a little refactoring to allow proper communication of the commandbuffer state
- vk: Code cleanup, the simplified mechanism makes it so that its not necessary to pass tons of args to methods
- vk: Fixup - do not forcefully do dma transfers on sections in an invalidation zone! They may have been speculated correctly already
2019-03-17 21:50:11 +03:00
kd-11
385485204b vk/gl: Omit unlocked data when grabbing flip sources from texture cache 2019-03-17 21:50:11 +03:00
kd-11
74eeacd091 vk/gl: Improve memory tag sync and test
- Properly pass parameters such as rsx-pitch to the surface store
- Do not crash if a surface fails verification in flip, use fall-back instead
2019-03-17 21:50:11 +03:00
kd-11
1a44446250 rsx: Fix dst upload block region
- The section needed starts at image origin, not transfer origin!
2019-03-17 21:50:11 +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
85cb703633 rsx/cache: Debugging bugs introduced by the atlas coverage check
- Figured out why it breaks things, ofc can't actually check for coverage when there is no proper fbo data persistence
2019-03-17 21:50:11 +03:00
kd-11
3a4083263e rsx: Fix texture transfer when pitch does not match exactly 2019-03-17 21:50:11 +03:00
kd-11
612160a8ff rsx: Fix zero-pitch textures
- Assumption here is that only texel (0, 0) is accessible. Inline with other pitch 0 operations.
- TODO: Verify pitch 0 does not advance in Y either
2019-03-17 21:50:11 +03:00
kd-11
17c49d21a5 rsx/blit: Remove workarounds/hacks added for master. Start implementation/stubs for blit engine rotations in GPU 2019-03-17 21:50:11 +03:00
kd-11
745f8f9627 rsx: Remove pointless assert 2019-03-17 21:50:11 +03:00
Nekotekina
e9b6beadfc SPU LLVM: implement static branch weights
May help branch prediction in some cases
2019-03-13 21:14:55 +03:00
Nekotekina
388d49db80 SPU LLVM: fix SPU MMIO in TSX mode 2019-03-13 21:14:55 +03:00
RipleyTom
980c3d6fe8 Fix lf_queue destructor 2019-03-13 15:59:13 +03:00
Ani
3b01e59cd4 InstallPup: Fix exception on newline trim
Avoid throwing fatal error when installing firmware without a \n character on the version string
Fixes #5646
2019-03-13 03:45:06 +03:00
Nekotekina
a08cd0fe38 Update asmjit 2019-03-13 01:56:43 +03:00
Nekotekina
8623899499 Update 3rdparty/libpng 2019-03-13 01:34:55 +03:00
Nekotekina
6d4c9f2d41 Update 3rdparty/yaml-cpp 2019-03-13 01:33:23 +03:00
Nekotekina
30636f0199 Update 3rdparty/xxHash 2019-03-13 01:32:00 +03:00
Nekotekina
0aa9243557 Update 3rdparty/pugixml 2019-03-13 01:29:31 +03:00
Nekotekina
eae5b9e049 Rewrite mulh64/umulh64
Use __int128_t/__uint128_t idioms on GCC/Clang.
May result in better codegen by avoiding inline asm.
2019-03-13 00:16:43 +03:00
Nekotekina
688aabc6c9 Add _sys_lwmutex_unlock2 syscall name 2019-03-12 23:55:13 +03:00
eladash
4a28319edf Implement SPU page faults notifications
* Implement both RawSPU and threaded SPU page fault recovery
* Guard page_fault_notification_entries access with a mutex
* Add missing lock in sys_ppu_thread_recover_page_fault/get_page_fault_context
* Fix EINVAL check in sys_ppu_thread_recover_page_fault, previously when the event was not found begin() was erased and
CELL_OK was returned.
* Fixed page fault recovery waiting logic:
- Do not rely on a single thread_ctrl notification (unsafe)
- Avoided a race where ::awake(ppu) can be called before ::sleep(ppu) therefore nop-ing out the notification
* Avoid inconsistencies with vm flags on page fault cause detection
* Fix sys_mmapper_enable_page_fault_notification EBUSY check
from RE it's allowed to register the same queue twice (on a different area) but not to enable page fault notifications twice
2019-03-12 13:28:31 +03:00
kd-11
1875dc3f18 gl: Fix buffer size calculations 2019-03-10 16:09:05 +03:00
kd-11
358558aaa7 cleanup and fixups 2019-03-10 16:09:05 +03:00
kd-11
04dda44225 rsx: Properly generate render target data with all parameters provided
- Build-up to variable-sized framebuffers and AA implementation
- Also allows accurate range calculation for our hit testing
2019-03-10 16:09:05 +03:00
kd-11
21bc6c7a87 rsx: Properly resolve data for upload when needed.
- Avoids blindly reusing blit dst sections as they may contain garbage.
  If a section was unlocked for a flush, just discard it as its reuse introduces potential data corruption.
  Since the data needs to be reuploaded anyway (for now), its better to start afresh
- In case of format mismatch, reset the calculated dst block
- Add a bounds check to determine if data contained in an atlas is good enough for sampling the cache.
  If not enough data is provided, fall back to full upload
2019-03-10 16:09:05 +03:00
kd-11
9d4d3d9443 rsx: Reimplement render target intersection tests when using hw accelerated blit engine
- Properly collapse memory tree when scanning in case of overlaps!
2019-03-10 16:09:05 +03:00
kd-11
f4ebcb0029 rsx: Properly decode packed renders from the type flag
- Seems to occupy bits [8-9]
2019-03-10 16:09:05 +03:00
kd-11
7c379432dd rsx: Implement proper pitch compatibility lookup
- When a single row is required or is all that is available, pitch has
no meaning as the coordinate space changed to 1D
2019-03-10 16:09:05 +03:00
kd-11
dccb4a4888 rsx/texture_cache: fixes to commit_framebuffer_memory 2019-03-10 16:09:05 +03:00