Backport MemoryStack to reduce direct buffer allocations (#751)

* Initial MemoryStack backport

* Remove stubs, for now

Will re-add as needed

* Implement mallocInt

* Replace some buffer allocation

* Add mallocFloat

* Replace more uses of direct buffer allocation

* Reorder methods

Fixes a clinit crash and makes it easier to compare to upstream

* Remove another direct buffer creation
This commit is contained in:
ah-OOG-ah authored and GitHub committed 2024-11-25 16:26:07 -05:00
1 parent 78072236d2
commit c353c83cf3
13 files changed
+808 -97

No files matched your search

@@ -19,7 +19,7 @@ public final class ComputeProgram extends GlResource {
private Vector3i absoluteWorkGroups;
private Vector2f relativeWorkGroups;
// private int[] localSize;
private IntBuffer localSizeBuffer;
private final IntBuffer localSizeBuffer;
private float cachedWidth;
private float cachedHeight;
private Vector3i cachedWorkGroups;