Commit graph

1410 commits

Author SHA1 Message Date
kd-11 b74cdcde00 rsx: Make the 3rd texture dimension matter
- Affects cube maps and texture3D surfaces
2017-09-23 16:46:41 +03:00
kd-11 4d83d749a0 rsx: Texture cache fixes
- Update section flags when requested
- Fix nullptr dereference: cached_dest will be null if dst_is_render_target is true
2017-09-23 16:46:41 +03:00
kd-11 d0148728c6 rsx: Fixes
- Fix section scanning range for early reject
- Specify IMAGE_ASPECT_STENCIL when uploading image_from_cpu
2017-09-21 20:05:07 +03:00
kd-11 dfc564f837 gl: Check that fence is not empty before calling destroy 2017-09-21 20:05:07 +03:00
kd-11 3499d089e7 rsx: Texture cache fixes and improvements
rsx: Conditional lock hack removed
vulkan - Fixes
- Remove unused texture class
- Fix native pitch calculation (WCB)
rsx: Catch hanging begin/end pairs when flushing deferred draw calls
vulkan: Register DXT compressed formats
vulkan: Register depth formats
gl: Workaround for 'texture stitching' when gathering flip surface
- TODO: Add a proper flip hack option
rsx: Fix texture memory size calculation
- DXT textures dont have real pitch. Since pitch is used to calculate memory size, make sure it always evaluates to rsx_size
rsx: Fix cpu copy detection
rsx: Validate blit dst surface and dont make assumptions about region blit order
- Also relax restrictions on memory owned by the blit engine if strict rendering is not enabled
rsx: Fix depth texture detection
rsx: Do not manually offset into dst. The overlapped range check does so automatically
rsx: Minor optimizations
rsx: Minor fixes
- Fix to detect incompatible formats when using GPU texture scaling and show message
- Better 'is_depth_texture' algorithm to eliminate false positives
2017-09-21 16:17:06 +03:00
kd-11 6b96a2022a rsx: Add support for non-projective shadow sampling
- Fixes missing shadows in persona 5

vk: Enable polygon depth bias a.k.a polygonOffset
- Fixes shadow acne in persona 5
2017-09-21 16:17:06 +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 10e25eb362 rsx: Fix multidraw range splits again
rsx: Hotfix for disjoint range detection
2017-09-21 16:17:06 +03:00
kd-11 45d0e821dc gl: Minor optimizations
rsx: Texture cache - improvements to locking
rsx: Minor optimizations to get_current_vertex_program and begin-end batch flushes
rsx: Optimize texture cache storage
- Manages storage in blocks of 16MB
rsx/vk/gl: Fix swizzled texture input
gl: Hotfix for compressed texture formats
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 07c83f6e44 gl: cleanup; fix program linkage on mesa using GL_ARB_explicit_uniform_location, also make use of ARB_multidraw 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 abb56a354d rsx: Bug fixes and improvements
rsx: Try to skip unknown commands without discarding entire cb
2017-09-21 16:17:06 +03:00
kd-11 9359b8c170 rsx/fp: Shader decompiler fixes
- Requires proper 2-pass impl
rsx/fp: Catch hanging code blocks
rsx/fp: Don't pause on scaling error
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 deb590cb05 rsx/vk: Bug fixes
- Make each frame context own its own memory
- Fix GPU blit
- Fix image layout transitions in flip

