Commit graph

45 commits

Author SHA1 Message Date
kd-11 89c548b5d3 rsx: fbo fixes 2.5
- Implement flush-always behaviour to partially fix readback from a currently bound fbo
  - Without this, only the first read is correct, as more draws are added the results become 'wrong'
  - Fixes WCB and cpublit behviour
- Synchronize blit_dst surfaces to avoid data loss when gpu texture scaling is used
  - Its still faster in such cases to disable gpu texture scaling but some types cannot be disabled without force cpu blit (e.g framebuffer transfers)
- Memory management tuning
  - rsx: on-demand texture cache rescanning for unprotected sections
  - rsx: Only framebuffer resources are upscaled
  - Do not resize regular blit engine resources
  - Lazy initialize readback buffer when using opengl
  -- These measures should help minimize vram usage
2018-02-16 16:14:54 +03:00
kd-11 f20fd217f8 rsx: Reorganize framebuffer setup code
- Fixes some fast paths for framebuffer creation and binding
2018-02-16 16:14:54 +03:00
Nekotekina cce0ad0c35 Clean vm::ps3 namespace use 2018-02-09 17:49:37 +03:00
kd-11 ea8bdda9a3 rsx/gl/vk: Support for swizzled? context surfaces
- For some surfaces, dimensions are passed via the log2 bits rather than surface pitch
-- This is similar to the setup for nv406e and probably means the surfaces are padded and swizzled
2018-02-02 10:07:55 +03:00
kd-11 b9cca71c47 gl: API compliance fixes
- Do not assume texture2D when creating new textures
- Flag invalid texture cache if readonly texture is trampled by fbo memory.
  Avoids binding a stale handle to the pipeline and is rare enough that it should not hurt performance
