summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/ir_opt (follow)
Commit message (Collapse)AuthorAgeFilesLines
* video_code: support rectangle textureFengChen2022-08-252-1/+29
|
* GCC 12 fixesLiam2022-04-281-1/+1
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-2313-39/+26
| | | | | 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.
* shader_recompiler: support const buffer indirect addressing on OpenGL SPIR-VLiam2022-04-011-7/+2
|
* dead_code_elimination_pass: Remove unreachable Phi argumentsameerj2022-03-231-0/+27
|
* shader_recompiler/dead_code_elimination: Add DeadBranchElimination passameerj2022-03-221-9/+62
| | | | This adds a pass to eliminate if(false) branches within the shader code
* shader_recompiler: Reduce unused includesameerj2022-03-206-12/+0
|
* Address review commentsLiam2022-03-171-33/+28
|
* shader_recompiler: Use functions for indirect const buffer accessesLiam2022-03-171-0/+2
|
* shader: add support for const buffer indirect addressingLiam2022-03-151-8/+27
|
* Merge pull request #8008 from ameerj/rescale-offsets-arrayFernando S2022-03-151-2/+27
|\ | | | | rescaling_pass: Fix rescaling Color2DArray ImageFetch offsets
| * rescaling_pass: Fix rescaling Color2DArray ImageFetch offsetsameerj2022-03-121-2/+27
| | | | | | | | | | | | 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.
* | Shader decompiler: Fix storage tracking in deko3d.Fernando Sahmkow2022-03-131-1/+2
|/
* lower_int64_to_int32: Add 64-bit atomic fallbacksameerj2022-01-302-2/+67
|
* shaders: Add U64->U32x2 Atomic fallback functionsameerj2022-01-301-0/+18
|
* spirv_atomic: Define U32x2 storage buffers for 64-bit storage atomicsameerj2022-01-291-1/+1
| | | | | | 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
* shader: Add integer attribute get optimization passameerj2021-12-302-0/+24
| | | | Works around an nvidia driver bug, where casting the integer attributes to float and back to an integer always returned 0.
* ShaderCache: Better fix for Shuffling gl_FragCoordFernando Sahmkow2021-11-161-2/+13
|
* Texture Cahe/Shader decompiler: Resize PointSize on rescaling, refactor and make reaper more agressive on 4Gb GPUs.FernandoS272021-11-161-0/+21
|
* rescaling_pass: Fix IR errors when unscalable texture types are encounteredameerj2021-11-161-0/+28
|
* rescaling_pass: Logic simplification and minor style cleanupameerj2021-11-161-32/+17
|
* rescaling_pass: Scale ImageFetch offset if it existsameerj2021-11-161-59/+37
| | | | Plus some code deduplication
* rescaling_pass: Enable PatchImageQueryDimensions on fragment stagesameerj2021-11-161-5/+4
|
* gl_texture_cache/rescaling_pass: minor cleanupameerj2021-11-161-12/+8
|
* rescaling_pass: Fix and simplify shuffle/fragcoord passameerj2021-11-161-26/+20
|
* Shader: Don't rescale FragCoord if used by ShuffleFernando Sahmkow2021-11-161-1/+52
|
* RescalingPass: Agregate pixels on texelFetch while on Fragment ShaderFernando Sahmkow2021-11-161-3/+97
|
* shader: Fix TextureSize check on rescaling.Fernando Sahmkow2021-11-161-27/+21
|
* shader: Properly scale image reads and add GL SPIR-V supportReinUsesLisp2021-11-162-2/+2
| | | | Thanks for everything!
* shader: Properly blacklist and scale image loadsReinUsesLisp2021-11-161-3/+19
|
* shader/rescaling_pass: Patch more instructionsReinUsesLisp2021-11-161-4/+101
|
* shader: Add IsTextureScaled opcodeReinUsesLisp2021-11-161-0/+1
|
* shader: Fix rescaling passReinUsesLisp2021-11-161-1/+1
|
* shader: Fix resolution scaling passReinUsesLisp2021-11-163-34/+30
|
* ShaderDecompiler: Add initial support for rescaling.Fernando Sahmkow2021-11-161-0/+72
|
* ShaderCache: Fix Phi Nodes Type on OGL.Fernando Sahmkow2021-11-011-0/+24
|
* ShaderCache: Order Phi Arguments from farthest away to nearest.Fernando Sahmkow2021-10-311-0/+7
|
* TexturePass: Fix clamping of images as this allowed negative indices.Fernando Sahmkow2021-10-241-1/+1
|
* Shader Compiler: avoid overflowed indices on indixed samplers.Fernando Sahmkow2021-10-171-1/+2
|
* Merge pull request #6767 from ReinUsesLisp/fold-float-packMorph2021-07-301-0/+4
|\ | | | | shader: Fold UnpackFloat2x16 and PackFloat2x16
| * shader: Fold UnpackFloat2x16 and PackFloat2x16ReinUsesLisp2021-07-301-0/+4
| | | | | | | | | | Simplifies the code a bit when possible. These instructions should be no-ops codegen wise.
* | Merge pull request #6722 from ReinUsesLisp/xmad-optsbunnei2021-07-301-14/+187
|\ \ | |/ |/| shader: Fold integer FMA from Nvidia's pattern
| * shader: Fold integer FMA from Nvidia's patternReinUsesLisp2021-07-261-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
| * shader: Use TryInstRecursive on XMAD multiply foldingReinUsesLisp2021-07-261-14/+12
| | | | | | | | Simplify a bit the logic.
* | shader: Mark ConvertF16F32 and ConvertF32F16 as fp16 instructionsReinUsesLisp2021-07-281-0/+2
|/ | | | | | 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.
* shader: Avoid usage of C++20 ranges to build in clangReinUsesLisp2021-07-236-17/+12
|
* shader_recompiler, video_core: Resolve clang errorslat9nq2021-07-231-3/+3
| | | | | | | | | | Silences the following warnings-turned-errors: -Wsign-conversion -Wunused-private-field -Wbraced-scalar-init -Wunused-variable And some other errors
* glsl: Fix tracking of info.uses_shadow_lodameerj2021-07-231-4/+4
|
* dual_vertex_pass: Clang formatameerj2021-07-231-14/+14
|
* shader: Rework varyings and implement passthrough geometry shadersReinUsesLisp2021-07-231-137/+65
| | | | | | Put all varyings into a single std::bitset with helpers to access it. Implement passthrough geometry shaders using host's.
* lower_int64_to_int32: Add missing includelat9nq2021-07-231-0/+1
|
* shader: Add int64 to int32 lowering passReinUsesLisp2021-07-232-0/+217
|
* shader: Teach global memory base tracker to follow vectorsReinUsesLisp2021-07-231-15/+14
|
* shader: Add constant propagation to integer vectorsReinUsesLisp2021-07-231-0/+9
|
* shader: Move loop safety tests to code emissionReinUsesLisp2021-07-231-30/+2
|
* texture_pass: Fix is_read image qualificationameerj2021-07-231-1/+1
| | | | Atomic operations are considered to have both read and write access. This was not being accounted for.
* shader: Align constant buffer sizes to 16 bytesReinUsesLisp2021-07-231-1/+2
| | | | WAR for AMD reading zeroes on uniform buffers of size 2.
* shader: Properly manage attributes not written from previous stagesReinUsesLisp2021-07-231-2/+4
|
* glsl: Address rest of feedbackameerj2021-07-231-2/+9
|
* glsl: Conditionally add EXT_texture_shadow_lodameerj2021-07-231-1/+9
|
* glsl: Implement legacy varyingsameerj2021-07-231-1/+8
|
* glsl: Fix ATOM and implement ATOMSameerj2021-07-231-0/+6
|
* glsl: Track S32 atomicsameerj2021-07-231-2/+8
|
* glsl: Revert ssbo aliasing. Storage Atomics implameerj2021-07-231-7/+2
|
* glsl: Wip storage atomic opsameerj2021-07-231-2/+7
|
* shader: Fix loop safety to SSA passReinUsesLisp2021-07-231-1/+1
|
* shader: Add shader loop safety check settingslat9nq2021-07-231-19/+47
| | | | Also add a setting for enable Nsight Aftermath.
* shader: Fix VertexA Shaders.FernandoS272021-07-232-9/+16
|
* buffer_cache: Reduce uniform buffer size from shader usageReinUsesLisp2021-07-231-3/+16
| | | | Increases performance significantly on certain titles.
* shader,glasm: Implement legacy texcoord loadsReinUsesLisp2021-07-231-52/+18
|
* shader: Track legacy varyingsReinUsesLisp2021-07-231-13/+88
|
* shader: Clang-format secondary texturesReinUsesLisp2021-07-231-2/+2
|
* shader: Fix secondary texturesReinUsesLisp2021-07-231-2/+2
|
* shader: Fix FSwizzleAdd folding when going through phi nodesReinUsesLisp2021-07-231-2/+2
|
* glasm: Remove unintentionally committed fmt::printsReinUsesLisp2021-07-231-2/+0
|
* glasm: Initial implementation of phi nodes on GLASMReinUsesLisp2021-07-231-5/+1
|
* glasm: Rework control flow introducing a syntax listReinUsesLisp2021-07-234-73/+8
| | | | | This commit regresses VertexA shaders, their transformation pass has to be adapted to the new control flow.
* glasm: Implement shuffle and vote instructions on GLASMReinUsesLisp2021-07-231-1/+3
|
* shader: Optimize NVN FallthroughFernandoS272021-07-231-7/+71
|
* shader: Implement Int32 SUATOM/SUREDameerj2021-07-232-1/+103
|
* shader: Address feedbackFernandoS272021-07-231-11/+9
|
* shader: Implement VertexA stageFernandoS272021-07-234-0/+128
|
* shader: Fix BFE s32 undefined checkameerj2021-07-231-1/+1
| | | | Our unit tests were hitting this exception.
* shader: Fix error checking in bitfieldExtract and implement bitfieldInsert foldingReinUsesLisp2021-07-231-5/+14
|
* shader: Add more strict validation the passReinUsesLisp2021-07-231-0/+42
|
* shader: Fix forward referencing identity instructions when inserting phiReinUsesLisp2021-07-231-11/+13
|
* shader: Remove invalidated blocks in dead code elimination passReinUsesLisp2021-07-231-3/+6
|
* shader: Implement indexed texturesReinUsesLisp2021-07-231-17/+72
|
* shader: Intrusively store in a block if it's sealed or notReinUsesLisp2021-07-231-3/+2
|
* shader: Move microinstruction header to the value headerReinUsesLisp2021-07-238-8/+8
|
* shader: Intrusively store register values in block for SSA passReinUsesLisp2021-07-231-21/+43
|
* shader: Implement D3D samplersReinUsesLisp2021-07-231-11/+69
|
* shader: Add constant propagation for arithmetic right shiftsReinUsesLisp2021-07-231-0/+3
|
* shader: Add NVN storage buffer fallbacksReinUsesLisp2021-07-232-38/+61
| | | | | | | When we can't track the SSBO origin of a global memory instruction, leave it as a global memory operation and assume these pointers are in the NVN storage buffer slots, then apply a linear search in the shader's runtime.
* shader: Address feedbackFernandoS272021-07-231-1/+1
|
* shader: Add coarse derivativesFernandoS272021-07-232-8/+2
|
* shader: Implement fine derivates constant propagationFernandoS272021-07-232-0/+71
|
* shader: Fix Phi node typesReinUsesLisp2021-07-231-0/+4
|
* shader: Implement SampleMaskReinUsesLisp2021-07-231-0/+3
|
* shader: Implement PIXLD.MY_INDEXReinUsesLisp2021-07-231-0/+3
|
* spirv: Implement ViewportMask with NV_viewport_array2ReinUsesLisp2021-07-231-0/+3
|
* shader: Implement PrimitiveIdReinUsesLisp2021-07-231-0/+3
|
* shader: Implement tessellation shaders, polygon mode and invocation idReinUsesLisp2021-07-231-0/+41
|
* shader: Mark atomic instructions as writesReinUsesLisp2021-07-231-0/+27
|
* spirv: Implement image buffersReinUsesLisp2021-07-231-1/+18
|
* spirv: Implement Layer storesReinUsesLisp2021-07-231-0/+3
|
* spirv: Rework storage buffers and shader memoryReinUsesLisp2021-07-231-5/+64
|
* shader: Add constant propagation for *&^| binary operationsReinUsesLisp2021-07-231-0/+12
|
* spirv: Define StorageImageWriteWithoutFormat capability when usedReinUsesLisp2021-07-231-0/+5
|
* shader: Implement SR_THREAD_KILLReinUsesLisp2021-07-231-0/+3
|
* shader: Implement ATOM/S and REDameerj2021-07-233-2/+201
|
* spirv: Guard against typeless image reads on unsupported devicesReinUsesLisp2021-07-231-0/+7
|
* shader: Move LaneId to the warp emission file and fix AMDReinUsesLisp2021-07-231-1/+1
|
* shader: Implement SULD and SUSTReinUsesLisp2021-07-232-25/+69
|
* shader: Address feedback + clang formatlat9nq2021-07-231-1/+2
|
* shader_recompiler,video_core: Cleanup some GCC and Clang errorslat9nq2021-07-238-76/+80
| | | | | | | | | | | | | | | | | 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>
* shader: Implement texture buffersReinUsesLisp2021-07-231-18/+62
|
* shader: Address feedbackFernandoS272021-07-231-13/+9
|
* shader: Implement indexed Position and ClipDistancesFernandoS272021-07-231-8/+18
|
* shader: Implement indexed attributesFernandoS272021-07-232-2/+36
|
* shader: Move recursive SSA rewrite to the heapReinUsesLisp2021-07-231-29/+89
|
* shader: Add subgroup masksReinUsesLisp2021-07-231-0/+7
|
* shader: Abstract breadth searches and use the abstractionReinUsesLisp2021-07-232-104/+48
|
* shader: Reimplement GetCbufU64 as GetCbufU32x2ReinUsesLisp2021-07-231-4/+3
| | | | It may generate better code on some compilers and it's easier to handle.
* shader: Rework global memory tracking to use breadth-first searchReinUsesLisp2021-07-231-69/+80
|
* shader: Address feedbackFernandoS272021-07-232-12/+9
|
* shader: Address FeedbackFernandoS272021-07-233-60/+9
|
* shader: Implement SR_LaneIdFernandoS272021-07-231-0/+1
|
* shader: Improve VOTE.VTG stubFernandoS272021-07-231-1/+50
|
* shader: Mark SSBOs as written when they areFernandoS272021-07-231-2/+29
|
* shader: Implement ViewportIndexFernandoS272021-07-231-0/+3
|
* shader: Fold composite extractFernandoS272021-07-231-0/+62
|
* shader: Fold comparisons and Pack/Unpack16FernandoS272021-07-231-1/+41
|
* shader: Fix constant propagation to use reverse post orderReinUsesLisp2021-07-231-1/+2
|
* shader: Implement ClipDistanceFernandoS272021-07-231-0/+10
|
* shader: Implement ImageGradientFernandoS272021-07-232-1/+15
|
* shader,spirv: Implement ImageQueryLod.FernandoS272021-07-232-1/+7
|
* shader: Implement TLDFernandoS272021-07-231-0/+1
|
* shader: Add PointCoord attributeFernandoS272021-07-231-0/+4
|
* shader: Add PointSize attributeameerj2021-07-231-0/+3
|
* shader: Implement FSWZADDameerj2021-07-231-0/+3
|
* shader: Implement BRXFernandoS272021-07-231-1/+20
|
* shader: Implement LDS, STS, LDL, and STS and use SPIR-V 1.4 when availableReinUsesLisp2021-07-231-0/+6
|
* shader: Better interpolation and disabled attributes supportReinUsesLisp2021-07-231-1/+1
|
* shader: Implement front faceReinUsesLisp2021-07-231-0/+3
|
* shader: Implement TXQ and fix FragDepthReinUsesLisp2021-07-232-5/+18
|
* shader: Refactor PTP and other minor changesReinUsesLisp2021-07-231-20/+2
|
* shader: Add IR opcode for ImageFetchFernandoS272021-07-231-0/+5
|
* shader: Implement TLD4.PTPFernandoS272021-07-231-0/+18
|
* shader: Implement TLD4 and TLD4_BFernandoS272021-07-233-1/+29
|
* shader: Implement SHFLameerj2021-07-231-0/+6
|
* shader: Track first bindless argument instead of the instruction itselfReinUsesLisp2021-07-231-1/+1
|
* shader: Fix F2IFernandoS272021-07-232-0/+4
|
* shader: Implement VOTEameerj2021-07-231-0/+6
|
* shader: Fold interpolation multiplicationsReinUsesLisp2021-07-231-0/+34
|
* shader: Implement DMNMX, DSET, DSETPameerj2021-07-232-2/+9
|
* shader: Implement F2FFernandoS272021-07-231-1/+3
|
* shader: Add missing fp64 usage flagsReinUsesLisp2021-07-231-0/+34
|
* shader: Add support for fp16 comparisons and misc fixesReinUsesLisp2021-07-232-0/+18
|
* shader: Fix floating point comparison for FP16FernandoS272021-07-231-0/+24
|
* spirv: Implement VertexId and InstanceId, refactor codeReinUsesLisp2021-07-231-0/+6
|
* shader: Implement I2FReinUsesLisp2021-07-232-0/+44
|
* shader: Add partial rasterizer integrationReinUsesLisp2021-07-232-5/+57
|
* shader: Reorder phi nodes when redefined as undefined opcodesReinUsesLisp2021-07-231-1/+9
|
* shader: Implement CAL inlining function callsReinUsesLisp2021-07-2310-57/+44
|
* shader: Implement FCMPameerj2021-07-231-1/+13
| | | | still need to configure some settings for NV denorm flush and intel NaN
* shader: Partial implementation of LDCReinUsesLisp2021-07-234-15/+146
|
* shader: Initial support for textures and TEXReinUsesLisp2021-07-234-9/+226
|
* shader: Implement HADD2ReinUsesLisp2021-07-232-1/+11
|
* shader: Implement SELameerj2021-07-231-4/+8
|
* shader: Avoid infinite recursion when tracking global memoryReinUsesLisp2021-07-231-5/+26
|
* shader: FMUL, select, RRO, and MUFU fixesReinUsesLisp2021-07-231-1/+1
|
* shader: Add denorm flush supportReinUsesLisp2021-07-232-7/+65
|
* spirv: Add lower fp16 to fp32 passReinUsesLisp2021-07-234-7/+103
|
* shader: Add XMAD multiplication folding optimizationReinUsesLisp2021-07-231-5/+77
|
* spirv: Initial bindings supportReinUsesLisp2021-07-234-61/+210
|
* shader: Fix trackingReinUsesLisp2021-07-231-50/+72
|
* shader: Add support for forward declarationsReinUsesLisp2021-07-231-2/+2
|
* shader: Support SSA loops on IRReinUsesLisp2021-07-233-17/+55
|
* shader: Misc fixesReinUsesLisp2021-07-232-70/+70
|
* shader: Initial implementation of an ASTReinUsesLisp2021-07-233-3/+75
|
* spirv: Initial SPIR-V supportReinUsesLisp2021-07-231-1/+1
|
* shader: Better constant foldingReinUsesLisp2021-07-231-12/+47
|
* shader: Properly store phi on InstReinUsesLisp2021-07-231-10/+12
|
* shader: Add pools and rename filesReinUsesLisp2021-07-231-14/+14
|
* shader: Make typed IRReinUsesLisp2021-07-232-10/+31
|
* shader: Remove illegal character in SSA passReinUsesLisp2021-07-231-1/+1
|
* shader: Constant propagation and global memory to storage bufferReinUsesLisp2021-07-236-36/+573
|
* shader: Initial instruction supportReinUsesLisp2021-07-232-88/+0
|
* shader: SSA and dominanceReinUsesLisp2021-07-233-1/+164
|
* shader: Initial recompiler workReinUsesLisp2021-07-235-0/+213