summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
AgeCommit message (Collapse)Author
2026-01-25Remove unused importsMartino Fontana
Yellow squiggly lines begone! Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes. If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed. The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports. Not everything is removed, but the cleanup should be substantial enough. Because this done on Linux, code that isn't used on it is mostly untouched. (Hopefully no open PR is depending on these imports...)
2025-08-23VideoBackends / VideoCommon: rename member variables in RenderState to be ↵iwubcode
consistent
2025-08-20VideoCommon: Remove unused EnumMaps from PixelShaderGenSintendo
They appear to have been unused since #13432.
2025-06-05VideoCommon: fix pixel shader gen error about structure not being fully ↵iwubcode
initialized
2025-03-22VideoCommon: move to a 'process_fragment()' function to simplify custom ↵iwubcode
shaders and provide a direct override of the tev stage logic
2025-03-15Merge pull request #13347 from iwubcode/custom_shader_overhaul_lightingJMC47
VideoCommon: move lighting shader logic to callable functions
2025-03-15Merge pull request #13345 from Tilka/unswap_depthJosJuice
Fix depth texture being incorrectly affected by swap table
2025-03-13VideoCommon: move lighting shader logic to callable functionsiwubcode
2025-03-09VideoCommon: Move backend_info out of VideoConfig struct.Jordan Woyak
2025-02-25PixelShaderGen: use unswapped texture samples for depthTillmann Karras
2025-02-11VideoCommon: simplify dither calculationTillmann Karras
This saves three instructions on AMD GPUs. Dunno about Nvidia.
2024-06-11Merge pull request #12721 from iwubcode/custom_shader_alphaJMC47
VideoCommon: allow custom shaders to set the alpha value
2024-05-21Merge pull request #12537 from TellowKrinkle/MTLSubgroupAdmiral H. Curtiss
VideoCommon: More specific subgroup op bugs
2024-04-28VideoCommon: allow custom shaders to set the alpha value for use when ↵iwubcode
blending is enabled
2024-02-07VideoCommon: Don't use indexed output for fbfetchTellowKrinkle
A nonzero index makes no sense, and Mesa doesn't like it when you supply an index
2024-01-28VideoBackends:Multiple: Split up BUG_BROKEN_SUBGROUP_OPSTellowKrinkle
We now use subgroup ops for more than just a minor performance optimization
2024-01-23VideoCommon: fix compilation error in pixel shaders when per-pixel lighting ↵iwubcode
isn't set for custom shaders
2024-01-23VideoCommon: fix pixel shader compilation error that happens when uint ↵iwubcode
output is defined
2023-12-12VideoCommon: prepare graphics mods for custom shader material dataiwubcode
2023-08-20VideoCommon: add milliseconds elapsed time value to pixel shaders as a ↵iwubcode
uniform to be able to support animation effects in custom shaders
2023-08-20VideoCommon: pixel shader gen changes needed to support custom pixel shaders ↵iwubcode
in graphics mods
2023-08-15Remove out-dated hack of AMD driver issue WRT dual-source blending output index.takayhan-AMD
2023-02-14VideoCommon: Fix stereoscopic 3D on OpenGL < 4.3 (macOS)TellowKrinkle
2023-02-09VideoBackend/OGL: Prefer KHR_subgroup over NV_shader_thread.degasus
While the NV extension is totally fine, the KHR extension should be able to support more hardware. For NVIDIA, the hardware either supports both or neither, it just needs a driver from the last two years. For AMD, the drivers from late 2022-12 seems to bring support for the KHR extension. For Intel, the KHR is also supported for some years.
2023-02-09Merge pull request #11522 from phire/KillRendererWithFireScott Mansell
Kill Renderer (with phire)
2023-01-31Move BoundingBox out of RenderBaseScott Mansell
They were essentially just pass-though methods
2023-01-31Fix warning about using & with boolsScott Mansell
2023-01-30VideoCommon: Better logic op invert approximationTellowKrinkle
2022-12-27PixelShaderGen: Clamp texture layer when using manual texture sampling with ↵Pokechu22
stereoscopic 3D Otherwise, texelFetch() will use an out-of-bounds layer for game textures (that have 1 layer; EFB copies have 2 layers in stereoscopic 3D mode), which is undefined behavior (often resulting in a black image). The fast texture sampling path uses texture(), which always clamps (see https://www.khronos.org/opengl/wiki/Array_Texture#Access_in_shaders), so it was unaffected by this difference.
2022-10-18Merge pull request #10836 from iwubcode/d3d_uint_fixJMC47
VideoCommon: fix uint shader compiler error when using d3d
2022-08-29BPMemory: Make TevKSel more clearPokechu22
It stores both the konst selection value for alpha and color channels (for two tev stages per ksel), and half of a swap table row (there are 4 total swap tables, which can be used for swizzling the rasterized color and the texture color, and indices selecting which tables to use are stored per tev stage in the alpha combiner). Since these are indexed very differently, the old code was hard to follow.
2022-08-06VideoCommon: fix uint shader compiler error in specialized shaders. This ↵iwubcode
error is in renderers that use uint for their color output (for logic ops). Remove D3D check for uint output since other backends could use uint output as well.
2022-07-21VideoBackends:Metal: Use DriverDetails for bugsTellowKrinkle
2022-07-17Merge pull request #10747 from tellowkrinkle/LateUIDFixupJMC47
Add a post-cache shader UID fixup pass
2022-07-13VideoCommon: Better driver bug handlingTellowKrinkle
Adds a pass to process driver deficiencies between UID caching and use, allowing a full view of the whole pipeline, since some bugs/workarounds involve interactions between blend modes and the pixel shader
2022-07-13VideoCommon: Properly mask fbfetch logic op emulationTellowKrinkle
2022-06-24VideoCommon: update pixel shader output to match old D3D codeiwubcode
2022-06-24VideoCommon: fix support of stereoscopic rendering after moving d3d to SPIRV ↵iwubcode
generation
2022-06-24D3D / VideoCommon: generate HLSL from SPIRViwubcode
2022-06-16VideoCommon: Fix SSBO layout and remove associated "bug"TellowKrinkle
2022-04-24Merge pull request #10290 from OatmealDome/m1-earlyz-bugJMC47
DriverDetails: Add broken discard with early-Z bug on Apple Silicon GPUs
2022-04-22VideoCommon: Rename norm0/norm1/norm2 to normal/tangent/binormalPokechu22
2022-04-20DriverDetails: Add broken discard with early-Z bug on Apple Silicon GPUsOatmealDome
2022-04-19PixelShaderGen: Add support for non-dual source shader blendingOatmealDome
2022-04-10MoltenVK: Fix pixel shader typoJosJuice
2022-02-28Shadergen: Use real_ocol0 workaround for shader logic opsJosJuice
Previously we were using this workaround when using framebuffer fetch to emulate dual source blending, but it seems like we also need to use it when using framebuffer fetch to emulate logic ops, otherwise some Adreno devices get a crash when compiling OpenGL ES ubershaders. Using the workaround in specialized shaders doesn't seem to be necessary, but I've made the same change there for consistency. This gets us closer to fixing https://bugs.dolphin-emu.org/issues/12791 but doesn't actually fix it.
2022-02-28PixelShaderGen: Check uid_data for use_shader_logic_opJosJuice
On devices which have hardware support for dual source blending but not logic ops, this lets us skip performing the framebuffer fetch in situations where the game isn't actually using logic ops.
2022-02-08Treat alpha as 0 if alpha is 1 for blendingPokechu22
This removes the white box in fortune street again, without causing Mario Kart Wii to regress.
2022-02-08Use the same logic for lerp bias for color and alphaPokechu22
It doesn't make sense for alpha to add the bias ONLY when dividing by 2, while color doesn't apply the bias for divide by 2 only; hardware testing indicates that alpha should have the bias. This fixes the menus in Mario Kart Wii (https://bugs.dolphin-emu.org/issues/11909) but reintroduces the white rectangle in Fortune Street. This reverts commit 5aaa5141ed76acc3fffc70561a6b6e7fe3b9b470 (and several other matching changes elsewhere).
2022-01-13Fix non-constexpr format stringsPokechu22