Commit Graph

54 Commits (462ea921e3bd1288671139353a883053aeeb9a79)

Author SHA1 Message Date
Liam 462ea921e3 shader_recompiler: fix non-const offset for arrayed image types 2 years ago
Liam cb29aa0473 Revert "shader_recompiler: use only ConstOffset for OpImageFetch"
This reverts commit f296a9ce9a.
2 years ago
Liam f296a9ce9a shader_recompiler: use only ConstOffset for OpImageFetch 2 years ago
Liam 2044a289f8 shader_recompiler: fix Offset operand usage for non-OpImage*Gather 2 years ago
Liam 9e9aed41be shader_recompiler: use float image operations on load/store when required 2 years ago
Ameer J feb60de5c3
shader_recompiler: Fix spelling of "derivate" (#12067) 2 years ago
liamwhite eb4ddb2868
shader_recompiler: skip sampler for buffer textures (#11435) 2 years ago
Liam 9245b426e3 shader_recompiler: fix emulation of 3D textureGrad 2 years ago
Wollnashorn 82b78cde73 shader_recompiler: Use vector arithmetic rather than component-wise in ImageGatherSubpixelOffset
Should be more efficient and better readable
3 years ago
Wollnashorn 780240e697 shader_recompiler: Add subpixel offset for correct rounding at `ImageGather`
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).
3 years ago
ameerj a63e17566a spirv: Fix TXQ with MSAA textures 3 years ago
ameerj 2c2e019a44 shader_recompiler: TXQ: Skip QueryLevels when possible 3 years ago
Liam 76a4356e55 spirv: fix multisampled image fetch 3 years ago
FengChen b2a6dde438 video_code: support rectangle texture 3 years ago
Morph 99ceb03a1c general: Convert source file copyright comments over to SPDX
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.
4 years ago
ameerj 7105204a7e emit_spirv: Reduce emit_spirv.h include overhead
emit_spirv.h is included in video_core, which was propagating further includes that video_core did not depend on.
4 years ago
ameerj 68e038404c shader, video_core: Fix GCC build errors 4 years ago
ReinUsesLisp e66d5b88a6 shader: Properly scale image reads and add GL SPIR-V support
Thanks for everything!
4 years ago
ReinUsesLisp 656adee630 spirv: Implement rescaling patching 4 years ago
ReinUsesLisp c15332c44f shader: Add IsTextureScaled opcode 4 years ago
ameerj 06894b0711 emit_spirv_image: Fix depth image implicit lod sample in compute
Ensures all drivers behave the same way in this case.
4 years ago
lat9nq 49946cf780 shader_recompiler, video_core: Resolve clang errors
Silences the following warnings-turned-errors:
-Wsign-conversion
-Wunused-private-field
-Wbraced-scalar-init
-Wunused-variable

And some other errors
4 years ago
ReinUsesLisp 61cd7dd301 shader: Add logging 4 years ago
ReinUsesLisp d738ad4d0b spirv: Fix image and image buffer descriptor index usage 4 years ago
ReinUsesLisp ec6fc5fe78 glasm: Implement TEX and TEXS instructions
Remove lod clamp from texture instructions with lod, as this is not
needed (nor supported).
4 years ago
ReinUsesLisp bed090807a Move SPIR-V emission functions to their own header 4 years ago
ReinUsesLisp bafe9e35a9 spirv: Only add image operands mask when needed 4 years ago
ReinUsesLisp d2e811db2e spirv: Workaround image unsigned offset bug
Workaround bug on Nvidia's OpenGL SPIR-V compiler when using unsigned
texture offsets.
4 years ago
ReinUsesLisp d10cf55353 shader: Implement indexed textures 4 years ago
ameerj 5b8afed871 spirv: Replace Constant/ConstantComposite with Const helper 4 years ago
ReinUsesLisp c9e4609d87 spirv: Fix implicit lod type 4 years ago
ReinUsesLisp 7cfa403683 spirv: Use explicit lods outside of fragment shaders 4 years ago
ReinUsesLisp dbbd4b5496 spirv: Use ConstOffset instead of Offset when possible 4 years ago
ReinUsesLisp 416e1b7441 spirv: Implement image buffers 4 years ago
ReinUsesLisp ab543f1821 spirv: Guard against typeless image reads on unsupported devices 4 years ago
ReinUsesLisp 7cb2ab3585 shader: Implement SULD and SUST 4 years ago
lat9nq 5bfcafa0a2 shader: Address feedback + clang format 4 years ago
lat9nq 0bb85f6a75 shader_recompiler,video_core: Cleanup some GCC and Clang errors
Mostly fixing unused *, implicit conversion, braced scalar init,
fpermissive, and some others.

Some Clang errors likely remain in video_core, and std::ranges is still
a pertinent issue in shader_recompiler

shader_recompiler: cmake: Force bracket depth to 1024 on Clang
Increases the maximum fold expression depth

thread_worker: Include condition_variable

Don't use list initializers in control flow

Co-authored-by: ReinUsesLisp <reinuseslisp@airmail.cc>
4 years ago
ReinUsesLisp ef88552224 shader: Fix TextureGrad 4 years ago
ReinUsesLisp 1f3eb601ac shader: Implement texture buffers 4 years ago
FernandoS27 fd496d0401 shader: Stub TLD4's PTP when it isn't constant 4 years ago
FernandoS27 67afdaf566 shader: Fix TXD 4 years ago
FernandoS27 4d0d29fc20 shader: Address feedback 4 years ago
FernandoS27 d5bfc63088 shader: Implement ImageGradient 4 years ago
FernandoS27 be3e94ae55 shader: Implement TMML partially 4 years ago
FernandoS27 613b48c4a2 shader,spirv: Implement ImageQueryLod. 4 years ago
FernandoS27 dc1a9a3bed shader: Implement TLD 4 years ago
ReinUsesLisp 17063d16a3 shader: Implement TXQ and fix FragDepth 4 years ago
ReinUsesLisp d9c5bd9509 shader: Refactor PTP and other minor changes 4 years ago
FernandoS27 b5db38f50e shader: Add IR opcode for ImageFetch 4 years ago