Commit graph

189 commits

Author SHA1 Message Date
Nekotekina
9ef00b4a12 RSX: Rewrite frame limit 2017-11-15 21:00:02 +03:00
kd-11
b2a7eee1ec rsx: Bump shader cache ver and fix blit engine crash
- Disables blit operations if the target will have a size of 0 in any dimension
- Bumps shader cache ver to 1.1
2017-11-09 14:39:50 +03:00
kd-11
173d05b54f rsx: Optimizations
- Reimplement fragment program fetch and rewrite texture upload mechanism
-- All of these steps should only be done at most once per draw call
-- Eliminates continously checking the surface store for overlapping addresses as well

addenda - critical fixes
- gl: Bind TIU before starting texture operations as they will affect the currently bound texture
- vk: Reuse sampler objects if possible
- rsx: Support for depth resampling for depth textures obtained via blit engine

vk/rsx: Minor fixes
- Fix accidental imageview dereference when using WCB if texture memory occupies FB memory
- Invalidate dirty framebuffers (strict mode only)
- Normalize line endings because VS is dumb
2017-11-08 13:15:34 +03:00
kd-11
e4ef85b6e0 rsx: Experimental; Try to calculate pixel offset using nv3062 pitch register since we know the target block is defined with 3062 registers 2017-11-02 14:35:19 +03:00
kd-11
479aa91368 rsx: Add a debug option to force full software emulation of blit engine 2017-10-14 14:19:14 +03:00
kd-11
3836b40bf7 rsx: Fixups 2017-09-21 16:17:06 +03:00
kd-11
571dbfb7b1 rsx: Texture cache improvements
- Limits buffer size to min 720 in the Y axis (1024 section causes conflicts in some cases - TODO)
rsx: Fixups to allow large textures for blit operation
- Also includes checks for both leaking sections and blit regions for vulkan
hotfix for hanging when using WCB
addendum - unlock both ro and no blocks before attempting to copy memory blocks
gl: Fixups for ARB_explicit_uniform_location
- Forces glsl v 430 to make use of the extension
rsx/vk: Rework texture cache to minimize recursive access violations
- Also modifies the vulkan commandbuffer begin/end/submit mechanism
gl: Fix cached_texture_section::is_flushable to take memory protection into account
rsx: Fix blit dst offset calculation
2017-09-21 16:17:06 +03:00
kd-11
e37a2a8f7d rsx: Texture cache fixes and improvments
gl/vk/rsx: Refactoring; unify texture cache code
gl: Fixups
- Removes rsx::gl::texture class and leave gl::texture intact
- Simplify texture create and upload mechanisms
- Re-enable texture uploads with the new texture cache mechanism
rsx: texture cache - check if bit region fits into dst texture before attempting to copy
gl/vk: Cleanup
- Set initial texture layout to DST_OPTIMAL since it has no data in it anyway at the start
- Move structs outside of classes to avoid clutter
2017-09-21 16:17:06 +03:00
kd-11
061824a7ec rsx: Add support for batched multidraw
gl: Fix multidraw [WIP]
rsx: Ignore vertex base when data source is generated using arithmetic
vk: Check pending flag before doing fence poke
vk/gl: Fix for inlined array and immediate draws
rsx: Collapse joined draws when batching
2017-09-21 16:17:06 +03:00
kd-11
2d0f1f27a8 esx: Fixes to the texture cache
rsx: Blit engine improvements
- Always handle blits to and from framebuffers through the GPU
- Handle depth surfaces properly when using GL
- Check for format mismatches when blitting to the surface store [WIP]
2017-09-21 16:17:06 +03:00
kd-11
73312fc363 rsx: Several fixes and improvements
- Do not ignore non-centered pixel blitting
- Register method ac00+16
- Bump texture memory heap to account for GPU texture scaling requirements (vulkan)
- Explicit MRT location index output to better convey intent (openGL)
2017-09-21 16:17:06 +03:00
kd-11
2033f3f7dc rsx/vk/gl: Refactoring and reimplementation of blit engine
Fix rsx offscreen-render-to-display-buffer-blit surface reads
- Also, properly scale display output height if reading from compressed tile

gl: Fix broken dst height computation
- The extra padding is only there to force power-of-2 sizes and isnt used

gl: Ignore compression scaling if output is rendered to in a renderpass

rsx/gl/vk: Cleanup for GPU texture scaling. Initial impl [WIP]
- TODO: Refactor more shared code into RSX/common
2017-09-21 16:17:06 +03:00
kd-11
8358bda133 gl/rsx: Fixes to zcull pixel counting 2017-08-26 21:53:54 +03:00
Jake
7ecf6cb014 rsx: Ignore sending system reserved semaphores to renderer 2017-08-19 12:27:53 +03:00
kd-11
d54c2dd39a gl: Move vertex processing to the GPU
- Significant gains from greatly reduced CPU work
- Also reorders command submission in end() to improve throughput

