Commit Graph
12688 Commits
Author SHA1 Message Date
Stenzek 57533b520e VulkanSwapChain: Don't request unsupported composite alpha 2026-10-13 20:46:55 +10:00
Stenzek da59abe4e8 VulkanDevice: Check swapchain maintenance feature and push descriptor limit 2026-10-13 20:46:55 +10:00
Stenzek 90b7ec71b6 VulkanDevice: Fix render pass state after flushing mid-present
Restart used the unrotated size, and the pass may not be restarted.
2026-10-13 20:46:55 +10:00
Stenzek ca9a7f36a5 VulkanDevice: Add self-dependency when framebuffer fetch is disabled
Barriers are used in that case, and need it in the render pass.
2026-10-13 20:46:55 +10:00
Stenzek b7269a8ca9 VulkanDevice: Fix buffer image height for compressed uploads
It has to be a multiple of the block size, zero uses the copy height.
2026-10-13 20:46:55 +10:00
Stenzek d761273989 VulkanDevice: Fix image layout in null texture descriptor 2026-10-13 20:46:36 +10:00
Stenzek 6bff12e6ca VulkanDevice: Don't set blend constants unless used 2026-10-13 20:22:48 +10:00
Stenzek 605e5fe633 VulkanDevice: Fix blend attachment count with no colour targets 2026-10-13 20:22:38 +10:00
Stenzek cc4eb9f1b5 VulkanDevice: Fix render pass flags being truncated in cache key 2026-10-13 17:01:50 +10:00
Stenzek 8b8f3ca5df VulkanDevice: Fix download transitioning wrong texture layer 2026-10-13 17:01:50 +10:00
Stenzek 402c5679fc VulkanDevice: Fix resolve with unused or invalidated textures
Transitioned back to undefined, and left the destination invalidated.
2026-10-13 17:01:50 +10:00
Stenzek cf7be2caba VulkanDevice: Respect DisableMemoryImport flag 2026-10-13 17:01:50 +10:00
Stenzek 33a238bd12 VulkanDevice: Don't flag extensions that aren't enabled on Vulkan 1.0 2026-10-13 17:01:50 +10:00
Stenzek 50eddf2c8d VulkanSwapChain: Fix old swap chain leak on creation failure 2026-10-13 17:01:50 +10:00
Stenzek 6eb49f980a VulkanDevice: Don't restart render pass if one wasn't active 2026-10-13 17:01:49 +10:00
Stenzek d52ba48ef6 VulkanDevice: Unbind texture buffer on destroy 2026-10-13 17:01:49 +10:00
Stenzek 720c60781d VulkanDevice: Increase uniform buffer range to 16K
Blocks over 1K were read past the end of the descriptor range.
2026-10-13 17:01:49 +10:00
Stenzek 3c5861aaab VulkanSwapChain: Fix abort when recreate fails after cached acquire 2026-10-13 17:01:49 +10:00
Stenzek a74c6a44c9 VulkanDevice: Always allocate storage image descriptors
Compute shaders use them without fragment shader interlock.
2026-10-13 17:01:49 +10:00
Stenzek 5712013119 VulkanDevice: Only update multi-texture descriptors when dirty 2026-10-13 17:01:49 +10:00
Stenzek a267c71544 VulkanDevice: Fix compute image descriptor set binding
Wrong index with push descriptors, and graphics layouts have no such set.
2026-10-13 17:01:44 +10:00
Stenzek e2f2fe1474 VulkanDevice: Fix ROV clear not ending render pass 2026-10-13 16:01:54 +10:00
Stenzek 337d066b5e VulkanDevice: Fix crash when device creation fails
The swap chain destructor submitted a command buffer that did not exist.
2026-10-13 16:01:53 +10:00
Stenzek 301490980e GPUDevice: Respect DisableMemoryImport in OpenGL/Metal 2026-10-13 15:51:11 +10:00
Stenzek df9ea5eee1 D3D11Device: Fix input layout cache keys and feature level 10 limits 2026-10-13 15:31:45 +10:00
Stenzek d7143947fc D3D11Device: Fix timestamp query state and WaitForGPUIdle() 2026-10-13 15:31:45 +10:00
Stenzek d0731116f9 D3D11Device: Fix swap chain error handling and fullscreen output selection 2026-10-13 15:21:28 +10:00
Stenzek 9bdc668219 D3D11Device: Fix texture copy/map/upload edge cases 2026-10-13 15:21:28 +10:00
Stenzek c03dd0bc1e D3D11Device: Fix compute/image binding state tracking 2026-10-13 15:21:28 +10:00
Stenzek 95dc9f0c9d OpenGLDevice: Fix active texture tracking when unbinding 2026-10-13 15:21:28 +10:00
Stenzek 4ac22708f3 MDEC: Turn state dispatcher into a jump table 2026-10-13 15:21:27 +10:00
Stenzek 859d7e875f DMA: Skip transfer eligibility checks when clearing requests
Store deasserted requests without checking channel enablement or halt state,
since a cleared request cannot start a transfer.
2026-10-13 15:21:27 +10:00
Stenzek c37f3901ef DMA: Copy forward wrapping transfers in contiguous spans
Gather and scatter forward wrapping blocks with two bulk copies while retaining
one device callback, reverse-transfer behavior, and tick accounting.
2026-10-13 15:21:27 +10:00
Stenzek 284f83eec3 DMA: Avoid staging transfers ending at the RAM boundary
Check the number of contiguous words available so forward transfers ending
exactly at RAM's boundary continue to use RAM directly.
2026-10-13 15:21:27 +10:00
Stenzek d7120b22a3 DMA: Optimize contiguous ordering table clears
Fill non-wrapping ordering tables in ascending address order to remove
per-word masking and enable vectorization. Retain the wrapped path
and transfer timing.
2026-10-13 15:21:27 +10:00
Stenzek 9a78570376 DMA: Preserve source address for staged GPU transfers
Keep the masked starting RAM address when gathering wrapped or reverse
transfers so GPU command addresses remain correct for PGXP.
2026-10-13 15:21:27 +10:00
Stenzek 16dc60f97d MDEC: Add IDCT fast path for low frequency blocks
When all coefficients are in the top-left 4x4 of the block, the last
four rows of the first pass are zero, as is the upper half of each row
in both passes, so those multiplies can be skipped.

