aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/ir_opt
AgeCommit message (Collapse)Author
2022-03-23dead_code_elimination_pass: Remove unreachable Phi argumentsameerj
2022-03-22shader_recompiler/dead_code_elimination: Add DeadBranchElimination passameerj
This adds a pass to eliminate if(false) branches within the shader code
2022-03-20shader_recompiler: Reduce unused includesameerj
2022-03-17Address review commentsLiam
2022-03-17shader_recompiler: Use functions for indirect const buffer accessesLiam
2022-03-14shader: add support for const buffer indirect addressingLiam
2022-03-15Merge pull request #8008 from ameerj/rescale-offsets-arrayFernando S
rescaling_pass: Fix rescaling Color2DArray ImageFetch offsets
2022-03-13Shader decompiler: Fix storage tracking in deko3d.Fernando Sahmkow
2022-03-12rescaling_pass: Fix rescaling Color2DArray ImageFetch offsetsameerj
ImageFetch offsets for 2D array coordinates have a different composite size than the coordinates. The rescaling pass was not taking this into account. Fixes broken shaders when scaling is enabled in Astral Chain, and likely other titles.
2022-01-29lower_int64_to_int32: Add 64-bit atomic fallbacksameerj
2022-01-29shaders: Add U64->U32x2 Atomic fallback functionsameerj
2022-01-28spirv_atomic: Define U32x2 storage buffers for 64-bit storage atomicsameerj
Some drivers do not support 64-bit atomics, and fallback to atomically modifying U32x2 vectors. This change ensures that U32x2 storage vectors are defined in the spir-v shader when 64-bit atomics are used. Fixes a hang on some devices, notably Intel GPUs, when booting Pokemon Legends Arceus
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-11-16ShaderCache: Better fix for Shuffling gl_FragCoordFernando Sahmkow
2021-11-16Texture Cahe/Shader decompiler: Resize PointSize on rescaling, refactor and ↵FernandoS27
make reaper more agressive on 4Gb GPUs.
2021-11-16rescaling_pass: Fix IR errors when unscalable texture types are encounteredameerj
2021-11-16rescaling_pass: Logic simplification and minor style cleanupameerj
2021-11-16rescaling_pass: Scale ImageFetch offset if it existsameerj
Plus some code deduplication
2021-11-16rescaling_pass: Enable PatchImageQueryDimensions on fragment stagesameerj
2021-11-16gl_texture_cache/rescaling_pass: minor cleanupameerj
2021-11-16rescaling_pass: Fix and simplify shuffle/fragcoord passameerj
2021-11-16Shader: Don't rescale FragCoord if used by ShuffleFernando Sahmkow
2021-11-16RescalingPass: Agregate pixels on texelFetch while on Fragment ShaderFernando Sahmkow
2021-11-16shader: Fix TextureSize check on rescaling.Fernando Sahmkow
2021-11-16shader: Properly scale image reads and add GL SPIR-V supportReinUsesLisp
Thanks for everything!
2021-11-16shader: Properly blacklist and scale image loadsReinUsesLisp
2021-11-16shader/rescaling_pass: Patch more instructionsReinUsesLisp
2021-11-16shader: Add IsTextureScaled opcodeReinUsesLisp
2021-11-16shader: Fix rescaling passReinUsesLisp
2021-11-16shader: Fix resolution scaling passReinUsesLisp
2021-11-16ShaderDecompiler: Add initial support for rescaling.Fernando Sahmkow
2021-11-01ShaderCache: Fix Phi Nodes Type on OGL.Fernando Sahmkow
2021-10-31ShaderCache: Order Phi Arguments from farthest away to nearest.Fernando Sahmkow
2021-10-24TexturePass: Fix clamping of images as this allowed negative indices.Fernando Sahmkow
2021-10-17Shader Compiler: avoid overflowed indices on indixed samplers.Fernando Sahmkow
2021-07-30Merge pull request #6767 from ReinUsesLisp/fold-float-packMorph
shader: Fold UnpackFloat2x16 and PackFloat2x16
2021-07-29Merge pull request #6722 from ReinUsesLisp/xmad-optsbunnei
shader: Fold integer FMA from Nvidia's pattern
2021-07-29shader: Fold UnpackFloat2x16 and PackFloat2x16ReinUsesLisp
Simplifies the code a bit when possible. These instructions should be no-ops codegen wise.
2021-07-27shader: Mark ConvertF16F32 and ConvertF32F16 as fp16 instructionsReinUsesLisp
Fixes instances where fp16 types are not declared on SPIR-V but they are used. This shouldn't happen on master, as it's been uncovered by an additional optimization pass.
2021-07-26shader: Fold integer FMA from Nvidia's patternReinUsesLisp
Fold shaders doing "a * b + c" on integers from the pattern generated by Nvidia's GL compiler. On a somewhat complex compute shader it reduces the code size by 16 instructions from 2 matches on Turing GPUs. On Intel as extracted from KHR_pipeline_executable_properties: Before the optimization: ``` Instruction Count: 2057 Basic Block Count: 45 Scratch Memory Size: 14752 Spill Count: 232 Fill Count: 261 SEND Count: 610 Cycle Count: 11325 ``` After the optimization: ``` Instruction Count: 2046 Basic Block Count: 44 Scratch Memory Size: 13728 Spill Count: 219 Fill Count: 268 SEND Count: 604 Cycle Count: 11367 ```
2021-07-26shader: Use TryInstRecursive on XMAD multiply foldingReinUsesLisp
Simplify a bit the logic.
2021-07-22shader: Avoid usage of C++20 ranges to build in clangReinUsesLisp
2021-07-22shader_recompiler, video_core: Resolve clang errorslat9nq
Silences the following warnings-turned-errors: -Wsign-conversion -Wunused-private-field -Wbraced-scalar-init -Wunused-variable And some other errors
2021-07-22glsl: Fix tracking of info.uses_shadow_lodameerj
2021-07-22dual_vertex_pass: Clang formatameerj
2021-07-22shader: Rework varyings and implement passthrough geometry shadersReinUsesLisp
Put all varyings into a single std::bitset with helpers to access it. Implement passthrough geometry shaders using host's.
2021-07-22lower_int64_to_int32: Add missing includelat9nq
2021-07-22shader: Add int64 to int32 lowering passReinUsesLisp
2021-07-22shader: Teach global memory base tracker to follow vectorsReinUsesLisp
2021-07-22shader: Add constant propagation to integer vectorsReinUsesLisp