aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader/decode
AgeCommit message (Collapse)Author
2020-01-29shader/other: Fix skips for SYNC and BRKReinUsesLisp
2020-01-29shader/other: Stub S2R LaneIdReinUsesLisp
2020-01-27shader/bfi: Implement register-constant buffer variantReinUsesLisp
It's the same as the variant that was implemented, but it takes the operands from another source.
2020-01-27shader/arithmetic: Implement FCMPReinUsesLisp
Compares the third operand with zero, then selects between the first and second.
2020-01-26shader/memory: Implement ATOM.ADDReinUsesLisp
ATOM operates atomically on global memory. For now only add ATOM.ADD since that's what was found in commercial games. This asserts for ATOM.ADD.S32 (handling the others as unimplemented), although ATOM.ADD.U32 shouldn't be any different. This change forces us to change the default type on SPIR-V storage buffers from float to uint. We could also alias the buffers, but it's simpler for now to just use uint. While we are at it, abstract the code to avoid repetition.
2020-01-25Shader_IR: Address feedback.Fernando Sahmkow
2020-01-25shader/memory: Implement STL.S16 and STS.S16ReinUsesLisp
2020-01-25shader/memory: Implement unaligned LDL.S16 and LDS.S16ReinUsesLisp
2020-01-25shader/memory: Move unaligned load/store to functionsReinUsesLisp
2020-01-25shader/memory: Implement LDL.S16 and LDS.S16ReinUsesLisp
2020-01-24Shader_IR: Change name of TrackSampler function so it does not confuse with ↵Fernando Sahmkow
the type.
2020-01-24Shader_IR: Propagate bindless index into the GL compiler.Fernando Sahmkow
2020-01-24Shader_IR: deduce size of indexed samplersFernando Sahmkow
2020-01-24Shader_IR: Setup Indexed Samplers on the IRFernando Sahmkow
2020-01-24Merge pull request #3273 from FernandoS27/txd-arraybunnei
Shader_IR: Implement TXD Array.
2020-01-16shader/memory: Implement ATOMS.ADD.U32ReinUsesLisp
2020-01-14Merge pull request #3287 from ReinUsesLisp/ldg-stg-16bunnei
shader_ir/memory: Implement u16 and u8 for STG and LDG
2020-01-09shader_ir/texture: Simplify AOFFI codeReinUsesLisp
2020-01-09shader_ir/memory: Implement u16 and u8 for STG and LDGReinUsesLisp
Using the same technique we used for u8 on LDG, implement u16. In the case of STG, load memory and insert the value we want to set into it with bitfieldInsert. Then set that value.
2020-01-04Shader_IR: Implement TXD Array.Fernando Sahmkow
This commit extends the compilation of TXD to support array samplers on TXD.
2019-12-31Merge pull request #3239 from ReinUsesLisp/p2rbunnei
shader/p2r: Implement P2R Pr
2019-12-26Merge pull request #3228 from ReinUsesLisp/ptpbunnei
shader/texture: Implement AOFFI and PTP for TLD4 and TLD4S
2019-12-21Merge pull request #3235 from ReinUsesLisp/ldg-u8bunnei
shader/memory: Implement LDG.U8 and unaligned U8 loads
2019-12-20shader/p2r: Implement P2R PrReinUsesLisp
P2R dumps predicate or condition codes state to a register. This is useful for unit testing.
2019-12-20shader/r2p: Refactor P2R to support P2RReinUsesLisp
2019-12-19Merge pull request #3234 from ReinUsesLisp/i2f-u8-selectorbunnei
shader/conversion: Implement byte selector in I2F
2019-12-18shader/memory: Implement LDG.U8 and unaligned U8 loadsReinUsesLisp
LDG can load single bytes instead of full integers or packs of integers. These have the advantage of loading bytes that are not aligned to 4 bytes. To emulate these this commit gets the byte being referenced (by doing "address & 3" and then using that to extract the byte from the loaded integer: result = bitfieldExtract(loaded_integer, (address % 4) * 8, 8)
2019-12-18shader/conversion: Implement byte selector in I2FReinUsesLisp
I2F's byte selector is used to choose what bytes to convert to float. e.g. if the input is 0xaabbccdd and the selector is ".B3" it will convert 0xaa. The default (when it's not shown in nvdisasm) is ".B0", in that example the default would convert 0xdd to float.
2019-12-17shader/texture: Properly shrink unused entries in size mismatchesReinUsesLisp
When a image format mismatches we were inserting zeroes to the texture itself. This was not handling cases were the mismatch uses less coordinates than the guest shader code. Address that by resizing the vector.
2019-12-16shader/texture: Implement TLD4.PTPReinUsesLisp
2019-12-16shader/texture: Enable arrayed TLD4ReinUsesLisp
2019-12-16shader/texture: Implement AOFFI for TLD4SReinUsesLisp
2019-12-16shader/texture: Remove unnecesary parenthesisReinUsesLisp
2019-12-11Shader_IR: Correct TLD4S Depth Compare.Fernando Sahmkow
2019-12-11Shader_Ir: Correct TLD4S encoding and implement f16 flag.Fernando Sahmkow
2019-12-11Shader_Ir: default failed tracks on bindless samplers to null values.Fernando Sahmkow
2019-12-10shader: Implement MEMBAR.GLReinUsesLisp
Implement using memoryBarrier in GLSL and OpMemoryBarrier on SPIR-V.
2019-12-09shader_ir/other: Implement S2R InvocationIdReinUsesLisp
2019-12-09shader: Keep track of shaders using warp instructionsReinUsesLisp
2019-12-09shader_ir/memory: Implement patch storesReinUsesLisp
2019-12-06Merge pull request #3109 from FernandoS27/new-instrbunnei
Implement FLO & TXD Instructions on GPU Shaders
2019-11-22shader/texture: Handle TLDS texture type mismatchesReinUsesLisp
Some games like "Fire Emblem: Three Houses" bind 2D textures to offsets used by instructions of 1D textures. To handle the discrepancy this commit uses the the texture type from the binding and modifies the emitted code IR to build a valid backend expression. E.g.: Bound texture is 2D and instruction is 1D, the emitted IR samples a 2D texture in the coordinate ivec2(X, 0).
2019-11-22shader/texture: Deduce texture buffers from lockerReinUsesLisp
Instead of specializing shaders to separate texture buffers from 1D textures, use the locker to deduce them while they are being decoded.
2019-11-19shader/other: Reduce DEPBAR log severityReinUsesLisp
While DEPBAR is stubbed it doesn't change anything from our end. Shading languages handle what this instruction does implicitly. We are not getting anything out fo this log except noise.
2019-11-18Shader_IR: Address FeedbackFernando Sahmkow
2019-11-14Shader_IR: Implement TXD instruction.Fernando Sahmkow
2019-11-14Shader_IR: Implement FLO instruction.Fernando Sahmkow
2019-11-07shader_ir/warp: Implement FSWZADDReinUsesLisp
2019-11-07gl_shader_decompiler: Reimplement shuffles with platform agnostic intrinsicsReinUsesLisp
2019-11-07shader/decode: Reduce severity of arithmetic rounding warningsReinUsesLisp