Commit graph

801 commits

Author SHA1 Message Date
kd-11
299b98b30a vk: Disable mipmap sampling if sampling mode is does not have a mipmap filtering mode.
- GL_LINEAR and GL_NEAREST always sample LOD0 so make vulkan behave the same way
2019-10-18 14:46:37 +03:00
kd-11
bd1bcc6be7 vk: Remove a redundant memory barrier 2019-10-18 14:46:37 +03:00
kd-11
70642484cd vk: Check for cyclic references if sampler is marked as do-not-cache.
- Usually an indication of surface/texture cache interaction.
2019-10-18 14:46:37 +03:00
kd-11
eee2237e19 rsx: Track uncached cache resources
- Uncacheable resources can be reused as soon as they're made visible to the draw call.
- Since they're likely to be reused every draw call until the shader changes, it is important to reuse as much as possible
2019-10-18 14:46:37 +03:00
kd-11
decf9cfcf6 rsx: Notify the backend to release or delete temporary surfaces after we're done with them. 2019-10-18 14:46:37 +03:00
kd-11
97ed95d21b vk: Add video memory manager to monitor VRAM usage 2019-10-18 14:46:37 +03:00
kd-11
5af8a9fbbc rsx: Fix decoding of some fixed point texture parameters
- Checked envydocs and found the correct format as fixed-point 4.8 with optional sign bit
2019-10-17 18:18:00 +03:00
kd-11
840b52fe80 rsx: Implement mipmap gathering from texture cache 2019-10-17 18:18:00 +03:00
kd-11
d6d8766f8d rsx: Refactoring
- Move some helper routines out of the cache core
- Prep for multi-layered image search
2019-10-17 18:18:00 +03:00
kd-11
cb362b4085 rsx: Runtime check on RTT cast 2019-10-17 02:30:03 +03:00
kd-11
5c7bbb3354 vk: Fixup
- Removes incorrect line writing stencil flags to a regular texture.
2019-10-17 02:30:03 +03:00
kd-11
d29b6cdb59 vk: Proper workaround for VEGA float16_t bugs 2019-10-16 22:40:50 +03:00
kd-11
a6e143254a vk: Add workaround for broken format conversion in older GeForce cards 2019-10-16 22:40:50 +03:00
kd-11
4f088a102c vk: Add kepler and maxwell tables 2019-10-16 22:40:50 +03:00
Markus Stockhausen
4d99169d51 Patch v2 for vkCreateInstance()
as requested
2019-10-11 21:16:36 +03:00
Markus Stockhausen
8adcb8046b Patch for vkCreateInstance()
patch as requested
2019-10-11 21:16:36 +03:00
Markus Stockhausen
f5817cb430 Error handling for vkCreateInstance()
Cry in log if initialization failed.
2019-10-11 21:16:36 +03:00
kd-11
305a5bd717 typo fix 2019-10-05 12:01:46 +03:00
kd-11
4a19a2dd24 rsx: Explicity describe transfer regions for both source and destination blocks 2019-10-04 18:10:46 +03:00
kd-11
bcf8799079 rsx: Fix missing point size export
- Sometimes program-point-size is enabled, but the vs does not actually
write to the point size register. In this case, pass the incoming point
size along instead of the default register init.
2019-09-30 01:40:04 +03:00
kd-11
8cfd3b56d6 vk: Increase wait timeout in case of problematic GPU loads causing heavy stutter
- When compiling LLVM objects, it is possible to starve the driver thread and cause the timeouts to trigger
- Observed in RE6 when using SPU LLVM since the game generates a very large number of objects "infinitely"
2019-09-29 11:39:22 +03:00
kd-11
69c090b14a vk: Check frame descriptors before rendering in case of a flip request between begin() and end()
- There is no reason to delay async flip requests since most of the work can be handled during rendering anyway
2019-09-29 11:39:22 +03:00
kd-11
2275259bf5 rsx: Properly scale overlay passes to match drawable area 2019-09-28 13:24:14 +03:00
kd-11
ee0633f43a vk: Add turing workaround
- Turing crashes if using the depth->color transfer hack
2019-09-26 20:12:25 +03:00
kd-11
acc986be3f vk: Add chip family detection 2019-09-26 20:12:25 +03:00
kd-11
e0005ec347 rsx: Refactoring and improvement
- Separate displayed statistics from actual backend statistics.
  Allows asynchronous flipping to work correctly as it just uses display stats.
  The real stats are used by the frame scope marker to determine behavior like engaging the FIFO optimizer or skipping draw calls correctly.
