summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/spirv
AgeCommit message (Collapse)Author
2025-02-28shader_recompiler: Implement vertex count lookup for Geometry stageZephyron
Add proper handling of input topologies in the Geometry stage for all three shader backends (GLASM, GLSL, SPIRV). This implementation uses a lookup table approach to determine vertex counts based on input topology type (Points, Lines, LinesAdjacency, Triangles, TrianglesAdjacency) and shifts the vertex count by 16 bits as required by the invocation info format. Additional changes: - Fixed TessellationControl and TessellationEval stages to properly break after emitting code - Added proper header include for runtime_info.h in GLASM backend - Improved code documentation with clear commenting patterns This change ensures accurate geometry shader behavior across all backends, improving compatibility with games that rely on proper vertex count reporting. Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-02-16build: upgrade fmt and SDL2Zephyron
Update fmt library to version 11.0.2 and make necessary adjustments: - Replace fmt/format.h includes with fmt/ranges.h - Add const qualifiers to formatter::format functions - Update CMake to require fmt version 11 Additional dependency updates: - Update SDL2 bundled version from 2.28.2 to 2.32.0 - Update catch2 to version 3.8.0 - Update vcpkg baseline to c82f74667287d3dc386bce81e44964370c91a289
2025-01-20shader: Implement EmitInvocationInfo across all backendsZephyron
- Add proper invocation info handling for tessellation and fragment stages - Return patch vertices info shifted by 16 bits for tessellation stages - Return sample mask shifted by 16 bits for fragment stage - Return standard format (0x00ff0000) for compute and other stages - Implement consistently across SPIRV, GLSL, and GLASM backends - Remove stubbed warning message
2025-01-14Revert incorrect copyright attribution for non-contributed filesZephyron
- In commit b3facaa6bb30cdc39f2b7d632fef1e3bfeee7785, the copyright header was updated to include "Citron Homebrew Project" across multiple files, regardless of whether any contributions were made. - This commit removes the incorrect attribution and reverts the copyright header to its previous state. - Copyright attribution should only be added when meaningful contributions have been made to the file. - This commit ensures proper compliance with copyright standards and maintains correct attribution to the respective contributors. - Special thanks to Tachi for pointing out the need for these corrections and ensuring that proper attribution practices are followed.
2024-12-31chore: update project references and add Citron copyrightZephyron
- Replaced all references to the old project name with Citron. - Added Citron copyright information alongside existing notices in all files.
2024-02-22Merge pull request #13075 from liamwhite/mali-having-a-bad-timeNarr the Reg
shader_recompiler: throw on missing geometry streams in geometry shaders
2024-02-19shader_recompiler: throw on missing geometry streams in geometry shadersLiam
2024-02-15shader_recompiler: fix non-const offset for arrayed image typesLiam
2024-02-15Revert "shader_recompiler: use only ConstOffset for OpImageFetch"Liam
This reverts commit f296a9ce9a1a144d322d54d4628dba6f8a800cb7.
2024-02-05shader_recompiler: use only ConstOffset for OpImageFetchLiam
2024-01-18Merge pull request #12644 from liamwhite/vkspec-image-offsetliamwhite
shader_recompiler: fix Offset operand usage for non-OpImage*Gather
2024-01-11shader_recompiler: emulate 8-bit and 16-bit storage writes with cas loopLiam
2024-01-11shader_recompiler: fix Offset operand usage for non-OpImage*GatherLiam
2024-01-04Merge pull request #12437 from ameerj/gl-amd-fixesliamwhite
OpenGL: Fixes and workaround updates for AMD
2023-12-26shader_recompiler: use default value for clip distances arrayLiam
2023-12-26shader_recompiler: respect clip distance limits in indexed storeLiam
2023-12-21spirv_emit_context: Fix BaseInstance for OGL spirvAmeer J
2023-12-21shader_recompiler: use float image operations on load/store when requiredLiam
2023-12-18shader_recompiler: use minimal clip distance arrayLiam
2023-12-18shader_recompiler: ignore clip distances beyond driver support levelLiam
2023-11-26Merge branch 'master' into ssbo-alignAmeer J
2023-11-19renderer_vulkan: ignore viewport stores on non-supporting driversLiam
2023-11-18shader_recompiler: Fix spelling of "derivate" (#12067)Ameer J
2023-10-31shader_recompiler: Align SSBO offsets in GlobalMemory functionsAmeer J
2023-10-19Manually robust on Maxwell and earlierKelebek1
2023-09-22emit_spirv: fix incorrect use of descriptor index in image atomicsLiam
2023-09-14shader_recompiler: skip sampler for buffer textures (#11435)liamwhite
2023-09-02shader_recompiler: always declare image format for image buffersLiam
2023-09-01shader_recompiler: fix emulation of 3D textureGradLiam
2023-06-22Remove memory allocations in some hot pathsKelebek1
2023-06-03video_core: Enable support_descriptor_aliasing on Turnip, disable storage ↵bunnei
atomic otherwise.
2023-06-03Avoid using VectorExtractDynamic for subgroup mask on Adreno GPUsBilly Laws
This crashes their shader compiler for some reason.
2023-06-03Implement scaled vertex buffer format emulationBilly Laws
These formats are unsupported by mobile GPUs so they need to be emulated in shaders instead.
2023-05-11Fix Tears of the Kingdom flickering clouds and depths.Kelebek1
2023-04-30Define SampleMask as an arrayKelebek1
2023-04-08shader_recompiler: Use vector arithmetic rather than component-wise in ↵Wollnashorn
ImageGatherSubpixelOffset Should be more efficient and better readable
2023-04-08shader_recompiler: Add subpixel offset for correct rounding at `ImageGather`Wollnashorn
On AMD a subpixel offset of 1/512 of the texel size is applied to the texture coordinates at a ImageGather call to ensure the rounding at the texel centers is done the same way as in Maxwell or other Nvidia architectures. See https://www.reedbeta.com/blog/texture-gathers-and-coordinate-precision/ for more details why this might be necessary. This should fix shadow artifacts at object edges in Zelda: Breath of the Wild (#9957, #6956).
2023-01-29spirv: Fix TXQ with MSAA texturesameerj
2023-01-29Merge pull request #9694 from ameerj/txq-mipsliamwhite
shader_recompiler: TXQ: Skip QueryLevels when possible
2023-01-28Merge pull request #9682 from ameerj/shader-s32bunnei
shader_recompiler: Remove S32 IR type
2023-01-28shader_recompiler: TXQ: Skip QueryLevels when possibleameerj
2023-01-25shader_recompiler: Remove S32 IR typeameerj
The frontend IR opcodes do not distinguish between signed and unsigned integer types. Fixes broken shaders when IR validation/graphics debugging is enabled for shaders that used BitCastS32F32
2023-01-23spirv: fix multisampled image fetchLiam
2023-01-05Run clang-formatBilly Laws
2023-01-05shader_recompiler: Fix shuffle partitioning for >64 invoc-per-subgroup GPUsBilly Laws
The existing implementation only supports 64 invoc-per-subgroup GPUs, and misbehaves on adreno when invocations need to be split into 4 emulated subgroups.
2023-01-05shader_recompiler: SPIRV: Only enable int64 feature when supportedBilly Laws
2023-01-05Vulkan: Add a workaround for input_position on Adreno driversBilly Laws
Adreno drivers will crash compiling geometry shaders if the input position is not wrapped in a gl_in struct.
2023-01-04Video_core: Address feedbackFernando Sahmkow
2023-01-01MacroHLE: Add HLE replacement for base vertex and base instance.Fernando Sahmkow
2022-12-17Merge pull request #7450 from FernandoS27/ndc-vulkanliamwhite
Vulkan: Add support for VK_EXT_depth_clip_control.