aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/host_shaders/astc_decoder.comp
Commit message (Collapse)AuthorAgeFilesLines
* nx2: decode ASTC textures with the Switch 2 GOB layoutTakoroka7 days1-1/+7
| | | | | | | | | | The GPU ASTC decoder unswizzles block-linear data itself and never applied the native (Switch 2) GOB swizzle that the other unswizzle paths use, so ASTC textures came out with 16-byte blocks swapped wherever the image varies. Title 4's UI is ASTC (10x5, 4x4, 8x8): portraits, buttons and the squid cursor had hatched edges and clean interiors. Pass the native tiling flag to the decoder and swap offset bits 5 and 6 as block_linear_unswizzle_2d.comp does.
* [vulkan] Re-adjusting ASTC resolve (#4250)CamilleLaVey2026-08-051-16/+16
| | | | | | | | | | | | | This is an adjustment made due to problems caused by my ASTC changes some pr's earlier; added sanity to decoded blocks, removes the inconditional storage view for ASTC formats (verified against MaxwellToVk logic), added support to VK_EXT_astc_decode_mode which will ensure a better way to resolve RGFA16/RGFA32 on tilers, simplified ASTC HDR decoding into LDR valid formats. This fixes some issues with SteamDeck, Fire Emblem: Engage washed colors and other problems related to ASTC. _Special Thanks_ 1.- Meowly The Smol (@Gidoly) 2.- @simply0001 for the actual idea on the redundant storage views on the transcoded ASTC path. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4250
* [video_core] Implementation on ASTC HDR formats + Vulkan fixes (#4190)CamilleLaVey2026-07-091-6/+276
| | | | | | | | | | | | Based on the register of the ASTC implementation from Ameerj (yuzu), currently our conversion from ASTC on Desktop tends to duplicates the unpacking of ASTC converted textures, leading to bad performance; since there are some graphical effects that actually access on the band of 32bits (RGAF32) than the common 16bits (RGAF16) from our ASTC path decoding method, which commonly uses ARGB8 (degradation -> LDR) transformation to reduce the memory cost per conversion; meanwhile it could actually provide initially better performance; the engine tended to get stalled when this writted stage effect got skipped; mostly because CPU tends to look for an unimplemented texture/ format query (from which doesn't exist on our MaxwellToVK); unlike what's commonly believed HDR was a format to write enviroment effects even before their appearance on video output (since Switch doesn't have HDR, only SDR on certain engines). The test result on this PR showed games like Astral Chain and other heavy reliant on ASTC decoding improved their performance and stability by around 15%; meanwhile could it be tied to a hardware gain, it's clearly a gain for direct access on what's required on most games. This PR also contains few Vulkan bug fix I encountered along this implementation. Special Thanks: -> Mr. Smoly Gidolard (@gidoly) Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4190
* [video_core] Implement GPU-accelerated texture unswizzling and optimize ↵Forrest Keller2026-01-131-65/+31
| | | | | | | | | | | | | | | | | | | | | | sparse texture handling (#3246) - [Added] a new compute shader to handle block-linear unswizzling on the GPU, reducing CPU overhead during texture uploads - [Implemented] BlockLinearUnswizzle3DPass to take advantage of the new compute shader, unimplemented for OpenGL - [Implemented] texture streaming and queue system for large sparse textures to prevent hitches - [Implemented] aggressive garbage collection system to eject large sparse textures to save on memory (Unused) - [Added] user settings to adjust the streaming unswizzle system for low-end machines - [Improved] slightly the ASTC GPU decoding system Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Co-authored-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: DraVee <dravee@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3246 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: Forrest Keller <forrestmarkx@outlook.com> Co-committed-by: Forrest Keller <forrestmarkx@outlook.com>
* Fix typos in video_coreViktor Szépe2024-01-071-9/+9
|
* flatten color_valuesAmeer J2023-08-091-14/+9
|
* flatten encoding_valuesAmeer J2023-08-091-11/+10
|
* flatten result vectorAmeer J2023-08-091-14/+5
|
* GetUnquantizedWeightVectorAmeer J2023-08-091-69/+63
|
* Compute ReplicateAmeer J2023-08-061-85/+20
|
* minorAmeer J2023-08-061-12/+6
|
* undo uintAmeer J2023-08-061-3/+3
|
* Revert "vulkan dims specialization"Ameer J2023-08-061-26/+16
| | | | This reverts commit e6243058f2269bd79ac8479d58e55feec2611e9d.
* vulkan dims specializationameerj2023-08-061-16/+26
|
* small_block optAmeer J2023-08-061-4/+3
|
* remove TexelWeightParamsAmeer J2023-08-061-46/+31
|
* error/void extent funcsAmeer J2023-08-061-48/+43
|
* more packingAmeer J2023-08-061-109/+109
|
* Revert "uint result index"Ameer J2023-08-061-1/+1
| | | | This reverts commit 0e978786b5a8e7382005d8b1e16cfa12f3eeb775.
* Revert "bfe instead of mod"Ameer J2023-08-061-15/+13
| | | | This reverts commit 86006a3b09e8a8c17d2ade61be76736a79e3f58a.
* Revert "global endpoints"Ameer J2023-08-061-36/+40
| | | | This reverts commit d8f5bfd1df2b7469ef6abcee182aa110602d1751.
* global endpointsAmeer J2023-08-061-40/+36
|
* bfe instead of modAmeer J2023-08-061-13/+15
|
* uint result indexAmeer J2023-08-061-1/+1
|
* amd optsAmeer J2023-08-061-16/+13
|
* const, pack result_vector and replicate tables,Ameer J2023-08-061-227/+260
| | | | undo amd opts
* minor redundancy cleanupAmeer J2023-08-061-12/+2
|
* extractbits robustnessAmeer J2023-08-061-5/+8
|
* reuse vectors memoryAmeer J2023-08-061-33/+17
|
* EncodingData packAmeer J2023-08-061-44/+69
|
* flatteningAmeer J2023-08-061-43/+44
|
* weights refactorAmeer J2023-08-061-26/+22
|
* params.max_weightAmeer J2023-08-061-5/+2
|
* skip bitsAmeer J2023-08-061-9/+14
|
* restrictAmeer J2023-08-061-2/+2
|
* general: fix spelling mistakesLiam2023-03-121-1/+1
|
* video_core: Modify astc texture decode error fill valueFengChen2022-09-151-1/+1
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* astc_decoder: Combine FastReplicate functions to work around new NV driver bugameerj2022-01-161-34/+46
| | | | | | The new Nvidia drivers have a bug where the FastReplicateTo6 function produces a lookup into the REPLICATE_TO_8 table rather than the REPLICATE_TO_6 table. This seems to be an optimization gone wrong. Combining the logic of the FastReplicate functions seems to address the bug.
* astc_decoder: Reduce workgroup sizeameerj2021-08-011-1/+1
| | | | This reduces the amount of over dispatching when there are odd dimensions (i.e. ASTC 8x5), which rarely evenly divide into 32x32.
* astc_decoder: Compute offset swizzles in-shaderameerj2021-08-011-33/+13
| | | | Alleviates the dependency on the swizzle table and a uniform which is constant for all ASTC texture sizes.
* astc_decoder: Make use of uvec4 for payload dataameerj2021-07-311-79/+43
|
* astc_decoder: Simplify Select2DPartitionameerj2021-07-311-38/+19
|
* astc_decoder: Optimize the use EncodingDataameerj2021-07-311-25/+25
| | | | | | | This buffer was a list of EncodingData structures sorted by their bit length, with some duplication from the cpu decoder implementation. We can take advantage of its sorted property to optimize its usage in the shader. Thanks to wwylele for the optimization idea.
* astc_decoder.comp: Remove unnecessary LUT SSBOsameerj2021-06-191-19/+16
| | | | We can move them to instead be compile time constants within the shader.
* astc: Various robustness enhancements for the gpu decoderameerj2021-06-191-9/+6
| | | | | | These changes should help in reducing crashes/drivers panics that may occur due to synchronization issues between the shader completion and later access of the decoded texture.
* astc_decoder: Fix LDR CEM1 endpoint calculationameerj2021-06-151-1/+1
| | | | | | | | Per the spec, L1 is clamped to the value 0xff if it is greater than 0xff. An oversight caused us to take the maximum of L1 and 0xff, rather than the minimum. Huge thanks to wwylele for finding this. Co-Authored-By: Weiyi Wang <wwylele@gmail.com>
* astc_decoder: Refactor for style and more efficient memory useameerj2021-03-251-262/+307
|
* astc_decoder: Reimplement LayersRodrigo Locatti2021-03-131-18/+15
| | | | Reimplements the approach to decoding layers in the compute shader. Fixes multilayer astc decoding when using Vulkan.
* astc_decoder: Fix out of bounds memory accessameerj2021-03-131-2/+10
| | | | resolves a crash with some anamolous textures found in Astral Chain.