vk: Improve frame-local memory usage tracking to prevent overwrites
- Also slightly bumps VRAM requirements for stream buffers to help with running out of storage
- Fixes flickering and missing graphics in some cases. Flickering is still there and needs more work
vk: Up vertex attribute heap size and increase the guard size on it
vulkan: Reorganize memory management
vulkan: blit cleanup
vulkan: blit engine improvements
- Override existing image mapping when conflicts detected
- Allow blitting of depth/stencil surfaces
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
myfreeweb 07af701afe Vulkan: use pkg-config instead of checking for Linux (#3440)
Makes Vulkan optional on Linux / makes it possible on FreeBSD.
2017-09-14 21:02:09 +03:00
kd-11 2e9405db4c rsx: Remove index expansion for quad strips 2017-08-26 21:53:54 +03:00
kd-11 fe5828cb47 rsx: Implement QUAD_STRIP
- QUAD_STRIP evaluates to TRIANGLE_STRIP in memory. The memory layout is identical.
- The only difference between the two modes would be the primitive_ID but that doesnt matter on RSX
- Its worth noting that results will be different between the two modes if input vertices are non-coplanar for every set of N verts
2017-08-26 21:53:54 +03:00
kd-11 e56d8db6a3 gl: Do not modify bound depth/stencil buffers bound to zcull memory
- Fixes some rare cases where zcull always fails
2017-08-26 21:53:54 +03:00
kd-11 e76b6e3f27 gl: Workaround for restrictive z range 2017-08-26 21:53:54 +03:00
kd-11 9a7ce2fd29 rsx/vp: ARL fix 2017-08-26 21:53:54 +03:00
kd-11 462b93f62c vulkan: Gracefully handle back-to-back flip request spam 2017-08-26 21:53:54 +03:00
kd-11 f71f67c4ff rsx: Make fragment state dynamic to reduce shader permutations 2017-08-26 21:53:54 +03:00
kd-11 8358bda133 gl/rsx: Fixes to zcull pixel counting 2017-08-26 21:53:54 +03:00
Zangetsu38 37bc2b3bb9 rsx: implement pixel size 16. 2017-08-21 17:32:21 +03:00
Jake 5d7c454e52 rsx: Vertex Decompiler, fix sca register assignment 2017-08-19 12:27:53 +03:00
Jake 4d5f98017f d3d12: ignore 0 sized rt dma copy 2017-08-19 12:27:53 +03:00
Jake 7ecf6cb014 rsx: Ignore sending system reserved semaphores to renderer 2017-08-19 12:27:53 +03:00
Danila Malyutin 9d1aebce74 Silence some obvious warnings
Makes travis logs a bit cleaner
2017-08-18 23:09:52 +03:00
kd-11 f21a3069a5 vulkan: Don't keep invalidated objects around too long
Games like Tales of Vesperia seem to be using a random memory allocator with very low collision chance.
This means objects are very unlikely to be reused in such games leading to pile-up
2017-08-18 16:51:38 +03:00
kd-11 a8b989b51d vk: Improve window resize handling
- Be careful not to request images not available
- Request a triple buffer at all times if available to keep acquisition from locking up
2017-08-18 16:51:38 +03:00
kd-11 142bfb5250 rsx: Fix immediate indexed drawing 2017-08-18 16:51:38 +03:00
kd-11 334327df67 rsx: Add a success message on program compile completion
- Should help users wondering if rpcs3 'froze' during shader compile
2017-08-16 23:58:30 +03:00
kd-11 2400210144 vk: Reimplement access violation sync handling 2017-08-16 23:58:30 +03:00
kd-11 1b1c300aad vulkan: Restructure frame queues 2017-08-16 23:58:30 +03:00
kd-11 531b03e7af vk: Catch leaking imageview refs on resize 2017-08-16 23:58:30 +03:00
kd-11 650c1c64f1 gl: Workarounds for intel GPUs which dont seem to be truly GL4 compliant 2017-08-16 23:58:30 +03:00
kd-11 2fd4726919 rsx: Fix single vertex array input declarations 2017-08-16 23:58:30 +03:00
kd-11 b86745ee4e gl: Fix vsync; always use adaptive vsync instead of double-buffered 2017-08-16 23:58:30 +03:00
kd-11 c04aa05398 rsx: Shader pipeline fixes and improvements
- Do not set zfunc if alphakill is not enabled. This is because at the moment alphakill requires a different shader to be built

- use glsl loop-unroll friendly comparison; skip vertex input compare if either key requests it

- Minor tweaks to fp key generation
2017-08-16 23:58:30 +03:00
kd-11 3c9bab8563 ui: Move disable vertex cache to debug. Also add an option to disable zcull emulation in the debugger 2017-08-16 23:58:30 +03:00
kd-11 6eb1786635 rsx: Clamp depth range to [0,1]
- Fixes remaining issues with Ni no Kuni
2017-08-16 23:58:30 +03:00
kd-11 bbf2a97d2e rsx: Zero-initialize the vertex register block
- Some games reference constant regs that they never initialize
2017-08-16 23:58:30 +03:00
kd-11 00c6a589a5 rsx/util: Add simple consistent hash function
rsx/vk/shaders_cache: Move vp control mask to dynamic state

rsx/vk/gl: adds a shader cache for GL. Also Separates pipeline storage for each backend

rsx: Add more texture state variables to the cache
2017-08-16 23:58:30 +03:00
kd-11 c7dca1dbef rsx/vk: Implement shaders cache and fix broken pipeline_storage comparison and hash
- Fix pipeline state storage to uniquely store each pipeline variant
- Adds a progress bar to indicate loading is taking place
2017-08-16 23:58:30 +03:00
kd-11 1da732bbf5 rsx/gl/vk: Invalidate texture regions when memory is unmapped
- Free GPU resources immediately if mappings change to avoid leaking VRAM
2017-08-16 23:58:30 +03:00