aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Instructions
AgeCommit message (Collapse)Author
2023-04-27Move solution and projects to srcTSR Berry
2023-04-25Refactor attribute handling on the shader generator (#4565)gdkchan
* Refactor attribute handling on the shader generator * Implement gl_ViewportMask[] * Add back the Intel FrontFacing bug workaround * Fix GLSL transform feedback outputs mistmatch with fragment stage * Shader cache version bump * Fix geometry shader recognition * PR feedback * Delete GetOperandDef and GetOperandUse * Remove replacements that are no longer needed on GLSL compilation on Vulkan * Fix incorrect load for per-patch outputs * Fix build
2023-01-21Implement CSET and CSETP shader instructions (#4318)gdkchan
* Implement CSET and CSETP shader instructions * Shader cache version bump * Fix CC.HI
2022-12-29Use vector outputs for texture operations (#3939)gdkchan
* Change AggregateType to include vector type counts * Replace VariableType uses with AggregateType and delete VariableType * Support new local vector types on SPIR-V and GLSL * Start using vector outputs for texture operations * Use vectors on more texture operations * Use vector output for ImageLoad operations * Replace all uses of single destination texture constructors with multi destination ones * Update textureGatherOffsets replacement to split vector operations * Shader cache version bump Co-authored-by: Ac_K <Acoustik666@gmail.com>
2022-11-18Move gl_Layer from vertex to geometry if GPU does not support it on vertex ↵gdkchan
(#3866) * Move gl_Layer from vertex to geometry if GPU does not support it on vertex * Shader cache version bump * PR feedback
2022-11-11Fix VertexId and InstanceId on Vulkan (#3833)gdkchan
* Fix VertexId and InstanceId on Vulkan * Shader cache version bump
2022-10-15Improve shader BRX instruction code generation (#3759)gdkchan
* Improve shader BRX instruction code generation * Shader cache version bump, add some comments and asserts
2022-10-03Fix shader SULD (bindless) instruction using wrong register as handle (#3732)gdkchan
* GLSL: Do not generate scale helpers if we have no textures * Fix shader SULD (bindless) instruction using wrong register as handle
2022-10-01Fix incorrect tessellation inputs/outputs (#3728)gdkchan
* Fix incorrect tessellation inputs/outputs * Shader cache version bump
2022-09-13Fix bindless 1D textures having a buffer type on the shader (#3697)gdkchan
* Fix bindless 1D textures having a buffer type on the shader * Shader cache version bump
2022-07-24Add support for conditional (with CC) shader Exit instructions (#3470)gdkchan
* Add support for conditional (with CC) shader Exit instructions * Shader cache version bump * Make CSM conditions default to false for EXIT.CC
2022-07-23Avoid adding shader buffer descriptors for constant buffers that are not ↵gdkchan
used (#3478) * Avoid adding shader buffer descriptors for constant buffers that are not used * Shader cache version
2022-05-12Implement Viewport Transform Disable (#3328)riperiperi
* Initial implementation (no specialization) * Use specialization * Fix render scale, increase code gen version * Revert accidental change * Address Feedback
2022-04-08Implement VMAD shader instruction and improve InvocationInfo and ISBERD ↵gdkchan
handling (#3251) * Implement VMAD shader instruction and improve InvocationInfo and ISBERD handling * Shader cache version bump * Fix typo
2022-04-08Lop3Expression: Optimize expressions (#3184)merry
* lut3 * bugfixes * TruthTable * false/true -> 0/-1 * add or to expressions * fix inversions * increment cache version
2022-01-10Implement IMUL, PCNT and CONT shader instructions, fix FFMA32I and HFMA32I ↵gdkchan
(#2972) * Implement IMUL shader instruction * Implement PCNT/CONT instruction and fix FFMA32I * Add HFMA232I to the table * Shader cache version bump * No Rc on Ffma32i
2021-12-08Fix SUATOM and other texture shader instructions with RZ dest (#2885)gdkchan
* Fix SUATOM and other texture shader instructions with RZ dest * Shader cache version bump
2021-12-08Implement remaining shader double-precision instructions (#2845)gdkchan
* Implement remaining shader double-precision instructions * Shader cache version bump
2021-12-05Fix FLO.SH shader instruction with a input of 0 (#2876)gdkchan
* Fix FLO.SH shader instruction with a input of 0 * Shader cache version bump
2021-11-14Fix shader integer from/to double conversion (#2831)gdkchan
2021-11-08Support shader gl_Color, gl_SecondaryColor and gl_TexCoord built-ins (#2817)gdkchan
* Support shader gl_Color, gl_SecondaryColor and gl_TexCoord built-ins * Shader cache version bump * Fix back color value on fragment shader * Disable IPA multiplication for fixed function attributes and back color selection
2021-11-08Fix InvocationInfo on geometry shader and bindless default integer const (#2822)gdkchan
* Fix InvocationInfo on geometry shader and bindless default integer const * Shader cache version bump * Consistency for the default value
2021-10-28Add support for fragment shader interlock (#2768)gdkchan
* Support coherent images * Add support for fragment shader interlock * Change to tree based match approach * Refactor + check for branch targets and external registers * Make detection more robust * Use Intel fragment shader ordering if interlock is not available, use nothing if both are not available * Remove unused field
2021-10-24Preserve image types for shader bindless surface instructions (.D variants) ↵gdkchan
(#2779) * Preserve image types for SULD/SUST .D variants * Make format unknown for surface atomic if bindless and not sized
2021-10-18Fix shader 8-bit and 16-bit STS/STG (#2741)gdkchan
* Fix 8 and 16-bit STG * Fix 8 and 16-bit STS * Shader cache version bump
2021-10-18Initial tessellation shader support (#2534)gdkchan
* Initial tessellation shader support * Nits * Re-arrange built-in table * This is not needed anymore * PR feedback
2021-10-17Add missing U8/S8 types from shader I2I instruction (#2740)gdkchan
* Add missing U8/S8 types from shader I2I instruction * Better names * Fix dstIsSignedInt
2021-10-17Implement SHF (funnel shift) shader instruction (#2702)gdkchan
* Implement SHF shader instruction * Shader cache version bump * Better name
2021-10-12Rewrite shader decoding stage (#2698)gdkchan
* Rewrite shader decoding stage * Fix P2R constant buffer encoding * Fix PSET/PSETP * PR feedback * Log unimplemented shader instructions * Implement NOP * Remove using * PR feedback
2021-09-02Fix TXQ for 3D textures. (#2613)riperiperi
* Fix TXQ for 3D textures. Assumes the texture is 3D if the component mask contains Z. This fixes a bug in UE4 games where parts of the map had garbage pointers to lighting voxels, as the lookup 3D texture was not being initialized. Most notable game is THPS1+2. May need another PR to keep image store data alive and properly flush it in order using the AutoDeleteCache. * Get sampler type for TextureSize from bound textures.
2021-08-31Implement Shader Instructions SUATOM and SURED (#2090)riperiperi
* Initial Implementation * Further improvements (no support for float/64-bit types) * Merge atomic and reduce instructions, add missing format switch * Fix rebase issues. * Not used. * Whoops. Fixed. * Partial implementation of inc/dec, cleanup and TODOs * Remove testing path * Address Feedback
2021-08-27Initial support for shader attribute indexing (#2546)gdkchan
* Initial support for shader attribute indexing * Support output indexing too, other improvements * Fix order * Address feedback
2021-08-11Use a new approach for shader BRX targets (#2532)gdkchan
* Use a new approach for shader BRX targets * Make shader cache actually work * Improve the shader pattern matching a bit * Extend LDC search to predecessor blocks, catches more cases * Nit * Only save the amount of constant buffer data actually used. Avoids crashes on partially mapped buffers * Ignore Rd on predicate instructions, as they do not have a Rd register (catches more cases)
2021-07-09Unscale textureSize when resolution scaling is used (#2441)gdkchan
* Unscale textureSize when resolution scaling is used * Fix textureSize on compute * Flag texture size as needing res scale values too
2021-06-23Fix shader texture LOD query (#2397)gdkchan
2021-05-19Move shader resource descriptor creation out of the backend (#2290)gdkchan
* Move shader resource descriptor creation out of the backend * Remove now unused code, and other nits * Shader cache version bump * Nits * Set format for bindless image load/store * Fix buffer write flag
2021-04-20Only enable clip distance if written to on shader (#2217)gdkchan
* Only enable clip distance if written to on shader * Signal InstanceId use through FeatureFlags * Shader cache version bump
2021-04-02Implement shader HelperThreadNV (#2163)gdkchan
* Implement shader HelperThreadNV * Bump shader cache version * Use gl_HelperInvocation since its supported across all vendors * Nit
2021-03-27Fix ZN flags set for shader instructions using RZ.CC dest (#2147)gdkchan
* Fix ZN flags set for shader instructions using RZ.CC dest * Shader cache version bump and nits
2021-01-28Support multiple destination operands on shader IR and shuffle predicates ↵gdkchan
(#1964) * Support multiple destination operands on shader IR and shuffle predicates * Cache version change
2021-01-14Fix shader LOP3 predicate write condition (#1910)gdkchan
* Fix LOP3 predicate write condition * Bump shader cache version
2021-01-13Implement shader CC mode for ISCADD, X mode for ISETP and fix STL/STS/STG ↵gdkchan
with RZ (#1901) * Implement shader CC mode for ISCADD, X mode for ISETP and fix STS/STG with RZ * Fix STG too and bump shader cache version * Fix wrong name * Fix Carry being inverted on comparison
2021-01-08Support conditional on BRK and SYNC shader instructions (#1878)gdkchan
* Support conditional on BRK and SYNC shader instructions * Add TODO comment and bump cache version
2020-11-13Salieri: shader cache (#1701)Mary
Here come Salieri, my implementation of a disk shader cache! "I'm sure you know why I named it that." "It doesn't really mean anything." This implementation collects shaders at runtime and cache them to be later compiled when starting a game.
2020-11-10Implement ATOM shader instruction (#1687)gdkchan
* Implement ATOM shader instruction * Fix reduction type decoding
2020-11-02Support res scale on images, correctly blacklist for SUST, move logic out of ↵riperiperi
backend. (#1657) * Support res scale on images, correctly blacklist for SUST, move logic out of backend. * Fix Typo
2020-10-25Implement CAL and RET shader instructions (#1618)gdkchan
* Add support for CAL and RET shader instructions * Remove unused stuff * Fix a bug that could cause the wrong values to be passed to a function * Avoid repopulating function id dictionary every time * PR feedback * Fix vertex shader A/B merge
2020-10-25Fix shader image load/store array index register (#1637)gdkchan
* Fix shader image load/store array index register * Y should come before the array index
2020-10-12Implement LEA.HI shader instruction (#1609)gdkchan
2020-10-12Add support for shader constant buffer slot indexing (#1608)gdkchan
* Add support for shader constant buffer slot indexing * Fix typo