Benchmaking a few games shows that these blocks get hit roughly around
half the time, with some FMVs managing a hit rate above 80%.

Approximately 1.9x faster for these blocks on x64.
2026-10-13 15:21:27 +10:00
Stenzek 60d54981a7 MDEC: Simplify 15-bit output conversion
Round all three channels with a single saturating byte add, instead of
extracting, rounding and clamping each channel separately.

Approximately 1.9x faster on x64.
2026-10-13 15:21:27 +10:00
Stenzek d5bfad7d71 MDEC: Convert whole macroblock in YUVToRGB_New()
Compute the chroma terms once per row of chroma, instead of for each of
the two luma rows it covers in each half of the macroblock.

Also split the multiplies so they fit in 16 bits, as chroma is already
clamped to 8 bits, and fold the 9-bit sign extension into a single shift.

Approx. 1.9x faster on x64.
2026-10-13 15:21:27 +10:00
Stenzek 8fb9907103 MDEC: Vectorize IDCT across matrix rows
Compute all 8 outputs for a row at once, instead of a dot product per
output, and transpose between passes instead of scattering scalars.

The halves of each row are still summed in 32 bits and combined with
enough precision for the rounding, so the result is unchanged.

Approximately 2.4x faster on x64.
2026-10-13 15:21:27 +10:00
Stenzek 1f3c4a5c4c Tests: Add MDEC decode tests
Runs RLE streams through the MDEC for each output depth, and compares
the result against a scalar reference decoder.
2026-10-13 15:21:27 +10:00
Stenzek f52eb120d5 MDEC: Use 32-bit add for red/blue chroma rounding
The rounding constant is in 32-bit lanes, so add16() dropped the carry
into the upper half of the product. Chroma is clamped to -128..127, which
never produces that carry, so the output is unchanged.
2026-10-13 15:21:26 +10:00
Stenzek 86c5befd04 MDEC: Fix signed monochrome output
Negative samples were stored sign-extended to 32 bits, which the 4-bit
and 8-bit packing then ORed over the neighbouring pixels in the word.
2026-10-13 15:21:26 +10:00
Stenzek 390686a5d1 MDEC: Fix word alignment of DMA writes
The free space in the input FIFO was masked with ~2 instead of ~1, so an
odd amount of space was not rounded down to a whole word, and space with
bit 1 set was under-filled.
2026-10-13 15:21:26 +10:00
Stenzek 9b47014f12 Qt: Fix window icon/title desynchronizing 2026-10-13 15:21:26 +10:00
Stenzek ee6c200b9e FullscreenUI: Fix deadlock opening game properties 2026-10-13 15:21:26 +10:00
Stenzek e0deda016c TimingEvent: Relax Assert to DebugAssert 2026-10-13 15:21:26 +10:00
Daniel Nylander b8a8abae80 Update Swedish Qt translation 2026-10-13 15:21:26 +10:00
Stenzek 9dc2bd54d6 Settings: Use constants for section names 2026-10-13 15:21:26 +10:00
Stenzek 0a93c2305f Settings: Fix inconsistent default values 2026-10-13 15:21:25 +10:00