2019-09-19 23:10:09 +03:00
kd-11
bd4d86f87a vk: Properly test MSAA sample mask when switching between states inside a RSX renderpass.
- Before, these changes would be lost if the same RTT config was used with varying mask setups
2019-09-18 15:42:59 +03:00
kd-11
52e8747b83 rsx: Workaround for exit deadlock
- Avoids games locking up when the stop button is pressed
2019-09-12 23:32:21 +03:00
kd-11
cc313b052f rsx: Improve hit testing when scanning for overlapping surfaces
- Calculate exact sizes when doing hit tests to avoid false negatives
- Defer page checking until actually require to do memory setup
- Introduce align2 helper to do non-pow2 alignments
2019-09-12 23:32:21 +03:00
kd-11
858014b718 rsx: Experiments with nul sink 2019-09-12 23:32:21 +03:00
kd-11
212ac19c11 vk: Reimplement DMA synchronization 2019-09-12 23:32:21 +03:00
kd-11
f06559412e vk: RDB fixup 2019-09-12 23:32:21 +03:00
kd-11
75fcfac00e rsx: Modify find_cached_texture to respect gcm_format. Can pass 0 for "dont care" 2019-09-10 16:54:02 +03:00
kd-11
d1603fbb0b vk: Crop malformed image descriptors
- Some image descriptors (lle vdec?) are malformed with pitch being smaller than width
- Crop these for now pending hardware tests
2019-09-08 18:22:27 +03:00
kd-11
312bf6840e vk: Fix surface_transform::argb_to_bgra transfers when no scaling is requested 2019-09-08 13:56:41 +03:00
kd-11
cbce309199 vk: Fix depth_stencil scaling 2019-09-08 13:56:41 +03:00
kd-11
440d58f2ff vk: Batch compute jobs when doing texture upload
- Reduces overall number of invocations
2019-09-07 16:23:20 +03:00
kd-11
6aa0b49dbc vk: Prefer using native alignment when uploading.
- Allows using fast copy paths and reduces memory and compute footprint
2019-09-07 16:23:20 +03:00
kd-11
14aa3b3360 vk: Remember to allocate enough vertex layout storage objects!
- vertex_layout_storage descriptors were added but the descriptor count was not updated
2019-09-05 19:43:39 +03:00
kd-11
360c0e9af6 vk: Restructure commandbuffer scoping to allow faults in vertex upload
- Defer renderpass open to allow recovery after fault in the middle of vertex upload
2019-09-05 19:43:39 +03:00
kd-11
756fdedbf6 vk: Warnings cleanup 2019-09-01 18:59:50 +03:00
kd-11
61af2b7dfc vk: Workgroup tuning for different vendors 2019-08-30 21:46:19 +03:00
kd-11
99fb6d6a5d rsx: Allow GPU-accelerated stream manipulation when doing texture uploads 2019-08-30 21:46:19 +03:00
kd-11
e334a43169 rsx: Fix surface cache hit tests
- Avoid silly broken tests due to queue_tag being called before pitch is initialized.
- Return actual memory range covered and exclude trailing padding.
- Coordinates in src are to be calculated with src_pitch, not required_pitch.
2019-08-28 14:54:51 +03:00
kd-11
2962e05f26 rsx: Implement per-RTT color masks
- Also refactors and simplifies some common code in surface store and rsx core
2019-08-27 21:59:02 +03:00
Nekotekina
d2eba2387b Use g_fxo for display_manager 2019-08-27 03:50:15 +03:00
Nekotekina
928719b658 Use g_fxo for rsx::avconf 2019-08-27 03:50:15 +03:00
kd-11
3317e13b64 rsx: Hotfix for semaphore timeout bug
- Add pending flip requests as a reason to invoke the RSX local task handler and release the vblank semaphore
2019-08-26 22:33:29 +03:00
kd-11
eed32cf3a4 rsx: Decompiler fixups and improvements
- Fix 2D coordinate sampling of W coordinate.
  W is actually HPOS.w and not 1. Z is however always 0.
- Optimize register usage a bit
  Disassembling compiled SPV shows that global declaration results in less ops than using inout modifiers. Modifiers generate extra mov instructions.
2019-08-26 20:03:31 +03:00
kd-11
3e28e4b1e0 rsx/decompiler: Restructure program register behavior
- Fix reading of varying registers in FP
  Different registers have different behavior
- Always write to varying registers. If a register is not written to, it is initialized to (0, 0, 0, 1)
- Reimplements two-sided lighting correctly without hacks
- Also bumps shader cache version
2019-08-26 20:03:31 +03:00