aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache/image_info.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix the P6 scratch save in R2UR/MATCH/HFMA2.RELU; GPU memory dump toolTakoroka6 days1-1/+14
| | | | | | | | | | | | | | | | | The colour cast on title 1 (magenta/cyan, then red/green, changing per course) came from the sky/atmosphere volume shader (a pixel shader drawing a 32^3 RGBA16F table slice by slice), which starts with an unguarded R2UR. R2UR, MATCH and HFMA2.RELU use P6 as scratch and saved/restored it with the uniform-guard mask, 1 << (6 - 7) for an unguarded instruction: undefined, in practice bit 31, which shifted into the opcode bits and turned the save into another instruction. They now always save and restore P6. Debugging aids used to find it: - EDEN_NX2_DUMP=<present>:<addr>:<size>,...: flush GPU memory ranges at a present (on the GPU thread) and save them next to the frame captures; nx2work/vol3d.py untiles Switch 2 3D textures from such dumps. - GPU::RunOnGpuThread. - Logs of Switch 2 3D images and descriptors.
* [vulkan] 4th Vulkan Global Maintenance (#4212)CamilleLaVey2026-07-161-1/+1
| | | | | | | | | | The approach on this PR moves around refactoring/ updating residual work; main issue was the whole logic behind msaa upload/download images with the constant image copy per pass required; which was gated via shaderStorageImageMultisample, which is not available on all the platforms supported including Android, making them to rely into a more heavier approach to convert msaa image copy into a non msaa image copy, not only losing precision in the conversion, but also creating bugs around the resolve of the image itself, if the supported path had to copy 2 times the same image to be actually presentable, when the fallback was enabled 3 copies were performed, not only decreasing the performance but also increasing race conditions due to the certain capabilities processed in this chain (storage_views). In order to resolve them more naturally, the constant copies were removed from the now "common" path along establishing a proper color resolve for Android and actually making them more direct. Yet this opened a new pack of outdated handling on our current backend; since we now pass msaa images more directly (whenever a game request a msaa type of image/ which seems to be not common + each fragment resolves images on how it's actually required, adding missing depth/stencil), how we often load and store them becomes a critical issue, since our current configuration renderpass/framebuffer forces to always load and load clear whenever a new attachment it's passing through the renderpass, making this really heavier on memory bandwidth limited devices as SteamDeck and others that doesn't rely on the inmediate rendering mode (Tilers vs iGPU); to prevent over allocating data, I had to re-structure part of the current renderpass and framebuffer to actually reuse part of the data/ attachments called, with flags as DON'T_CARE, simplifying partially on how we actually call attachments including their barriers and conditions (occlusion, etc), the DON'T_CARE it's specifically useful to not only prevent calling new loads (which is a flush and heavier on tiler devices) and not only reusing the actual data store, which works on the future time, this saves memory bandwidth and gives space to actually avoid the constant pressure on SYSMEM/GMEM shader resolver path. This maintenance also improved the current removal features logic on QCOM drivers, closing gaps between implementations on descriptors (VK_EXT_indexing_descriptor), adjusting the whole WMEL to avoid being so stricter if certain capabilities are missing to actually use this feature, leading to test and play more on how QCOM drivers are actually behaving; meanwhile the main objective is to open path for a robust and bigger implementation in the future, the changes made here also contains small bug fixes on SPIR-V logic, adding missing cases to resolve shaders (FP64 -> FP16), adding more robustness on how narrow features are actually being used and how to wired them whenever they're not available, meanwhile there are still some issues in regards on how Tegra vs Adreno can preserve unorms at FP32 and FP16, leaving better understanding on base for what VK_EXT_shader_float_controls is actually doing most of the times (flushes NaN's and Denorms equally). Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4212
* [video_core] Remove redundant check on image_view and image_view_info (#2891)MaranBr2025-10-301-1/+1
| | | | | | | | This removes a redundant check on image_view and image_view_info. This check is not needed here. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2891 Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [video_core] Fix regression on image_view and image_view_info (#2873)MaranBr2025-10-291-19/+5
| | | | | | | | Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2873 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [video_core] Fix more edge cases in image_view and image_view_info (#2853)MaranBr2025-10-281-5/+15
| | | | | | | | | | | This fixes more edge cases where incorrect textures were used in image_view and image_view_info. Complement to PR 2830. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2853 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [video_core] Improve texture rendering (#2830)MaranBr2025-10-261-57/+73
| | | | | | | | | This fixes some edge cases and improves texture rendering, bringing it closer to specifications. This fixes many assertions that occur in some games, such as EOW. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2830 Reviewed-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [video_core] Better error messages (#2827)MaranBr2025-10-241-4/+2
| | | | | | | | Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2827 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [Textures] Normalize 1D TICs that use layers to 1DArray; (#274)wildcard2025-08-191-61/+69
| | | | | | | | | | Some TIC entries are tagged Texture1D but actually use array layers so previously it was marked as simple 1D and hence the assert, this fixes the said issue(Depth > 1 or baseLayer != 0). Games fixed- God Eater 3 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/274 Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev> Co-authored-by: wildcard <wildcard@eden-emu.dev> Co-committed-by: wildcard <wildcard@eden-emu.dev>
* Update fmt to allow for v11crueter2025-04-101-1/+1
| | | Signed-off-by: swurl <swurl@swurl.xyz>
* Texture Cache: Fix untracking on GPU remapFernando Sahmkow2024-02-101-0/+1
|
* image_info: adjust rescale thresholds and refactor constant useLiam2023-06-081-8/+12
|
* Texture cache: reverse inmediate flush changesFernando Sahmkow2023-05-071-0/+12
|
* video_core: Keep the definition of DimensionControl consistent with nvidia ↵Feng Chen2023-03-311-15/+18
| | | | open doc
* video_core: Better defined ImageInfo parametersFengChen2023-03-141-35/+36
|
* Engines: Implement Accelerate DMA Texture.Fernando Sahmkow2023-03-051-2/+43
|
* texture_cache: Adjust image view sizes by MSAA samplesameerj2023-01-281-0/+4
|
* Update 3D regsKelebek12022-10-071-13/+24
|
* common: Change semantics of UNREACHABLE to unconditionally crashLiam2022-06-131-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.
* Texture Cache: revert Image changes.Fernando Sahmkow2021-11-161-0/+4
|
* Texture Cahe/Shader decompiler: Resize PointSize on rescaling, refactor and ↵FernandoS272021-11-161-3/+3
| | | | make reaper more agressive on 4Gb GPUs.
* Texture Cahe: Fix downscaling on SMO.Fernando Sahmkow2021-11-161-0/+4
|
* Texture Cache: Fix Rescaling on MultisampleFernando Sahmkow2021-11-161-2/+2
|
* image_info: Mark MSAA textures as non-rescalableameerj2021-11-161-2/+2
| | | | Blitting or resolving multisampled images requires the dimensions of the src and dst to be equal for valid usage, making them difficult for resolution scaling using the current implementation.
* Texture Cache: Implement Rating System.Fernando Sahmkow2021-11-161-0/+11
|
* Texture Cache: Implement Vulkan UpScaling & DownScalingFernando Sahmkow2021-11-161-0/+3
|
* video_core: Rewrite the texture cacheReinUsesLisp2020-12-301-0/+189
The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.