Commit graph

248 commits

Author SHA1 Message Date
kd-11 1677618c75 rsx: Implement stippled rendering 2020-05-30 14:47:10 +03:00
xddxd f56b362769
rsx: Copypasta fix (#8289) 2020-05-25 20:07:11 +01:00
kd-11 bd41a108d8 nv3089: Account for subpixel addressing
- Those strange offsets noted in some games seem to match to subpixel addressing.
  For example, when scaling down by a factor of 4, a pixel offset of 2 will end up inside pixel 0 of the output
2020-05-24 11:31:37 +03:00
Eladash 377e2ce3e8
rsx: Write 4-byte long data to all semaphores (#8246)
* rsx: Write 4-byte long data to all semaphores
2020-05-17 17:48:35 +03:00
Eladash 8a0425570c
rsx: Fix data written to RSX semaphores and the initial data of them (#8235) 2020-05-16 09:55:56 +01:00
Eladash e407018bb5 rsx: Write ref+get atomically
May contribute to better FIFO synchronization in some cases.
2020-04-11 21:21:15 +03:00
Eladash 36fd1d0f0d
rsx: Optimize transform constants load methods (#7992) 2020-04-09 15:53:43 +03:00
Eladash 3f48450408 sys_rsx: Minor atomicity fixes 2020-04-07 20:43:28 +03:00
Megamouse b1fdbc7fcc Move some format functions 2020-04-06 20:59:58 +02:00
Eladash 72d1efa383 rsx: Batch transform contants load methods 2020-04-05 15:21:56 +03:00
Eladash 72c0aed4c1 rsx: Reset vertex program/constants at each boot 2020-04-02 20:42:12 +03:00
Eladash c2c5005278 rsx: Fix and improve fp program data invalidation 2020-04-02 20:42:12 +03:00
Eladash 2ed370093e rsx: Get rid of invalid_command_interrupt_raised 2020-04-02 20:42:12 +03:00
Eladash d97e9f7b4a rsx: Batch vertex program load methods 2020-04-02 20:42:12 +03:00
Eladash 4215499b7f rsx: Fix typo in NV4097_SET_TRANSFORM_PROGRAM range 2020-03-28 11:07:34 +03:00
Eladash 158e34faca rsx: Reset all method registers at rsx_state::init() 2020-03-25 17:51:59 +03:00
Eladash 768b4f8c65 rsx: Improve NV308A_COLOR
* Fix NV308A_COLOR methods range.
* Batch NV308A_COLOR methods execution together.
* Fix termination of bind_range<> in rsx methods binding.
2020-03-25 17:51:59 +03:00
Eladash 377e06a4a2 rsx: Fix unknown Blend equation 2020-03-15 09:53:15 +03:00
Eladash c04abac630 rsx capture: Fix exceptions handler, fix tiny race condition on capture new capture 2020-03-12 21:36:43 +01:00
Eladash 636ed4a48b HLE cellGcmSys: Avoid calling sys_rsx syscalls in rsx code 2020-03-09 16:07:14 +03:00
Nekotekina Aux1 250736ece5 Fix warnings in emucore 2020-03-04 21:23:34 +03:00
Nekotekina 7069e7265f RSX: move g_dma_manager to g_fxo 2020-02-23 13:12:50 +03:00
Nekotekina 92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 2020-02-19 22:54:58 +03:00
Eladash df8d0cde4a RSX/SPU: Accurate reservation access 2020-02-19 18:11:30 +00:00
Megamouse fe75311be2 move config structs to own files and clean up some headers 2020-02-17 15:08:17 +03:00
Eladash 07f300a14e rsx: ZCULL typo fix 2020-02-14 17:11:26 +03:00
Eladash bdab26ec09 rsx: rewrite io mappings
Along with some with fixes to cellGcmSys HLE.
2020-02-10 21:39:39 +00:00
Eladash b7043ce000 Make rsx::get_address report caller location 2020-02-08 22:18:56 +03:00
kd-11 c64935f9dd rsx: Clean up graphics state notifications and add notification for change in point size
- Adds a backend notification when point size changes.
- Refactors all those separate notifiers into one reusable template.
2020-02-08 18:13:05 +03:00
Nekotekina c0f80cfe7a Use attributes for LIKELY/UNLIKELY
Remove LIKELY/UNLIKELY macro.
2020-02-05 10:42:34 +03:00
Nekotekina 15391f45d0 Modernize RSX logging (rsx_log variable) 2020-02-01 11:52:22 +03:00
kd-11 adcc3e9c4b rsx: Optionally sync on texture read semaphore
- Some games use texture semaphore for zcull sync which is rather bizzare.
  However, it works on realhw as the depth test happens before fragment shader completion
- Due to the high performance penalty incurred by this act, this
behavior is only enabled by the "strict rendering mode" option.
2020-01-21 22:21:51 +03:00
Eladash 85695c8bac rsx: FIFO wake-up pause control 2020-01-15 19:54:23 +03:00
kd-11 7786681954 rsx: Improve MTRSX synchronization
- Properly synchronize DMA transfers when handling RSX pipeline
barriers. Texture read barrier is used to signify completion of DMA
routines and is often used to signal that Cell can overwrite vertex
data!
2020-01-03 10:35:53 +03:00
kd-11 5be7f08965 rsx: Restructure ZCULL report retirement
- Prefer lazy retire model. Sync commands are sent out and the reports will be
  retired when they are available without forcing.

- To make this work with conditional rendering, hardware support is
  required where the backend will automatically determine visibility by
  itself during rendering.
2019-12-29 13:49:46 +03:00
kd-11 8dfea032f2 rsx: Remove deprecated do_method path that has been superceded by c++ inheritance for many years 2019-12-29 13:49:46 +03:00
Eladash 6a926daee7 rsx: Delay FIFO recovery point creation if is in in_begin_end scope (#7080) 2019-12-12 15:38:56 +03:00
Eladash 7260af032e rsx: Ignore or recover from unknown primitives
This also fixes a bug when recovering FIFO or creating such recovery point inside in_begin_end == true scope.
2019-12-11 00:11:12 +03:00
Nekotekina 377e7d2a73 C-style cast cleanup VI 2019-12-04 17:56:22 +03:00
kd-11 2a8f2c64d2 rsx: Implement report transfer deferring
- Allow delaying report flushes triggered by image_in or buffer_notify
- When the report is ready, all the delayed transfers will automatically
be done.
- TODO: Make this configurable?
2019-11-04 18:48:41 +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 5de0005f5a rsx: Report full method range on invalid methods
Also report full command on fifo desync event for the first time
2019-10-21 15:31:45 +03:00
eladash 730e9cde84 sys_rsx: Improve allocations and error checks
* allow sys_rsx_device_map to be called twice: in this case the DEVICE address retrived from the previous call returned
* Add ENOMEM checks for sys_rsx_memory_allocate and sys_rsx_context_allocate
* add EINVAL check for sys_rsx_context_allocate if memory handle is not found
* Separate sys_rsx_device_map allocation from sys_rsx_context_allocate's
* Implement sys_rsx_memory_free; used by cellGcmInit upon failure
* Added context_id checks
* Throw if sys_rsx_context_allocate was called twice.
2019-10-21 15:31:45 +03:00
Eladash 397007cf8b rsx: Fix FIFO_DRAW_BARRIER substituation 2019-10-11 12:34:53 +03:00
Eladash 9242f16560 rsx: Improve FIFO recovery from flip 2019-10-10 19:34:23 +03:00
Eladash 06017cb14e rsx: Recover from invalid writes to CELL_GCM_NV4097_SET_INDEX_ARRAY_DMA
Also: Trigger a FIFO recovery when encountering an invalid method.
2019-10-10 19:34:23 +03:00
Eladash 2eaf5df60b rsx: Register some more methods 2019-10-10 19:34:23 +03:00
Eladash 0b2fa6ffdc rsx: Flush FIFO GET before smeaphore_acquire 2019-09-30 17:30:15 +03:00
Nekotekina bd1a24b894 Tidy endianness support (se_t) implementation
Move se_t and se_storage to util/endian.hpp
Use single template instead of two specializations.
Add minor optimization for MSVC.
Remove v128 dependency.
Try to enable intrinsics for unaligned data.
Fix minor bug in u16/u32/u64 specializations.
2019-09-28 15:39:50 +03:00
kd-11 7fdb4976d8 rsx: Remove log spam for cond render 2019-09-12 14:08:21 +03:00