Commit Graph

936 Commits

Author SHA1 Message Date
Zephyron 496b010927 shader-recompiler: implement FCSM_TR flow test case
Remove the stubbed implementation of FCSM_TR (Forward Condition Set Mode -
Thread Reduction) flow test and replace it with an initial implementation
using SFlag and ZFlag conditions. This provides basic functionality while
allowing for future refinement based on specific shader architecture
requirements.
2025-01-15 20:19:57 +10:00
Zephyron 9ae0eeeb87 Revert incorrect copyright attribution for non-contributed files
- In commit b3facaa6bb, 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.
2025-01-14 15:33:24 +10:00
Zephyron 749d083197
shader_recompiler: Fix ISBERD instruction implementation
- Simplify ISBERD instruction to handle register-to-register moves
- Remove incorrect CompositeConstruct usage
- Replace with direct register value passing
- Fix compilation errors in internal stage buffer handling
2024-12-31 23:22:54 +10:00
Zephyron 2b5082b30d
shader_recompiler: Use FPRecip in FSWZADD implementation
Simplifies the negative reciprocal calculation in FSWZADD by using the
dedicated FPRecip operation instead of manually constructing a division.
This change:

- Replaces FPDiv(Imm32(f32(1.0f)), src_b) with FPRecip(src_b)
- Results in more efficient code for calculating 1.0/x
- Fixes build errors from undefined IR emitter methods
2024-12-31 22:54:55 +10:00
Zephyron 6f160628c0
shader_recompiler: Fix method names in FSWZADD implementation
Fixes incorrect method names in the floating point swizzled add implementation:
- FNeg -> FPNeg
- FDiv -> FPDiv
- FImm32(1.0f) -> Imm32(ir.f32(1.0f))

These changes align with the correct IR emitter interface naming conventions,
where floating-point operations use the 'FP' prefix and immediate values are
properly constructed using f32().
2024-12-31 22:43:09 +10:00
Zephyron 5d529baafb
shader_recompiler: Implement ISBERD instruction
Implements the Internal Stage Buffer Entry Read (ISBERD) instruction in the
Maxwell shader recompiler. This replaces the previous stubbed implementation
with actual buffer reading functionality.

The implementation:
- Validates unsupported features (skew, o, mode, shift)
- Performs buffer read using IR::InternalStageBufferRead
- Stores the read value to the destination register

This removes the "(STUBBED) called" warning messages that were previously
being logged during shader compilation.
2024-12-31 21:33:37 +10:00
Zephyron d7df623485
shader_recompiler: Implement ISBERD instruction modes and shifts
Implements the ISBERD (Internal Stage Buffer Entry Read) instruction's
mode and shift options that were previously throwing NotImplemented
exceptions. This includes:

- Patch mode for reading patch data
- Prim mode for reading primitive data
- Attr mode for reading attribute data
- U16 shift for 16-bit unsigned values
- B32 shift for 32-bit values

