aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen
AgeCommit message (Collapse)Author
2022-07-05Add support for alpha to coverage dithering (#3069)gdkchan
* Add support for alpha to coverage dithering * Shader cache version bump * Fix wrong alpha register * Ensure support buffer is cleared * New shader specialization based approach
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-04Fix shader textureSize with multisample and buffer textures (#3240)gdkchan
* Fix shader textureSize with multisample and buffer textures * Replace out param with tuple return value
2022-02-11Fix missing geometry shader passthrough inputs (#3106)gdkchan
* Fix missing geometry shader passthrough inputs * Shader cache version bump
2022-01-21Stop using glTransformFeedbackVaryings and use explicit layout on the shader ↵gdkchan
(#3012) * Stop using glTransformFeedbackVarying and use explicit layout on the shader * This is no longer needed * Shader cache version bump * Fix gl_PerVertex output for tessellation control shaders
2022-01-08Add support for render scale to vertex stage. (#2763)riperiperi
* Add support for render scale to vertex stage. Occasionally games read off textureSize on the vertex stage to inform the fragment shader what size a texture is without querying in there. Scales were not present in the vertex shader to correct the sizes, so games were providing the raw upscaled texture size to the fragment shader, which was incorrect. One downside is that the fragment and vertex support buffer description must be identical, so the full size scales array must be defined when used. I don't think this will have an impact though. Another is that the fragment texture count must be updated when vertex shader textures are used. I'd like to correct this so that the update is folded into the update for the scales. Also cleans up a bunch of things, like it making no sense to call CommitRenderScale for each stage. Fixes render scale causing a weird offset bloom in Super Mario Party and Clubhouse Games. Clubhouse Games still has a pixelated look in a number of its games due to something else it does in the shader. * Split out support buffer update, lazy updates. * Commit support buffer before compute dispatch * Remove unnecessary qualifier. * Address Feedback
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-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-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-18Another workaround for NVIDIA driver 496.13 shader bug (#2750)riperiperi
* Another workaround for NVIDIA driver 496.13 shader bug This might work better than the other one. Give this a test to see if it fixes/doesn't fix issues with the other one. The problem seems to be when any variable assignment happens with a negation. `temp_1 = -temp_0;` seems to trigger weird behaviour, but `temp_1 = 0.0 - temp_0;` does not. This also might to extend towards integer types? * Update cache version * Add disclaimer comment * Wording
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-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-19Use shader subgroup extensions if shader ballot is not supported (#2627)gdkchan
* Use shader subgroup extensions if shader ballot is not supported * Shader cache version bump + cleanup * The type is still required on the table
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-30Fix out-of-bounds shader thread shuffle (#2605)gdkchan
* Fix out-of-bounds shader thread shuffle * Shader cache version bump
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-11Workaround for Intel FrontFacing built-in variable bug (#2540)gdkchan
2021-08-11Make sure attributes used on subsequent shader stages are initialized (#2538)gdkchan
2021-08-11Replace BGRA and scale uniforms with a uniform block (#2496)gdkchan
* Replace BGRA and scale uniforms with a uniform block * Setting the data again on program change is no longer needed * Optimize and resolve some warnings * Avoid redundant support buffer updates * Some optimizations to BindBuffers (now inlined) * Unify render scale arrays
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-07-06Allow shader language and target API to be specified on the shader ↵gdkchan
translator (#2402)
2021-06-25Fix default value for unwritten shader outputs (#2412)gdkchan
* Fix shader default output values * Shader cache version bump
2021-06-25Fix texture sampling with depth compare and LOD level or bias (#2404)gdkchan
* Fix texture sampling with depth compare and LOD level or bias * Shader cache version bump * nit: Sorting
2021-06-23Pass all inputs when geometry shader passthrough is enabled (#2362)gdkchan
* Pass all inputs when geometry shader passthrough is enabled * Shader cache version bump
2021-05-20Fix constant buffer array size when indexing is used and other buffer ↵gdkchan
descriptor and resolution scale regressions (#2298) * Fix constant buffer array size when indexing is used * Change default QueryConstantBufferUse value * Fix more regressions * Ensure proper order
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-05-01Fix shader buffer write flag on atomic instructions (#2261)gdkchan
* Fix shader buffer write flag on atomic instructions * 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-08Improve Buffer Textures and flush Image Stores (#2088)riperiperi
* Improve Buffer Textures and flush Image Stores Fixes a number of issues with buffer textures: - Reworked Buffer Textures to create their buffers in the TextureManager, then bind them with the BufferManager later. - Fixes an issue where a buffer texture's buffer could be invalidated after it is bound, but before use. - Fixed width unpacking for large buffer textures. The width is now 32-bit rather than 16. - Force buffer textures to be rebound whenever any buffer is created, as using the handle id wasn't reliable, and the cost of binding isn't too high. Fixes vertex explosions and flickering animations in UE4 games. * Set ImageStore flag... for ImageStore. * Check the offset and size.
2021-01-29Implement geometry shader passthrough (#1961)gdkchan
* Implement geometry shader passthrough * Cache version change
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-27Support shader F32 to Bool reinterpretation (#1969)gdkchan
2021-01-27Fix regression on shader atomic SSBO operations (#1967)gdkchan
* Fix regression on shader atomic SSBO operations * Update comment
2021-01-26Add support for shader atomic min/max (S32) (#1948)gdkchan
2021-01-17Implement lazy flush-on-read for Buffers (SSBO/Copy) (#1790)riperiperi
* Initial implementation of buffer flush (VERY WIP) * Host shaders need to be rebuilt for the SSBO write flag. * New approach with reserved regions and gl sync * Fix a ton of buffer issues. * Remove unused buffer unmapped behaviour * Revert "Remove unused buffer unmapped behaviour" This reverts commit f1700e52fb8760180ac5e0987a07d409d1e70ece. * Delete modified ranges on unmap Fixes potential crashes in Super Smash Bros, where a previously modified range could lie on either side of an unmap. * Cache some more delegates. * Dispose Sync on Close * Also create host sync for GPFifo syncpoint increment. * Copy buffer optimization, add docs * Fix race condition with OpenGL Sync * Enable read tracking on CommandBuffer, insert syncpoint on WaitForIdle * Performance: Only flush individual pages of SSBO at a time This avoids flushing large amounts of data when only a small amount is actually used. * Signal Modified rather than flushing after clear * Fix some docs and code style. * Introduce a new test for tracking memory protection. Sucessfully demonstrates that the bug causing write protection to be cleared by a read action has been fixed. (these tests fail on master) * Address Comments * Add host sync for SetReference This ensures that any indirect draws will correctly flush any related buffer data written before them. Fixes some flashing and misplaced world geometry in MH rise. * Make PageAlign static * Re-enable read tracking, for reads.
2020-12-02Implement Force Early Z Register (#1755)riperiperi
2020-11-09Simplify logic for bindless texture handling (#1667)gdkchan
* Simplify logic for bindless texture handling * Nits
2020-11-08Use explicit buffer and texture bindings on shaders (#1666)gdkchan
* Use explicit buffer and texture bindings on shaders * More XML docs and other nits
2020-11-06Support single precision contants for double precision operations (#1673)gdkchan
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-28Add scaling for Texture2DArray when using TexelFetch. (#1645)riperiperi
* Add scaling for Texture2DArray when using TexelFetch. * Should only really trigger for Texture2D. (do not emit texelfetch for TextureBufferArray(?) and Texture1DArray) * Address nit.
2020-10-28Avoid sampler conflicts on bindless samplers with the same name (#1642)gdkchan
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-20Fix image binding format (#1625)gdkchan
* Fix image binding format * XML doc
2020-10-17Fix gl_in being used with built-in variables that are not per-vertex (#1624)gdkchan
2020-10-12Add support for shader constant buffer slot indexing (#1608)gdkchan
* Add support for shader constant buffer slot indexing * Fix typo