summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glsl
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-01-15Fix more typosViktor Szépe
2023-12-20emit_glsl_image: Use inlined texelFetch offsetsAmeer J
2023-12-03Merge pull request #12196 from ameerj/glsl-cbuf-sizesliamwhite
GLSL: Use known cbuf sizes when possible
2023-11-26GLSL: Prefer known used cbuf sizesAmeer J
2023-11-26Merge branch 'master' into ssbo-alignAmeer J
2023-11-18shader_recompiler: Fix spelling of "derivate" (#12067)Ameer J
2023-10-31shader_recompiler: Align SSBO offsets in GlobalMemory functionsAmeer J
2023-10-22emit_glsl_warp: Fix shfl_in_bounds conditionalAmeer J
2023-09-01shader_recompiler: fix emulation of 3D textureGradLiam
2023-08-18Shader Recomnpiler: implement textuzreGrad 3D emulation constant propagationFernando Sahmkow
2023-06-22Remove memory allocations in some hot pathsKelebek1
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-03-12general: fix spelling mistakesLiam
2023-02-08glsl_emit_context: Remove redeclarations of gl_SampleID and gl_SampleMaskameerj
These built-ins seem to be available without needing to be declared for fragment shaders, similar i.e. to gl_FragDepth
2023-01-29emit_glsl_image: Implement TXQ with MSAA texturesameerj
Also fixes for texture buffers, which do not have mips eithers.
2023-01-29Merge pull request #9694 from ameerj/txq-mipsliamwhite
shader_recompiler: TXQ: Skip QueryLevels when possible
2023-01-28Merge pull request #9687 from ameerj/ogl-shader-msbunnei
glasm, glsl: Implement multisampled Image Fetch
2023-01-28shader_recompiler: TXQ: Skip QueryLevels when possibleameerj
2023-01-28emit_glsl_image: Fix ImageFetch for MSAA texturesameerj
2023-01-27glsl: Add MS sampler typesameerj
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-04Video_core: Address feedbackFernando Sahmkow
2023-01-01MacroHLE: Add OpenGL SupportFernando Sahmkow
2022-11-18Merge pull request #9253 from vonchenplus/attr_layerliamwhite
shader: Implement miss attribute layer
2022-11-17shader: Implement miss attribute layerFengChen
2022-11-07video_core: Fix few issues in Tess stageFengChen
2022-11-04video_core: Fix SNORM texture buffer emulating error (#9001)Feng Chen
2022-11-03Merge pull request #8858 from vonchenplus/mipmapbunnei
video_core: Generate mipmap texture by drawing
2022-10-22CMakeLists: Disable C4100 and C4324Morph
Disabling C4100 is similar to -Wno-unused-parameter
2022-09-23chore: fix some typosAndrea Pappacoda
Fix some typos reported by Lintian
2022-09-20video_core: Generate mipmap texture by drawingFengChen
2022-08-25video_code: support rectangle textureFengChen
2022-04-23general: Convert source file copyright comments over to SPDXMorph
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.
2022-04-01shader_compiler: support const buffer indirect addressing in GLSLLiam
2022-03-20shader_recompiler: Reduce unused includesameerj
2022-01-29emit_glsl_atomic: Implement 32x2 fallback atomic opsameerj
2022-01-29shaders: Add U64->U32x2 Atomic fallback functionsameerj
2022-01-17shader_recompiler: fix potential OOB accessv1993
Found by static analysis with PVS-Studio. Original check wasn't actually checking for OOB and would segfault in case of it.
2022-01-04glsl: Remove unreachable returnNarr the Reg
2021-12-29glsl: Add boolean reference workaroundameerj
2021-12-29glsl_context_get_set: Add alternative cbuf type for broken driversameerj
some drivers have a bug bitwise converting floating point cbuf values to uint variables. This adds a workaround for these drivers to make all cbufs uint and convert to floating point as needed.
2021-12-29emit_glsl_integer: Use negation work aroundameerj
2021-12-29shader: Add integer attribute get optimization passameerj
Works around an nvidia driver bug, where casting the integer attributes to float and back to an integer always returned 0.
2021-12-24emit_glsl_floating_point: Fix FPNeg on newer Nvidia driversameerj
2021-12-18Remove glsl handle legacy related codevonchenplus