The implementation follows Maxwell's ISA specification for handling
different buffer read modes and data shifts.
2024-12-31 21:30:58 +10:00
Zephyron b3facaa6bb
chore: update project references and add Citron copyright
- Replaced all references to the old project name with Citron.
- Added Citron copyright information alongside existing notices in all files.
2024-12-31 17:07:49 +10:00
Narr the Reg 4f95ee5209
Merge pull request #13075 from liamwhite/mali-having-a-bad-time
shader_recompiler: throw on missing geometry streams in geometry shaders
2024-02-22 11:30:26 -06:00
Liam f46dc31683 shader_recompiler: throw on missing geometry streams in geometry shaders 2024-02-19 00:34:00 -05:00
Liam 462ea921e3 shader_recompiler: fix non-const offset for arrayed image types 2024-02-15 18:49:23 -05:00
Liam cb29aa0473 Revert "shader_recompiler: use only ConstOffset for OpImageFetch"
This reverts commit f296a9ce9a.
2024-02-15 18:38:56 -05:00
Liam f296a9ce9a shader_recompiler: use only ConstOffset for OpImageFetch 2024-02-05 12:01:09 -05:00
liamwhite 97c8b49444
Merge pull request #12644 from liamwhite/vkspec-image-offset
shader_recompiler: fix Offset operand usage for non-OpImage*Gather
2024-01-18 21:18:19 -05:00
Viktor Szépe 90ab89a0b0 Merge remote-tracking branch 'origin/master' into typos3 2024-01-16 00:09:00 +00:00
Viktor Szépe 2044ae6b3a Fix more typos 2024-01-15 23:26:53 +00:00
Liam 2a0d707ce1 shader_recompiler: emulate 8-bit and 16-bit storage writes with cas loop 2024-01-11 16:50:59 -05:00
Liam 2044a289f8 shader_recompiler: fix Offset operand usage for non-OpImage*Gather 2024-01-11 00:56:37 -05:00
Viktor Szépe a959fb011f Fix "Propietary" typo elsewhere 2024-01-07 23:15:38 +00:00
liamwhite 92a331af76
Merge pull request #12437 from ameerj/gl-amd-fixes
OpenGL: Fixes and workaround updates for AMD
2024-01-04 15:53:44 -05:00
Liam d0c60605ab shader_recompiler: use default value for clip distances array 2023-12-26 19:32:47 -05:00
Liam 6697b665ca shader_recompiler: respect clip distance limits in indexed store 2023-12-26 19:10:25 -05:00
Fernando S 820f113d9e
Merge pull request #12435 from liamwhite/type-check
shader_recompiler: ensure derivatives for textureGrad are f32
2023-12-22 17:41:13 +01:00
Ameer J d5d0d2cb0e spirv_emit_context: Fix BaseInstance for OGL spirv 2023-12-21 21:53:24 -05:00
Liam 4aa713e861 shader_recompiler: ensure derivatives for textureGrad are f32 2023-12-21 19:06:33 -05:00
Liam 9e9aed41be shader_recompiler: use float image operations on load/store when required 2023-12-21 14:34:46 -05:00
Ameer J a5b2b8b91b emit_glsl_image: Use inlined texelFetch offsets 2023-12-20 19:24:11 -05:00
Liam fcfa8b680b shader_recompiler: use minimal clip distance array 2023-12-18 22:25:14 -05:00
Liam 94244437de shader_recompiler: ignore clip distances beyond driver support level 2023-12-18 22:25:14 -05:00
liamwhite 6da8301773
Merge pull request #12196 from ameerj/glsl-cbuf-sizes
GLSL: Use known cbuf sizes when possible
2023-12-03 16:27:07 -05:00
Ameer J db1d32485e GLSL: Prefer known used cbuf sizes 2023-11-26 23:25:29 -05:00
Ameer J 1d11fe00a3
Merge branch 'master' into ssbo-align 2023-11-26 21:08:53 -05:00
Liam 473caaff5b renderer_vulkan: ignore viewport stores on non-supporting drivers 2023-11-19 11:27:12 -05:00
liamwhite 4458920799
Merge pull request #12066 from ameerj/nvidia-nsanity
shader_recompiler: add byteswap pattern workaround for Nvidia
2023-11-19 09:49:45 -05:00
Ameer J feb60de5c3
shader_recompiler: Fix spelling of "derivate" (#12067) 2023-11-18 13:39:47 +01:00
Ameer J 9343b81afd shader_recompiler: add byteswap pattern workaround for Nvidia 2023-11-17 22:29:12 -05:00
Ameer J 75c5be55af shader_recompiler: Align SSBO offsets in GlobalMemory functions 2023-10-31 20:14:18 -04:00
Ameer J 7d34800531 shader_recompiler: Align SSBO offsets to meet host requirements
Co-Authored-By: Billy Laws <blaws05@gmail.com>
2023-10-31 20:10:54 -04:00
liamwhite da5c49f22d
Merge pull request #11847 from ameerj/glsl-shfl-fix
emit_glsl_warp: Fix shfl_in_bounds conditional
2023-10-23 10:33:24 -04:00
Ameer J cfe73af6f2 emit_glsl_warp: Fix shfl_in_bounds conditional 2023-10-22 00:45:23 -04:00
Kelebek1 e02ee8e59d Manually robust on Maxwell and earlier 2023-10-19 19:54:31 +01:00
Liam 0448eb6f0f ci: fix new codespell errors 2023-10-02 18:03:05 -04:00
Liam 1e24d02434 emit_spirv: fix incorrect use of descriptor index in image atomics 2023-09-22 00:39:09 -04:00
liamwhite eb4ddb2868
shader_recompiler: skip sampler for buffer textures (#11435) 2023-09-14 15:23:50 +02:00
liamwhite 5b8fdedf4d
Merge pull request #11436 from liamwhite/bad-format
shader_recompiler: always declare image format for image buffers
2023-09-10 13:40:47 -04:00
liamwhite 5e424d791b
Merge pull request #11434 from danilaml/fix-warnings
msvc: set warning level to /W4 globally
2023-09-06 09:12:58 -04:00
Danila Malyutin 785e480b62 msvc: set warning level to /W4 globally
And fix a bunch of warnings
2023-09-03 18:42:10 +04:00
Liam ba4b65e4bc shader_recompiler: always declare image format for image buffers 2023-09-02 17:25:00 -04:00
liamwhite 76bddd3673
Merge pull request #11383 from FernandoS27/are-you-a-wabbit
Fix regressions that damaged compute indirect & use reinterpret for copies with different byteblocksizes
2023-09-02 14:42:42 -04:00
Liam 9245b426e3 shader_recompiler: fix emulation of 3D textureGrad 2023-09-01 22:41:01 -04:00