Commit Graph

3538 Commits

Author SHA1 Message Date
sunshineinabox
dcc999c798 Set dirty flag even when value has not changed. 2024-05-27 23:11:39 -07:00
sunshineinabox
7d7b1923aa Resolve
VUID-vkCmdSetPatchControlPointsEXT-None-09422(ERROR / SPEC): msgNum: -1559328192 - Validation Error: [ VUID-vkCmdSetPatchControlPointsEXT-None-09422 ] Object 0: handle = 0x25f0eb40170, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xa30e8a40 | vkCmdSetPatchControlPointsEXT():   extendedDynamicState2PatchControlPoints or shaderObject feature is not enabled. The Vulkan spec states: At least one of the following must be true: The extendedDynamicState2PatchControlPoints feature is enabled The shaderObject feature is enabled (https://vulkan.lunarg.com/doc/view/1.3.283.0/windows/1.3-extensions/vkspec.html#VUID-vkCmdSetPatchControlPointsEXT-None-09422)
    Objects: 1
        [0] 0x25f0eb40170, type: 6, name: NULL
2024-05-27 23:11:39 -07:00
sunshineinabox
de5cb66caf Resolve below validation error
VUID-vkCmdDraw-logicOp-04878(ERROR / SPEC): msgNum: 282117419 - Validation Error: [ VUID-vkCmdDraw-logicOp-04878 ] Object 0: handle = 0x2db247c7370, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x81dc7e0000000305, type = VK_OBJECT_TYPE_PIPELINE; | MessageID = 0x10d0c52b | vkCmdDraw():  VK_DYNAMIC_STATE_LOGIC_OP_EXT state not set for this command buffer. The Vulkan spec states: If the bound graphics pipeline state was created with the VK_DYNAMIC_STATE_LOGIC_OP_EXT dynamic state enabled then vkCmdSetLogicOpEXT must have been called in the current command buffer prior to this drawing command and the logicOp must be a valid VkLogicOp value (https://vulkan.lunarg.com/doc/view/1.3.283.0/windows/1.3-extensions/vkspec.html#VUID-vkCmdDraw-logicOp-04878)
    Objects: 2
        [0] 0x2db247c7370, type: 6, name: NULL
        [1] 0x81dc7e0000000305, type: 19, name: NULL
2024-05-27 23:11:39 -07:00
sunshineinabox
76c9c2ac8c Resolve the below validation errors.
VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-01442(ERROR / SPEC): msgNum: 1313692360 - Validation Error: [ VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-01442 ] | MessageID = 0x4e4d5ac8 | vkCreateGraphicsPipelines(): pCreateInfos[0].pDynamicState has VK_DYNAMIC_STATE_VIEWPORT at pDynamicStates[0] and pDynamicStates[28]. The Vulkan spec states: Each element of pDynamicStates must be unique (https://vulkan.lunarg.com/doc/view/1.3.283.0/windows/1.3-extensions/vkspec.html#VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-01442)
    Objects: 0
VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04132(ERROR / SPEC): msgNum: -206448348 - Validation Error: [ VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04132 ] | MessageID = 0xf3b1d924 | vkCreateGraphicsPipelines(): pCreateInfos[0].pDynamicState pDynamicStates[15] is VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT and pDynamicStates[28] is VK_DYNAMIC_STATE_VIEWPORT. The Vulkan spec states: If the pipeline requires pre-rasterization shader state, and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is included in the pDynamicStates array then VK_DYNAMIC_STATE_VIEWPORT must not be present (https://vulkan.lunarg.com/doc/view/1.3.283.0/windows/1.3-extensions/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04132)
    Objects: 0

VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04133(ERROR / SPEC): msgNum: -858144982 - Validation Error: [ VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04133 ] | MessageID = 0xccd9bf2a | vkCreateGraphicsPipelines(): pCreateInfos[0].pDynamicState pDynamicStates[16] is VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT and pDynamicStates[1] is VK_DYNAMIC_STATE_SCISSOR. The Vulkan spec states: If the pipeline requires pre-rasterization shader state, and VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT is included in the pDynamicStates array then VK_DYNAMIC_STATE_SCISSOR must not be present (https://vulkan.lunarg.com/doc/view/1.3.283.0/windows/1.3-extensions/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04133)
    Objects: 0
2024-05-27 23:11:39 -07:00
sunshineinabox
f30a8f1580 Whitespace 2024-05-27 23:11:39 -07:00
sunshineinabox
6c6cd8927a Combine compatibility check. 2024-05-27 23:11:39 -07:00
sunshineinabox
8bb369f37d Missed enabling Dynamic State 2024-05-27 23:11:39 -07:00
sunshineinabox
5d5f482d57 Enable VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT 2024-05-27 23:11:39 -07:00
sunshineinabox
863674768d Some more small changes 2024-05-27 23:11:39 -07:00
sunshineinabox
ab7f379e11 Formatting 2024-05-27 23:11:39 -07:00
sunshineinabox
ecadc6a4f9 Implement VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT 2024-05-27 23:11:39 -07:00
sunshineinabox
3fe159f4dd Small fix 2024-05-27 23:11:39 -07:00
sunshineinabox
d4e4ddca91 Fix formatting 2024-05-27 23:11:39 -07:00
sunshineinabox
2483b1a52a Enable VK_EXT_extended_dynamic_state3 this time without seizures. 2024-05-27 23:11:39 -07:00
sunshineinabox
5bf0937be1 Reverted previous commit as it caused mass seizures, disable for now. 2024-05-27 23:11:39 -07:00
sunshineinabox
0f2ed45f96 Revert "Enable the extension..."
This reverts commit 8bbdaab9a1aa22dd14d3f49b9253cc9d1a372844.
2024-05-27 23:11:39 -07:00
sunshineinabox
404f4be9e7 Enable the extension... 2024-05-27 23:11:39 -07:00
sunshineinabox
fd9b4cc10f More comments and formatting fixes 2024-05-27 23:11:39 -07:00
sunshineinabox
eeecd894b9 Add Some Comments 2024-05-27 23:11:39 -07:00
sunshineinabox
767abfe500 Avoid unncessary state changes? 2024-05-27 23:11:39 -07:00
sunshineinabox
5f2d924bac Misc 2024-05-27 23:11:39 -07:00
sunshineinabox
19db5a0ce2 Implement VK_EXT_extended_dynamic_state3 2024-05-27 23:11:39 -07:00
sunshineinabox
66b6b46716 Use device features to enable to disable LogicOp Extended Dynamic State
Improve index counting
2024-05-27 23:11:39 -07:00
sunshineinabox
0049585a36 Enable if supported. 2024-05-27 23:11:39 -07:00
sunshineinabox
c728a3b6a4 ExtDynamicState2 2024-05-27 23:11:39 -07:00
sunshineinabox
cee5ae5551 Some missed values 2024-05-27 23:11:39 -07:00
sunshineinabox
398ca7ad82 Revert unrelated changes. 2024-05-27 23:11:39 -07:00
sunshineinabox
eaedc3ec9e Use Viewport and Scissor with count.
Topology Dynamic State is not working as intended. Need to add check to set correct Topology class. Circle back to this later. For now revert it.

Some minor fixes.
2024-05-27 23:11:39 -07:00
sunshineinabox
e7fbc9a1be Use Correct namespace 2024-05-27 23:11:39 -07:00
sunshineinabox
506f25054d LineWidth is not supported on MoltenVK 2024-05-27 23:11:39 -07:00
sunshineinabox
1befb5bd8f Check if widelines is supported. 2024-05-27 23:11:39 -07:00
sunshineinabox
5894ef043b No need to by reference 2024-05-27 23:11:38 -07:00
sunshineinabox
07ac4192cd Resolve MoltenVK (future version) warning.
Flags are not set for deriving pipelines so remove unnecessary basePipelineIndex value.
2024-05-27 23:11:38 -07:00
sunshineinabox
24e6105e6f Primitive Topolgy DynamicState maybe causing performance degredation. 2024-05-27 23:11:38 -07:00
sunshineinabox
5f02e28017 More Dynamic States 2024-05-27 23:11:38 -07:00
sunshineinabox
4933888a9d Make StencilOp, FrontFace and CullMode Dynamic States. Also prevent Vertex Input Binding Stride dynamic state from enabling with MoltenVK. 2024-05-27 23:11:38 -07:00
sunshineinabox
e6e5829abf Dynamic state for Depth Bounds should not be passed to PipelineDynamicStateCreateInfo as the command to set them is never called.
Do not pass pointer to viewport and scissor as those dynamic states should be supported on all devices.

Same as above for DepthBias values.
2024-05-27 23:11:38 -07:00
gdkchan
c41fddd25e
Vulkan: Extend full bindless to cover cases with phi nodes (#6853)
* Key textures using set and binding (rather than just binding)

* Extend full bindless to cover cases with phi nodes

* Log error on bindless access failure

* Shader cache version bump

* Remove constant buffer match to reduce the chances of full bindless triggering

* Re-enable it for constant buffers, paper mario does actually need it

* Format whitespace
2024-05-26 15:20:10 -03:00
MutantAura
2ebe929fa5
misc: Change disk shader cache compression algorithm to Brotli (RFC 7932) (#6841)
* Prefer `Brotli` compression for disk shader cache.

* Final default case for decompression switch.

* Prefer fastest compression.
2024-05-26 20:06:41 +02:00
gdkchan
53d096e392
Allow texture arrays to use separate descriptor sets on Vulkan (#6870)
* Report base and extra sets from the backend

* Pass texture set index everywhere

* Key textures using set and binding (rather than just binding)

* Start using extra sets for array textures

* Shader cache version bump

* Separate new commands, some PR feedback

* Introduce new manual descriptor set reservation method that prevents it from being used by something else while owned by an array

* Move bind extra sets logic to new method

* Should only use separate array is MaximumExtraSets is not zero

* Format whitespace
2024-05-26 13:30:19 -03:00
dependabot[bot]
4cc00bb4b1
nuget: bump Microsoft.IdentityModel.JsonWebTokens from 7.5.1 to 7.5.2 (#6809)
Bumps [Microsoft.IdentityModel.JsonWebTokens](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet) from 7.5.1 to 7.5.2.
- [Release notes](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases)
- [Changelog](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/compare/7.5.1...7.5.2)

---
updated-dependencies:
- dependency-name: Microsoft.IdentityModel.JsonWebTokens
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 05:35:49 +02:00
Piplup
c98b7fc702
Workaround bug on logic op with float framebuffer (#6858)
* intel workaround

built on top of the amd workaround

* forgot to update the note

* Logic Change

Enabled workaround for all vendors that aren't nvidia

* Applied Suggestions
2024-05-23 22:57:26 -03:00
gdkchan
e65effcb05
Workaround AMD bug on logic op with float framebuffer (#6852)
* Workaround AMD bug on logic op with float framebuffer

* Format whitespace

* Update comment
2024-05-23 01:05:32 -03:00
riperiperi
c1ed150949
Kernel: Wake cores from idle directly rather than through a host thread (#6837)
* Kernel: Wake cores from idle directly rather than through a host thread

Right now when a core enters an idle state, leaving that idle state requires us to first signal the core's idle thread, which then signals the correct thread that we want to run on the core. This means that in a lot of cases, we're paying double for a thread to be woken from an idle state.

This PR moves this process to happen on the thread that is waking others out of idle, instead of an idle thread that needs to be woken first.

For compatibility the process has been kept as similar as possible - the process for IdleThreadLoop has been migrated to TryLeaveIdle, and is gated by a condition variable that lets it run only once at a time for each core. A core is only considered for wake from idle if idle is both active and has been signalled - the signal is consumed and the active state is cleared when the core leaves idle.

Dummy threads (just the idle thread at the moment) have been changed to have no host thread, as the work is now done by threads entering idle and signalling out of it.

This could put a bit of extra work on threads that would have triggered `_idleInterruptEvent` before, but I'd expect less work than signalling all those reset events and the OS overhead that follows. Worst case is that other threads performing these signals at the same time will have to wait for each other, but it's still going to be a very short amount of time.

Improvements are best seen in games with heavy (or very misguided) multithreading, such as Pokemon: Legends Arceus. Improvements are expected in Scarlet/Violet and TOTK, but are harder to measure.

Testing on Linux/MacOS still to be done, definitely need to test more games as this affects all of them (obviously) and any issues might be rare to encounter.

* Remove _idleThread entirely

* Use spinwait so we don't completely blast the CPU with cmpxchg

* Didn't I already do this

* Cleanup
2024-05-22 17:47:27 -03:00
Logan Stromberg
c634eb4054
Updating Concentus dependency to speed up Opus decoding (#6757)
* Implementing new features in the latest Concentus library - span-in, span-out Opus decoding (so we don't have to make temporary buffer copies), returning a more precise error code from the decoder, and automatically linking the native opus library with P/invoke if supported on the current system

* Remove stub log messages and commit package upgrade to 2.1.0

* use more correct disposal pattern

* Bump to Concentus 2.1.1

* Bump to Concentus 2.1.2

* Don't bother pulling in native opus binaries from Concentus package (using ExcludeAssets).

* Fix opus MS channel count. Explicitly disable native lib probe in OpusCodecFactory.

* Bump to package 2.2.0 which has split out the native libs, as suggested.

---------

Co-authored-by: Logan Stromberg <lostromb@microsoft.com>
2024-05-20 18:38:38 -03:00
riperiperi
eb1ce41b00
GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings (#6794)
* GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings

Essentially retreading #4540, but it's on the GPU project now instead of the backend. This allows us to have a lot more control + knowledge of where the buffer backing has been changed and allows us to pre-emptively flush pages to host memory for quicker readback. It will allow us to do other stuff in the future, but we'll get there when we get there.

Performance greatly improved in Hyrule Warriors: Age of Calamity. Performance notably improved in TOTK (average). Performance for BOTW restored to how it was before #4911, perhaps a bit better.

- Rewrites a bunch of buffer migration stuff. Might want to tighten up how dispose stuff works.
- Fixed an issue where the copy for texture pre-flush would happen _after_ the syncpoint.

TODO: remove a page from pre-flush if it isn't flushed after a certain number of copies.

* Add copy deactivation

* Fix dependent virtual buffers

* Remove logging

* Fix format issues (maybe)

* Vulkan: Remove backing swap

* Add explicit memory access types for most buffers

* Fix typo

* Add device local force expiry, change buffer inheritance behaviour

* General cleanup, OGL fix

* BufferPreFlush comments

* BufferBackingState comments

* Add an extra precaution to BufferMigration

This is very unlikely, but it's important to cover loose ends like this.

* Address some feedback

* Docs
2024-05-19 16:53:37 -03:00
TSRBerry
2f427deb67
Fix another NullReferenceException (#6826) 2024-05-17 20:11:30 -03:00
TSRBerry
8f51938e2b
Disable keyboard controller input while swkbd is open (foreground) (second attempt) (#6808)
* Block input updates while swkbd is open in foreground mode

* Flush internal driver state before unblocking input updates

* Rename Flush to Clear and remove unnecessary attribute

* Clear the driver state only if the GamepadDriver isn't null
2024-05-17 16:58:03 -03:00
gdkchan
4d84df9487
Update audio renderer to REV12: Add support for splitter biquad filter (#6813)
* Update audio renderer to REV12: Add support for splitter biquad filter

* Formatting

* Official names

* Update BiquadFilterState size + other fixes

* Update tests

* Update comment for version 2

* Size test for SplitterDestinationVersion2

* Should use Volume1 if no ramp
2024-05-17 16:46:43 -03:00
MutantAura
9ec8b2c01a
Change Deflate compression level to Fastest. (#6812) 2024-05-16 14:19:37 -03:00