Commit graph

156 commits

Author SHA1 Message Date
squidbus
41d64a200d
shader_recompiler: Add swizzle support for unsupported formats. (#1869)
* shader_recompiler: Add swizzle support for unsupported formats.

* renderer_vulkan: Rework MRT swizzles and add unsupported format swizzle support.

* shader_recompiler: Clean up swizzle handling and handle ImageRead storage swizzle.

* shader_recompiler: Fix type errors

* liverpool_to_vk: Remove redundant clear color swizzles.

* shader_recompiler: Reduce CompositeConstruct to constants where possible.

* shader_recompiler: Fix ImageRead/Write and StoreBufferFormatF32 types.

* amdgpu: Add a few more unsupported format remaps.
2024-12-31 06:14:47 +02:00
Quang Ngô
99e1e028c0
texture_cache: Don't read max ansio value if not aniso filter (#1942)
Fix Sonic Forces.
2024-12-28 13:18:56 +02:00
Quang Ngô
0351b864d0
texture_cache: Enable anisotropic filtering (#1872) 2024-12-27 16:47:26 +02:00
¥IGA
cf84c46a49
Fix for D32Sfloat and R8Snorm Tiled image (#1898)
* Fix for D32Sfloat Tiled image

* Fix for R8Snorm Tiled image
2024-12-27 16:43:44 +02:00
¥IGA
3ab118837a
Fix for D16Unorm Tiled image (#1863) 2024-12-25 16:06:12 +02:00
squidbus
a89c29c2ca
shader_recompiler: Rework image read/write emit. (#1819) 2024-12-25 01:13:32 +02:00
Emulator-Team-2
94f861588d
added B5G6R5UnormPack16 format (#1856) 2024-12-23 15:52:29 +02:00
psucien
8abc43a03d
texture_cache: 32bpp and 64bpp macro detilers (#1852)
* added 32bpp macro detiler

* added 64bpp macro detiler

* consider 3d depth alignment in size calculations
2024-12-22 19:43:44 +01:00
squidbus
14dc136832
renderer_vulkan: Various attachment cleanup and fixes. (#1795) 2024-12-22 16:08:48 +02:00
Mahmoud Adel
1e08099036
add R8Uint in image Detiling (#1812)
used by InFamous, and maybe other games
2024-12-18 22:06:30 +02:00
psucien
0fd1ab674b
GPU processor refactoring (#1787)
* coroutine code prettification

* asc queues submission refactoring

* better asc ring context handling

* final touches and review notes

* even more simplification for context saving
2024-12-15 00:54:46 +02:00
squidbus
e752f04cde
shader_recompiler: Fixups from stencil changes (#1776) 2024-12-14 14:33:24 +02:00
squidbus
3e22622508
renderer_vulkan: Remove some fallbacks and misc format queries that are no longer needed. (#1773) 2024-12-14 12:04:30 +02:00
TheTurtle
722a0e36be
graphics: Improve handling of color buffer and storage image swizzles (#1763)
* liverpool_to_vk: Remove wrong component swap formats

* shader_recompiler: Handle storage and buffer format swizzles

* shader_recompiler: Skip unsupported depth export

* image_view: Remove image format swizzle

* Platform support is not always guaranteed
2024-12-13 21:49:37 +02:00
squidbus
028be3ba5d
shader_recompiler: Emulate unnormalized sampler coordinates in shader. (#1762)
* shader_recompiler: Emulate unnormalized sampler coordinates in shader.

* Address review comments.
2024-12-13 21:49:07 +02:00
TheTurtle
cfbd869126
texture_cache: Improve support for stencil reads (#1758)
* texture_cache: Improve support for stencil reads

* libraries: Supress some spammy logs

* core: Support loading font libraries

* texture_cache: Remove assert
2024-12-13 18:28:19 +02:00
Osyotr
7aa868562c
video_core: add eR5G5B5A1UnormPack16 support to the detiler (#1741) 2024-12-12 15:45:59 +02:00
squidbus
714605c6a7
renderer_vulkan: Require exact image format for resolve pass. (#1742) 2024-12-11 21:51:39 +01:00
squidbus
14f7dc3527
cache: Invalidate pages for file reads. (#1726)
* cache: Invalidate pages for file reads.

* texture_cache: Simplify invalidate intersection check.

* vk_rasterizer: Make aware of mapped memory ranges.

* buffer_cache: Remove redundant page calculations.

Called functions will convert to page numbers/addresses themselves.

* file_system: Simplify memory invalidation and add a few missed cases.
2024-12-11 21:11:24 +02:00
¥IGA
51bf98a7b5
Fix for R4G4B4A4UnormPack16 Tiled image (#1738) 2024-12-11 16:07:33 +02:00
squidbus
e5e1aba241
renderer_vulkan: Introduce shader HLE system with copy shader implementation. (#1683)
* renderer_vulkan: Introduce shader HLE system with copy shader implementation.

Co-authored-by: TheTurtle <47210458+raphaelthegreat@users.noreply.github.com>

* buffer_cache: Handle obtaining buffer views partially within buffers.

* vk_shader_hle: Make more efficient

---------

Co-authored-by: TheTurtle <47210458+raphaelthegreat@users.noreply.github.com>
2024-12-10 14:44:08 +02:00
squidbus
f347d3df18
image_view: Correct view format for D16Unorm images as well. (#1708) 2024-12-08 21:53:29 +01:00
Daniel R.
1793fd4df0
format 2024-12-08 16:05:36 +01:00
Daniel R.
0b672a08ac
video_core: improve image cube heuristic 2024-12-08 15:57:51 +01:00
squidbus
7d546f32d8
image_view: Add more BGRA storage format swizzles. (#1693) 2024-12-08 10:19:39 +02:00
¥IGA
2266622dcf
Support for Vulkan 1.4 (#1665) 2024-12-07 19:41:41 +02:00
IndecisiveTurtle
357b7829c3 hot-fix: Silence depth macrotiled warning 2024-12-06 21:50:25 +02:00
psucien
37f4bad2b7
video_core: fix for targets clears and copies (#1670) 2024-12-05 23:09:22 +02:00
squidbus
920acb8d8b
renderer_vulkan: Parse fetch shader per-pipeline (#1656)
* shader_recompiler: Read image format info directly from sharps instead of storing in shader info.

* renderer_vulkan: Parse fetch shader per-pipeline

* Few minor fixes.

* shader_recompiler: Specialize on vertex attribute number types.

* shader_recompiler: Move GetDrawOffsets to fetch shader
2024-12-04 13:03:47 +02:00
psucien
f0b75289c8 video_core: few detiler formats added 2024-12-02 22:24:54 +01:00
Vladislav Mikhalin
18a36c5daa
Fixed false-positive image reuploads (#1557)
* Fixed false-positive image reuploads

* Fixed userfaultfd path, removed dead code, simplified calculations

* oopsie

* track potentially dirty images and hash them

* untrack only first page of the image in case of head access

* rebase, initialize hash, fix bounds check

* include image tail in the calculations
2024-11-26 22:45:15 +02:00
psucien
cd4f48cb8d Revert "hot-fix: downgrade Nx1 2D render targets to 1D" due to regression
This reverts commit cea6d87472.
2024-11-25 22:14:53 +01:00
psucien
cea6d87472 hot-fix: downgrade Nx1 2D render targets to 1D 2024-11-25 20:52:09 +01:00
psucien
3d95ad0e3a
Image binding and texture cache interface refactor (1/2) (#1481)
* video_core: texture_cache: interface refactor and better overlap handling

* resources binding moved into vk_rasterizer

* remove `virtual` flag leftover
2024-11-24 17:07:51 +01:00
TheTurtle
c4506da0ae
kernel: Rewrite pthread emulation (#1440)
* libkernel: Cleanup some function places

* kernel: Refactor thread functions

* kernel: It builds

* kernel: Fix a bunch of bugs, kernel thread heap

* kernel: File cleanup pt1

* File cleanup pt2

* File cleanup pt3

* File cleanup pt4

* kernel: Add missing funcs

* kernel: Add basic exceptions for linux

* gnmdriver: Add workload functions

* kernel: Fix new pthreads code on macOS. (#1441)

* kernel: Downgrade edeadlk to log

* gnmdriver: Add sceGnmSubmitCommandBuffersForWorkload

* exception: Add context register population for macOS. (#1444)

* kernel: Pthread rewrite touchups for Windows

* kernel: Multiplatform thread implementation

* mutex: Remove spamming log

* pthread_spec: Make assert into a log

* pthread_spec: Zero initialize array

* Attempt to fix non-Windows builds

* hotfix: change incorrect NID for scePthreadAttrSetaffinity

* scePthreadAttrSetaffinity implementation

* Attempt to fix Linux

* windows: Address a bunch of address space problems

* address_space: Fix unmap of region surrounded by placeholders

* libs: Reduce logging

* pthread: Implement condvar with waitable atomics and sleepqueue

* sleepq: Separate and make faster

* time: Remove delay execution

* Causes high cpu usage in Tohou Luna Nights

* kernel: Cleanup files again

* pthread: Add missing include

* semaphore: Use binary_semaphore instead of condvar

* Seems more reliable

* libraries/sysmodule: log module on `sceSysmoduleIsLoaded`

* libraries/kernel: implement `scePthreadSetPrio`

---------

Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com>
Co-authored-by: Daniel R. <47796739+polybiusproxy@users.noreply.github.com>
2024-11-21 22:59:38 +02:00
psucien
c55d7fbb6a
Proper MSAA surfaces support (#1560) 2024-11-21 12:08:52 +02:00
psucien
3d04765a3f
Respect game brightness settings (#1559)
* `RendererVulkan` -> `Presenter`

* support for Video Out gamma setting

* sRGB hack removed

* added post process pass to presenter

* splash functionality restored
2024-11-21 12:06:53 +02:00
psucien
e98fab4b58 hot-fix: correct M-tiled surface size calculation when mip is less than a tile 2024-11-21 00:04:46 +01:00
squidbus
e585330744
image_view: Use array view for color/depth buffers with multiple layers. (#1556) 2024-11-20 20:24:30 +02:00
Daniel R.
8b139ff5fa
clang-format 2024-10-30 14:46:22 +01:00
Daniel R.
1620481331
vk_compute_pipeline: Add missing meta check 2024-10-30 14:03:53 +01:00
psucien
a8d2684929 hot-fix: proper calculation of image samples num 2024-10-23 23:11:01 +02:00
TheTurtle
87f8fea4de
renderer_vulkan: Commize and adjust buffer bindings (#1412)
* shader_recompiler: Implement finite cmp class

* shader_recompiler: Implement more opcodes

* renderer_vulkan: Commonize buffer binding

* liverpool: More dma data impl

* fix

* copy_shader: Handle additional instructions from Knack

* translator: Add V_CMPX_GE_I32
2024-10-19 15:30:58 +03:00
psucien
ac6b4a625d hot-fix: address check in mips overlap heuristic 2024-10-17 23:06:58 +02:00
psucien
b4ced58acc hot-fix: a fallback when overlap resolve fails 2024-10-16 23:46:20 +02:00
squidbus
5bb45dc7ba
vulkan: Respect maximum sampler LOD bias. (#1254) 2024-10-06 01:05:24 +03:00
IndecisiveTurtle
ebebafed64 hotfix2: Actually fix errors
Ahhhh
2024-09-27 03:21:08 +03:00
IndecisiveTurtle
cf342e7a4b hotfix: descriptor set lifetime fix 2024-09-27 02:56:50 +03:00
Paris Oplopoios
eef0e6fc63
Fix build on GCC (#1080)
* Fix build on GCC

* Yes thank you clang-format

* Just remove static
2024-09-26 20:39:55 +03:00
oltolm
5a4d5b9f31
use ComPtr in gui_context_menus.h (#719)
* use ComPtr in gui_context_menus.h

* fix pragma diagnostic

* fix compiler warnings
2024-09-25 18:39:04 +03:00