Class UberGpuBuffer<T>
java.lang.Object
com.mojang.blaze3d.vertex.UberGpuBuffer<T>
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic classprivate static classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final Map<T, TlsfAllocator.Allocation> private final Stringprivate final List<com.mojang.datafixers.util.Pair<TlsfAllocator, UberGpuBuffer.UberGpuBufferHeap>> private final it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<T> private final it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap<T, UberGpuBuffer.StagedAllocationEntry<T>> private final UberGpuBuffer.UberGpuBufferStagingBufferprivate int -
Constructor Summary
ConstructorsConstructorDescriptionUberGpuBuffer(String name, int usage, int heapSize, int alignSize, GpuDevice gpuDevice, int stagingBufferSize, GraphicsWorkarounds workarounds) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAllocation(T allocationKey, @Nullable UberGpuBuffer.UploadCallback<T> callback, ByteBuffer buffer) voidclose()private voidfreeAllocation(T allocationKey) @Nullable TlsfAllocator.AllocationgetAllocation(T allocationKey) getGpuBuffer(TlsfAllocator.Allocation allocation) voidvoidremoveAllocation(T allocationKey) booleanuploadStagedAllocations(GpuDevice gpuDevice, CommandEncoder encoder)
-
Field Details
-
alignSize
private final int alignSize -
stagingBuffer
-
stagingBufferUsedSize
private int stagingBufferUsedSize -
name
-
nodes
private final List<com.mojang.datafixers.util.Pair<TlsfAllocator, UberGpuBuffer.UberGpuBufferHeap>> nodes -
stagedAllocations
private final it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap<T, UberGpuBuffer.StagedAllocationEntry<T>> stagedAllocations -
skippedStagedAllocations
-
allocationMap
-
-
Constructor Details
-
UberGpuBuffer
public UberGpuBuffer(String name, int usage, int heapSize, int alignSize, GpuDevice gpuDevice, int stagingBufferSize, GraphicsWorkarounds workarounds)
-
-
Method Details
-
addAllocation
public boolean addAllocation(T allocationKey, @Nullable UberGpuBuffer.UploadCallback<T> callback, ByteBuffer buffer) -
uploadStagedAllocations
-
getAllocation
-
removeAllocation
-
freeAllocation
-
getGpuBuffer
-
printStatistics
public void printStatistics() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-