Class GlTransientMemory.PersistentMapping
java.lang.Object
com.mojang.blaze3d.opengl.GlTransientMemory
com.mojang.blaze3d.opengl.GlTransientMemory.PersistentMapping
- All Implemented Interfaces:
TransientMemory, AutoCloseable
- Enclosing class:
GlTransientMemory
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final recordprivate static final recordNested classes/interfaces inherited from class GlTransientMemory
GlTransientMemory.Fallback, GlTransientMemory.PersistentMapping -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable GlTransientMemory.PersistentMapping.Rotation[]Fields inherited from class GlTransientMemory
bufferStorage, debugLabels, dsa, encoder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocateGlBlock(long size, boolean host, boolean mapped) allocateGpu(long size, long alignment, int usage, long minimumAllocation, long elementSize) allocateGpuMapped(long size, long alignment, int usage, long minimumAllocation, long elementSize) allocateStaging(long size, long alignment, int usage, long minimumAllocation, long elementSize) voidclose()private voidmultiUpload(List<ByteBuffer> data, long alignment, int usage, boolean staging) multiUploadGpu(List<ByteBuffer> data, long alignment, int usage) multiUploadStaging(List<ByteBuffer> data, long alignment, int usage) voidrotate()upload(List<ByteBuffer> data, long alignment, int usage, long minimumAllocation, long elementSize, boolean staging) uploadGpu(List<ByteBuffer> data, long alignment, int usage, long minimumAllocation, long elementSize) uploadStaging(List<ByteBuffer> data, long alignment, int usage, long minimumAllocation, long elementSize) Methods inherited from class GlTransientMemory
allocateCpuMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TransientMemory
allocateCpu, allocateGpu, allocateGpuMapped, allocateStaging, uploadGpu, uploadGpu, uploadGpu, uploadStaging, uploadStaging, uploadStaging
-
Field Details
-
stagingBlockAllocator
private final TransientBlockAllocator<GlTransientMemory.PersistentMapping.GlAllocation> stagingBlockAllocator -
gpuBlockAllocator
private final TransientBlockAllocator<GlTransientMemory.PersistentMapping.GlAllocation> gpuBlockAllocator -
gpuMappedBlockAllocator
private final TransientBlockAllocator<GlTransientMemory.PersistentMapping.GlAllocation> gpuMappedBlockAllocator -
rotations
-
-
Constructor Details
-
PersistentMapping
PersistentMapping(GlDevice device, GlCommandEncoder encoder)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classGlTransientMemory
-
rotate
public void rotate()- Overrides:
rotatein classGlTransientMemory
-
allocateGlBlock
private GlTransientMemory.PersistentMapping.GlAllocation allocateGlBlock(long size, boolean host, boolean mapped) -
freeGlBlock
-
allocateStaging
public GpuBufferSlice.MappedView allocateStaging(long size, long alignment, int usage, long minimumAllocation, long elementSize) -
allocateGpu
public GpuBufferSlice allocateGpu(long size, long alignment, int usage, long minimumAllocation, long elementSize) -
allocateGpuMapped
public GpuBufferSlice.MappedView allocateGpuMapped(long size, long alignment, int usage, long minimumAllocation, long elementSize) -
uploadStaging
public GpuBufferSlice uploadStaging(List<ByteBuffer> data, long alignment, int usage, long minimumAllocation, long elementSize) -
uploadGpu
public GpuBufferSlice uploadGpu(List<ByteBuffer> data, long alignment, int usage, long minimumAllocation, long elementSize) -
upload
public GpuBufferSlice upload(List<ByteBuffer> data, long alignment, int usage, long minimumAllocation, long elementSize, boolean staging) -
multiUploadStaging
-
multiUploadGpu
-
multiUpload
public List<GpuBufferSlice> multiUpload(List<ByteBuffer> data, long alignment, int usage, boolean staging)
-