- Refactors most of the vertex buffer handling
- All vertex processing is moved GPU side
2017-08-16 23:58:30 +03:00
kd-11
4c019c55d2 rsx/gl: Fix zcull queries and log conditional render modes
- Fixes a situation where a query readback is requested while zcull render is still active
2017-08-10 00:16:20 +03:00
kd-11
fcb7072fee Implement hardware zcull emulation
rsx/gl: Support s1 immediate values; ogl minor refactoring
2017-08-06 14:29:42 +03:00
RipleyTom
2d7e91ba8a Yield instead of sleeping rsx thread. (#3158)
Another Yield
2017-08-06 01:46:01 +01:00
Jake
21dd715b42 sys_rsx: implement support for lle-gcm 2017-08-02 01:33:12 +03:00
Jake
d9a693019b rsx/gcm: Implement rsx dma. Refactor gcm/rsx to not be as codependent 2017-08-02 01:33:12 +03:00
kd-11
b95ffaf4dd rsx: Implement skip draw. Also, start working on MT vertex upload 2017-07-08 14:52:16 +03:00
Nekotekina
d86858da64 Fix tabs 2017-06-24 14:25:11 +03:00
kd-11
b2e906f4cc rsx: Code cleanup. Fixes several dozen warnings
- Wrap unused parameters as comments to prevent C1400
- Fix sized variable conversions with explicit casts
2017-06-22 23:36:15 +03:00
kd-11
5c6cf77c57 rsx: Register NV4097_SET_COLOR_KEY_COLOR method. 2017-06-22 23:36:15 +03:00
kd-11
423fd4a388 rsx: Fix stencil initial values 2017-06-22 23:36:15 +03:00
kd-11
9aa632bcc1 rsx/vk: Fixes for ring buffer allocation and image clipping (#2850) 2017-06-10 23:32:17 +03:00
Nekotekina
f010b5b235 Configuration simplified 2017-05-20 16:01:48 +03:00
scribam
299f627321 Stub cell (#2785)
* Update cellGcmSys

* Update cellStorage

* Update cellSubdisplay

* Update sceNpTrophy
- Use error_code as return type
- Add few checks

* Update cellKey2char

* Update cellKb:
- Use error_code as return type
- Replace UNIMPLEMENTED_FUNC by .todo

* Update cellNetCtl

* Update cellSpudll

* Update cellSysutilAp

* Update cellUserInfo

* Stub sys_mempool_allocate_block (bad idea)
2017-05-15 14:30:14 +03:00
kd-11
adefd1fd63 rsx/ui: Add config toggle for GPU texture scaling/blit 2017-04-08 23:12:09 +03:00
kd-11
6d6d0e4e36 gl: Use the GPU to scale textures; use ARB_sampler_object
Improve scaling and separate sampler state from texture state

gl: Unify all texture cache objects under one structure separate by use case
gl: Texture cache fixes

- Acquire lock when finding matching textures
- Account for swizzled surfaces when deciding whether to cpu memcpy
- Handle swizzled images on the GPU
2017-04-08 23:12:09 +03:00
kd-11
d94986ff0d rsx: Set up hw accelerated blit 2017-04-08 23:12:09 +03:00
kd-11
909f3e9b3e rsx: Support indexed immediate draw via ArrayElement method 2017-03-29 23:06:17 +03:00
kd-11
70d3a6d840 rsx: Support more base types for immediate rendering
fix alignment
2017-03-26 16:22:53 +03:00
kd-11
79d114cc06 rsx: Support immediate mode rendering 2017-03-26 16:22:53 +03:00
kd-11
34c2b8a55e rsx: recover from FIFO parse errors
- Validate FIFO registers before access

-- Validate the args ptr separate from the get ptr
2017-03-24 09:30:23 +03:00
kd-11
be4bb48476 rsx/fp: Fix some decompiler bugs 2017-03-13 23:40:34 +03:00
Jake
c3b424eb11 rsx: image_in fix for clipx/y (#2440) 2017-02-28 16:21:07 +08:00
Jake
a886e28f87 Fix nv3089_image_in
- Restrict clip_x/y
- Remove double offset addition
2017-02-17 18:33:56 -06:00
Nekotekina
598c90f376 PPU thread scheduler 2017-02-13 22:26:11 +03:00
Nekotekina
763550c472 0x2c8..0x2fc 2017-02-13 17:50:04 +03:00
Oil
1669d0fdbd Minor changes (#2352)
* More initial values for rsx method registers

* Implemented spu decrementer event

* Remove u32 cast
2017-02-07 23:59:59 +03:00
O1L
bf33a1827c Set default values for NV4097_SET_SURFACE_FORMAT register 2017-02-04 19:32:54 +03:00
Zangetsu38
bd6a7dea7e rsx: Fix error context dma 2017-01-31 14:37:31 +01:00
Nekotekina
a5a2d43d7c Thread.cpp refinement
Hide thread mutex
Safe notify() method
Other refactoring
2017-01-29 19:52:19 +03:00
Cornee Traas
435ef04c34 Bind SET_POLYGON_STIPPLE_PATTERN (#2259)
Causes MGS4 to boot a little bit further
2017-01-20 10:48:17 +08:00
vlj
8f5e94c155 rsx: Set default attribute format to float. 2016-09-22 15:44:59 +02:00
vlj
f87e396958 rsx: Dump DRAW_ARRAYS and DRAW_INDEX_ARRAYS. 2016-09-17 23:37:52 +02:00
vlj
03c86ae43b rsx: Move inline array to draw_clause structure. 2016-09-17 23:37:52 +02:00
vlj
11858dce1a rsx: Vertex array attributes don't need to be stored outside of regs. 2016-08-27 15:40:41 +02:00
vlj
a64053fd68 rsx: Remove some unused code. 2016-08-27 15:40:41 +02:00