2018-02-02 10:07:55 +03:00
ZeroZero2018 cd8e97a7c6 Fix to B8 format render target swizzling (#4123) 2018-01-29 21:58:25 +03:00
kd-11 71f69d1d48
rsx/overlays: Introduce 'native' HUD UI and implement some common dialogs (#4011) 2018-01-17 19:14:00 +03:00
kd-11 7c7cd4153e rsx: Framebuffer setup fixes
- Sometimes square renders are done to surfaces with pitch=64 and re-uploaded with swizzle scanning
-- This setup avoids discarding targets if they are square and pitch == 64
2017-12-18 10:45:37 +03:00
kd-11 69eb483089 rsx: Framebuffer setup fix
- Stencil flag is meaningless if surface does not support stencil
2017-12-06 12:55:49 +03:00
kd-11 960f26f84e rsx:: fixes for framebuffer setup
- provide a DSV if depth and/or stencil testing is enabled
2017-12-04 18:22:18 +03:00
kd-11 08b829dc22 rsx: wcb scaling fixes 2017-12-01 21:00:50 +03:00
kd-11 9d27ac359b gl: Minor wcb tweaks 2017-12-01 21:00:50 +03:00
kd-11 da1e97618b rsx: Changes to surface pitch handling
- Zeta pitch is ignored by real HW for some reason
- Monitor ptch value changes as well since they may affect disabled surfaces
- TODO: Verify if MRT pitch is really taken into consideration
2017-12-01 21:00:50 +03:00
kd-11 3350e7ee55 rsx: Fixes for framebuffer setup code 2017-12-01 21:00:50 +03:00
kd-11 3bfdcf698d rsx: More tuning for depth/color buffer selection 2017-12-01 21:00:50 +03:00
kd-11 51891039dd rsx: improve depth/color contested memory allocation heuristics
- Needs more tests to prove correct behaviour
2017-12-01 21:00:50 +03:00
kd-11 680ca1d12a rsx: Zcull refactoring and vulkan implementation 2017-12-01 21:00:50 +03:00
kd-11 07f61db24a rsx: Try to take the context for the surface creation into account 2017-12-01 21:00:50 +03:00
kd-11 63f261a66d rsx: Improve framebuffer check heuristics for contested memory buffers 2017-12-01 21:00:50 +03:00
kd-11 33f3a3e014 rsx: Major fixes
- Handle aliased depth + color target by disabling depth writes. This looks to be the correct way
- Add support for generic passes that cannot be done using general imaging operations. Lays the framework for tons of features and effects
- Implement RGBA->D24D8 casting. Sometimes games will split depth texture into RGBA8 then use the new RGBA8 as a depth texture directly
-- This happens alot in ps3 games and I'm not sure why. Its likely the ps3 did not sample fp values with linear filtering so this is a workaround
-- Only implemented for openGL at the moment
-- Requires a workaround for an AMD driver bug
2017-12-01 21:00:50 +03:00
kd-11 8646f51fa3 rsx: Add more validation to framebuffer setups. Game devs sometimes do crazy things 2017-12-01 21:00:50 +03:00
kd-11 3730b9d1da rsx: More fixes
- Support for raster offsets in surface descriptors (looks to be unused)
- Do not tag disabled render targets when using MRT (pitch = 64)
- Add missing notify_surface_changed() call for openGL
2017-11-08 13:15:34 +03:00
kd-11 bbcb6b6851 rsx: Fbo fixes 2
- Use AA mode to predict surface compression. Compression mode is useless without AA activated
- Rewrites most image subresource fetch routines to use the new heuristic
- Fix rsx:🧵:find_tile. FEED000(X) can be substituted for (X) in the code
-- Fixes alot of failures when looking for tiled regions

rsx: Fix antialiased unnormalized coords
- scaling factors are inverse to allow proper coordinates to be computed in fs
2017-11-08 13:15:34 +03:00
kd-11 bf234dc668 rsx: Implement memory tags for strict mode to validate render target memory 2017-10-28 13:26:16 +03:00
kd-11 e9f293f522 rsx: Improve separate treatment of write exceptions vs read exceptions
- Optimizes search functionality and avoids thrashing valid sections
2017-10-24 22:59:09 +03:00
kd-11 5e58cf6079 rsx: Restructuring [WIP]
- Refactor invalidate memory functions into one function
- Add cached object rebuilding functionality to avoid throwing away useful memory on an invalidate
- Added debug monitoring of texture unit VRAM usage
2017-10-24 22:59:09 +03:00
kd-11 a8e1754fa4 rsx: Allow clear_surface command for depth-only passes. Removes invalidate cache hack 2017-10-19 12:22:52 +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 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
kd-11 cb194e06ce gl: Fix framebuffer validity checks 2017-07-24 16:52:42 +03:00
kd-11 9e7a42d057 rsx: Minor bug fixes
- vk: Do not select first available format when choosing a swapchain format
- gl/vk: Ignore rendering zero sized framebuffers/scissors
- fp: Re-enable range clamp on fp16 registers; fix fx12 clamping [-2, 2]
2017-07-08 14:52:16 +03:00
kd-11 590bb7cbe4 rsx: Bug fixes
rsx: Give more info when ring buffer allocations fail
2017-06-22 23:36:15 +03:00
kd-11 798f90dac2 rsx/ui: Make a few settings configurable via the GUI 2017-06-22 23:36:15 +03:00
kd-11 84ae1c5214 gl: Silence log spam 2017-06-22 23:36:15 +03:00
Nekotekina f010b5b235 Configuration simplified 2017-05-20 16:01:48 +03:00
kd-11 5b0fddd3e8 gl/vk: Fix stencil ops 2017-03-25 15:07:43 +03:00
kd-11 fa6114719d gl: Lower restriction on render target pitch 2017-03-13 12:44:28 +03:00
kd-11 1fd33f611c gl: Fix texture cache bugs
Fix endianness bug
Fix r/w when real pitch is <= 64
2017-03-10 19:11:53 +03:00
kd-11 ef8e92cbe3 gl: Change clear timing to immediate
gl: Handle cell write to locked RTT region

addendum: Fix buffer locking (personal 4)
2017-03-01 00:16:55 +03:00
kd-11 7c73c3b75c rsx/gl: Minor refactoring; prepare vulkan backend 2017-03-01 00:16:55 +03:00
kd-11 96561c16ad gl: Rewrite texture cache
gl: scale downloaded RTT images
2017-03-01 00:16:55 +03:00
O1L a809f33418 GL: try to skip incorrectly prepared FBO's. 2017-02-04 19:32:54 +03:00
raven02 530ea688e4 GL: old recompiler clean up (#2142) 2016-09-18 13:19:26 +08:00
Renamed from rpcs3/Emu/RSX/GL/gl_render_targets.cpp (Browse further)