summaryrefslogtreecommitdiff
path: root/src/video_core/host_shaders
AgeCommit message (Collapse)Author
2025-05-11video_core/vulkan: Improve texture format conversion handlingZephyron
Refactors and improves the texture format conversion system in the Vulkan renderer: - Adds proper sRGB to linear conversion for depth formats - Improves shader accuracy for ABGR8 SRGB to D24S8 conversion - Adds gamma correction and proper depth range clamping - Moves GetSupportedFormat implementation to header - Cleans up format conversion switch statement - Removes redundant format conversion paths The changes improve accuracy when converting between color and depth formats, particularly for sRGB sources. The shader improvements ensure proper gamma correction and depth range handling. Technical changes: - Improves sRGB to linear conversion in fragment shader - Adds proper depth value clamping - Consolidates format conversion logic - Removes duplicate GetSupportedFormat implementation
2025-05-11video_core: Add new shader format conversion pipelinesZephyron
Adds several new shader-based format conversion pipelines to support additional texture formats and operations: - RGBA8 to BGRA8 conversion - YUV420/RGB conversions - BC7 to RGBA8 decompression - ASTC HDR to RGBA16F decompression - RGBA16F to RGBA8 conversion - Temporal dithering - Dynamic resolution scaling Updates the texture cache runtime to handle these new conversion paths and adds helper functions to check format compatibility for dithering and scaling operations. The changes include: - New shader files and CMake entries - Additional conversion pipeline setup in BlitImageHelper - Extended format conversion logic in TextureCacheRuntime - New format compatibility check helpers
2025-05-11video_core: Add sRGB to D24S8 depth-stencil conversion supportZephyron
Implements conversion from sRGB color formats to D24S8 depth-stencil format in the Vulkan renderer. This change includes: - New fragment shader convert_abgr8_srgb_to_d24s8.frag that handles proper sRGB to linear conversion before depth calculation - Added shader to CMake build system - Extended BlitImageHelper with new conversion pipeline and methods - Updated texture cache to handle sRGB to D24S8 format conversion paths The conversion properly handles sRGB color space by first converting to linear space before calculating luminance values for the depth component, while preserving alpha channel data for the stencil component.
2025-05-11arm/video: Fix shader extension and exception handlingZephyron
Two main changes in this commit: 1. Replace NVIDIA-specific GL_NV_gpu_shader5 extension with the more widely supported GL_EXT_shader_explicit_arithmetic_types_float16 in the scaleforce shader. This improves compatibility across different GPU vendors. 2. Refactor ARM32 exception handling: - Restructure exception cases for better readability - Update exception handling to match current Dynarmic API - Fix indentation in switch statement - Remove AccessViolation case as it's no longer supported in current API These changes improve shader compatibility and align the exception handling with the current Dynarmic implementation.
2024-12-20renderer: add area sampling scaling method (#57)lui
Adds Area Sampling to the list of scaling options. Works well to achieve a high-quality, smooth super-sampling effect. Dolphin has had this for a while, and now Ryujinx has recently added it too, so I decided to port it. Not sure if adding the extra uniform to the OpenGL WindowAdaptPass was a good idea or not, or if using the push constants under Vulkan was either, but I wasn't sure about the best way to get the window size for use in the shader, and other scaling methods still work fine. Implementation seems to work fine under both Vulkan and OpenGL, but might still need some minor tweaks to the shader. Should definitely do some testing before merging, I have tested on an Nvidia RTX 3080 under Windows. Adapted from these two PRs: https://github.com/Ryujinx/Ryujinx/pull/7304 https://github.com/dolphin-emu/dolphin/pull/11999 Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/57 Co-authored-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion> Co-committed-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
2024-02-11Merge pull request #12756 from liamwhite/applet-multiprocess-hwcNarr the Reg
general: applet multiprocess
2024-02-10host_shaders: add vendor workaround for adreno driversLiam
2024-02-09nvnflinger/gpu: implement blendingLiam
2024-01-31renderer_vulkan: implement layer stack compositionLiam
2024-01-31renderer_vulkan: convert FSR to graphics pipelineLiam
2024-01-31renderer_opengl: split out FXAALiam
2024-01-07Fix typos in video_coreViktor Szépe
2023-10-18Merge pull request #11795 from Squall-Leonhart/D32FToOtherliamwhite
[Vulkan]Implement missing copy formats for D32, ARGB8_SRGB and BGRA8_Unorm/SRGB
2023-10-17Merge pull request #11349 from vonchenplus/buffer_cache_crashliamwhite
video_core: Fix moltenvk crash on macos
2023-10-17Changes based on hardware testsSquall-Leonhart
Removes unnecessary d32f to bgra shader and blit functions, update vk_texture_cache to use abgr shader for d32f to BGRA formats updates abgr to d32f shader to comply with hardware tests
2023-10-16added missing trailing line.Squall Leonhart
2023-10-16use texelfetch instead of texturelodSquall-Leonhart
2023-10-16Another missing copy connected to Bravely Default IISquall-Leonhart
adds blit_image_helper.ConvertABGR8ToD32F and fragment shader for performing ABGR and BGRA to D32F copies
2023-10-15Implement missing formats for Bravely Default 2Squall-Leonhart
2023-10-07update shader to confirmed format copySquall Leonhart
2023-10-05lets not convert depth to greyscale since this makes the exhaust and tire ↵Squall-Leonhart
smoke light gray/white tiresmoke should be a darker gray.
2023-10-04Implements D32_Float to A8B8G8R8_UNORM format copySquall-Leonhart
Corrects some visual issues in games such as Disney SpeedStorm
2023-09-25host_shaders: More proper handling of x2 MSAA copiesGPUCode
2023-09-23Query Cache: Fix Prefix SumsFernando Sahmkow
2023-09-23Query Cache: Simplify Prefix Sum compute shaderFernando Sahmkow
2023-09-23Query Cache: Implement host side sample counting.Fernando Sahmkow
2023-09-23Query Cachge: Fully rework Vulkan's query cacheFernando Sahmkow
2023-09-07video_core: Fix d24r8/s8d24 convert shader build error in moltenvkFeng Chen
2023-08-21Merge pull request #11149 from ameerj/astc-perf-prodliamwhite
host_shaders: ASTC compute shader optimizations
2023-08-19Masked depthstencil clearsKelebek1
2023-08-09flatten color_valuesAmeer J
2023-08-09flatten encoding_valuesAmeer J
2023-08-09flatten result vectorAmeer J
2023-08-09GetUnquantizedWeightVectorAmeer J
2023-08-06Compute ReplicateAmeer J
2023-08-06minorAmeer J
2023-08-06undo uintAmeer J
2023-08-06Revert "vulkan dims specialization"Ameer J
This reverts commit e6243058f2269bd79ac8479d58e55feec2611e9d.
2023-08-06vulkan dims specializationameerj
2023-08-06small_block optAmeer J
2023-08-06remove TexelWeightParamsAmeer J
2023-08-06error/void extent funcsAmeer J
2023-08-06more packingAmeer J
2023-08-06Revert "uint result index"Ameer J
This reverts commit 0e978786b5a8e7382005d8b1e16cfa12f3eeb775.
2023-08-06Revert "bfe instead of mod"Ameer J
This reverts commit 86006a3b09e8a8c17d2ade61be76736a79e3f58a.
2023-08-06Revert "global endpoints"Ameer J
This reverts commit d8f5bfd1df2b7469ef6abcee182aa110602d1751.
2023-08-06global endpointsAmeer J
2023-08-06bfe instead of modAmeer J
2023-08-06uint result indexAmeer J
2023-08-06amd optsAmeer J