Commit graph

5 commits

Author SHA1 Message Date
Berkan Diler 98c838b24c
Use BitOperations methods and delete now unused BitUtils methods (#3134)
Replaces BitUtils.CountTrailingZeros/CountLeadingZeros/IsPowerOfTwo with BitOperations methods
2022-02-18 02:35:23 +01:00
gdkchan 76e5af967a
Fix buffer to 3D texture copy (#1354) 2020-07-04 01:37:36 +02:00
riperiperi bea1fc2e8d
Optimize texture format conversion, and MethodCopyBuffer (#1274)
* Improve performance when converting texture formats.

Still more work to do.

* Speed up buffer -> texture copies.

No longer copies byte by byte. Fast path when formats are identical.

* Fix a few things, 64 byte block fast copy.

* Spacing cleanup, unrelated change.

* Fix base offset calculation for region copies.

* Fix Linear -> BlockLinear

* Fix some nits. (part 1 of review feedback)

* Use a generic version of the Convert* functions rather than lambdas.

This is some real monkey's paw shit.

* Remove unnecessary span constructor.

* Revert "Use a generic version of the Convert* functions rather than lambdas."

This reverts commit aa43dcfbe8.

* Fix bug with rectangle destination writing, better rectangle calculation for linear textures.
2020-06-13 19:31:06 -03:00
gdkchan 1a550e810c Copy 16 bytes at a time for layout conversion, if possible 2020-01-09 02:13:00 +01:00
gdk 1876b346fe Initial work 2020-01-09 02:13:00 +01:00