Commit graph

2298 commits

Author SHA1 Message Date
gdk
d3e7606a74 Validation layers should be enabled for any log level other than None 2022-06-17 22:42:35 +01:00
gdk
0dc5a48e6f Fix R4G4B4A4Unorm texture format permutation 2022-06-17 22:42:35 +01:00
gdk
4c7e6df7d1 Add alpha test emulation on shader (but no shader specialisation yet...) 2022-06-17 22:42:35 +01:00
gdk
9a95c3c3bc Update Spv.Generator 2022-06-17 22:42:35 +01:00
gdk
adfba37a3f Fix samplers with MinFilter Linear or Nearest (fixes New Super Mario Bros U Deluxe black borders) 2022-06-17 22:42:34 +01:00
gdk
5738b66b75 Don't make Intel Mesa pay for Intel Windows bugs 2022-06-17 22:42:34 +01:00
gdk
cd01a2f74a Fix triangle overlay on SMO, Captain Toad, maybe others? 2022-06-17 22:42:34 +01:00
riperiperi
393d0a6134 Update findMSB/findLSB to match master's instruction enum 2022-06-17 22:42:34 +01:00
riperiperi
5590811ea3 Don't throw when ending conditional rendering for now
This should be re-enabled when conditional rendering is enabled on nvidia etc.
2022-06-17 22:42:34 +01:00
riperiperi
23b8bd8642 Update counter queue to be similar to the OGL one
Fixes softlocks when games had to flush counters.
2022-06-17 22:42:33 +01:00
riperiperi
d55f664908 Fix PrimitivesGenerated query, disable Transform Feedback queries for now
Lets Splatoon 2 work on nvidia. (mostly)
2022-06-17 22:42:33 +01:00
riperiperi
51bd7454bd Update Silk.NET to version 2.10.1
Somehow, massive performance boost. Seems like their vtable for looking up vulkan methods was really slow before.
2022-06-17 22:42:33 +01:00
riperiperi
d4e4ae60d5 Update to .net6 2022-06-17 22:42:33 +01:00
riperiperi
76a5beeb70 Use current command buffer for unscaled copy (perf)
Avoids flushing commands and renting a command buffer when fulfilling copy dependencies and when games do unscaled copies.
2022-06-17 22:42:33 +01:00
riperiperi
f6c2f7a8d6 Fix storage buffers being lost when bindings are out of order
(also avoid allocations when changing bindings)
2022-06-17 22:42:33 +01:00
gdk
db3a28f731 Fix uniform buffers being lost when bindings are out of order 2022-06-17 22:42:32 +01:00
gdk
a9afcdfa10 Support format aliasing on SetImage 2022-06-17 22:42:32 +01:00
gdk
616f14c46d Fix rebase build break 2022-06-17 22:42:32 +01:00
gdk
ae783c5b5e Fix BGRA on OpenGL backend 2022-06-17 22:42:32 +01:00
gdk
5fbfa9a9bd DrawTexture support 2022-06-17 22:42:32 +01:00
riperiperi
e9222a426a Submit command buffer before Texture GetData. (UE4 fix) 2022-06-17 22:42:32 +01:00
gdk
fa24c41d32 Fix some tessellation related issues (still doesn't work?) 2022-06-17 22:42:32 +01:00
gdkchan
b7bf95c754 Workaround for AMD driver bug 2022-06-17 22:42:31 +01:00
gdkchan
c109410ccd New depth-stencil blit method for AMD 2022-06-17 22:42:31 +01:00
gdkchan
ceeb70a996 TextureStorage should hold a ref of the foreign storage, otherwise it might be freed while in use 2022-06-17 22:42:31 +01:00
riperiperi
c31dda3c1b Support multiple levels/layers for blit.
Fixes MK8D when scaled, maybe a few other games. AMD software "safe" blit not supported right now.
2022-06-17 22:42:31 +01:00
riperiperi
e0edaa177e Allow multithreading shaderc and vkCreateShaderModule
You'll only really see the benefit here with threaded-gal or parallel shader cache compile.

Fix shaderc multithreaded changes

Thread safety for shaderc Options constructor

Dunno how they managed to make a constructor not thread safe, but you do you. May avoid some freezes.
2022-06-17 22:42:31 +01:00
gdkchan
c6fbaf844e No need to initialize attributes on the SPIR-V backend anymore 2022-06-17 22:42:31 +01:00
gdkchan
4513e8b226 WIP Vulkan implementation 2022-06-17 22:42:30 +01:00
riperiperi
68f9091870
Account for res scale changes when updating bindings (#3403)
Fixes a regression introduced by the texture bindings PR.

Also renames TextureStatePerStage, as it's no longer per stage.
2022-06-17 17:41:38 -03:00
riperiperi
99ffc061d3
Optimize Texture Binding and Shader Specialization Checks (#3399)
* Changes 1

* Changes 2

* Better ModifiedSequence handling

This should handle PreciseEvents properly, and simplifies a few things.

* Minor changes, remove debug log

* Handle stage.Info being null

Hopefully fixes Catherine crash

* Fix shader specialization fast texture lookup

* Fix some things.

* Address Feedback Part 1

* Make method static.
2022-06-17 13:09:14 -03:00
gdkchan
d987cacfb7
Fix VIC out of bounds copy (#3386)
* Fix VIC out of bounds copy

* Update the assert
2022-06-17 12:01:52 -03:00
gdkchan
851f56b08a
Support Array/3D depth-stencil render target, and single layer clears (#3400)
* Support Array/3D depth-stencil render target, and single layer clears

* Alignment
2022-06-14 13:30:39 -03:00
gdkchan
b1bd6a50b5
Less invasive fix for EventFd blocking operations (#3394) 2022-06-12 09:29:12 +02:00
gdkchan
70895bdb04
Allow concurrent BSD EventFd read/write (#3385) 2022-06-11 14:58:30 -03:00
RMED24
da64678b49
Update SettingsWindow.glade 2022-06-11 18:32:42 +01:00
gdkchan
830cbf91bb
Ignore ClipControl on draw texture fallback (#3388) 2022-06-11 14:31:17 -03:00
RMED24
a0b42396b0
Update VSync message
Lets the end user know that the VSync option is controlling the guest VSync, not the host. With a message saying that the game may be sped up if if is disabled. I see this being a common issue and hopefully at least one person doesn't make the mistake thanks to this change aha
2022-06-11 18:04:24 +01:00
gdkchan
9a9349f0f4
Fix instanced indexed inline draw index count (#3389) 2022-06-10 23:44:49 -03:00
gdkchan
46cc7b55f0
Fix instanced indexed inline draws (#3383) 2022-06-05 21:24:28 -03:00
gdkchan
dd8f97ab9e
Remove freed memory range from tree on memory block disposal (#3347)
* Remove freed memory range from tree on memory block disposal

* PR feedback
2022-06-05 15:12:42 -03:00
gdkchan
633c5ec330
Extend uses count from ushort to uint on Operand Data structure (#3374) 2022-06-05 14:15:27 -03:00
gdkchan
a3e7bb8eb4
Copy dependency for multisample and non-multisample textures (#3382)
* Use copy dependency for textures that differs in multisample but are otherwise compatible

* Remove allowMs flag as it's no longer required for correctness, it's just an optimization now

* Dispose intermmediate pool
2022-06-05 14:06:47 -03:00
Billy Laws
2073ba2919
Fix a potential GPFIFO submission race (#3378)
The syncpoint maximum value represents the maximum possible syncpt value at a given time, however due to PBs being submitted before max was incremented, for a brief moment of time this is not the case which could lead to invalid behaviour if a game waits on the fence at that specific time.
2022-06-04 21:36:36 +02:00
Billy Laws
d03124a992
Fix 3D semaphore counter type 0 handling (#3380)
Counter type 0 actually releases the semaphore payload rather than a constant zero as was previously thought. This is required by Skyrim.
2022-06-02 19:51:36 -03:00
Mary
59490d54b5
infra: Switch to win10-x64 RID and fix PR comment for Avalonia and SDL2 artifact rename (#3375)
* infra: Switch to win10-x64 RID and fix PR comment for Avalonia and SDL2 artifact rename

* Address gdkchan's comments
2022-06-01 02:01:16 +02:00
gdkchan
e546e5933f
Rewrite SVC handler using source generators rather than IL emit (#3371)
* Implement syscall handlers using a source generator

* Copy FlushProcessDataCache implementation to Syscall since it was only implemented on Syscall32

* Fix wrong argument order in some syscalls

* Delete old Reflection.Emit based syscall handling code

* Improvements to the code generation

* ControlCodeMemory address and size is always 64-bit
2022-05-31 17:12:46 -03:00
gdkchan
0c87bf9ea4
Refactor CPU interface to allow the implementation of other CPU emulators (#3362)
* Refactor CPU interface

* Use IExecutionContext interface on SVC handler, change how CPU interrupts invokes the handlers

* Make CpuEngine take a ITickSource rather than returning one

The previous implementation had the scenario where the CPU engine had to implement the tick source in mind, like for example, when we have a hypervisor and the game can read CNTPCT on the host directly. However given that we need to do conversion due to different frequencies anyway, it's not worth it. It's better to just let the user pass the tick source and redirect any reads to CNTPCT to the user tick source

* XML docs for the public interfaces

* PPTC invalidation due to NativeInterface function name changes

* Fix build of the CPU tests

* PR feedback
2022-05-31 16:29:35 -03:00
gdkchan
9827dc35e1
Allow loading NSPs without a NCA inside (#3364)
* Allow loading NSPs without a NCA inside

* Set isHomebrew as true
2022-05-31 16:16:59 -03:00
riperiperi
448723d3b3
Don't force DPI aware on Avalonia - it already has it covered. (#3354) 2022-05-21 23:32:50 +02:00