Class VulkanCommandEncoder
java.lang.Object
com.mojang.blaze3d.vulkan.VulkanCommandEncoder
- All Implemented Interfaces:
CommandEncoderBackend, Destroyable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CheckpointExtension.CheckpointStorageprivate final VulkanCommandPool[]private longprivate @Nullable VkCommandBufferprivate @Nullable VulkanRenderPassprivate longprivate final DestructionQueue<Destroyable> private final VulkanDevicestatic final intprivate VulkanQueue.Submissionprivate final longprivate final VulkanTransientMemory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanawaitSubmitCompletion(long submitIndex, long timeoutNS) voidclearColorAndDepthTextures(GpuTexture colorTexture, Vector4fc clearColor, GpuTexture depthTexture, double clearDepth) voidclearColorAndDepthTextures(GpuTexture colorTexture, Vector4fc clearColor, GpuTexture depthTexture, double clearDepth, int regionX, int regionY, int regionWidth, int regionHeight) voidclearColorTexture(GpuTexture colorTexture, Vector4fc clearColor) private voidclearColorTextureUnsynced(MemoryStack stack, GpuTexture colorTexture, Vector4fc clearColor) voidclearDepthTexture(GpuTexture depthTexture, double clearDepth) voidclearDepthTextureUnsynced(MemoryStack stack, GpuTexture depthTexture, double clearDepth) voidclearStencilTexture(GpuTexture texture, int value) private VkCommandBuffervoidcopyBufferToTexture(GpuBufferSlice source, int sourceX, int sourceY, int sourceWidth, int sourceHeight, GpuTexture destination, int destinationX, int destinationY, int copyWidth, int copyHeight, int mipLevel, int arrayLayer) voidcopyTextureToBuffer(GpuTexture source, GpuBuffer destination, long offset, Runnable callback, int mipLevel) voidcopyTextureToBuffer(GpuTexture source, GpuBuffer destination, long offset, Runnable callback, int mipLevel, int x, int y, int width, int height) voidcopyTextureToTexture(GpuTexture source, GpuTexture destination, int mipLevel, int destX, int destY, int sourceX, int sourceY, int width, int height) voidcopyToBuffer(GpuBufferSlice source, GpuBufferSlice target) createRenderPass(RenderPassDescriptor descriptor) private VulkanCommandPoolvoiddestroy()private voidvoidexecute(VkCommandBuffer commandBuffer) longprivate voidmemoryBarrier(MemoryStack stack) static voidmemoryBarrier(VkCommandBuffer commandBuffer, MemoryStack stack) voidqueueForDestroy(Destroyable destroyable) voidsignalSemaphore(long vkSemaphore, long value, long stageMask) voidsubmit()void(package private) VkCommandBuffervoidwaitSemaphore(long vkSemaphore, long value, long stageMask) voidwriteTimestamp(GpuQueryPool pool, int index) voidwriteToBuffer(GpuBufferSlice destination, ByteBuffer data) voidwriteToTexture(GpuTexture destination, ByteBuffer source, int mipLevel, int depthOrLayer, int destX, int destY, int width, int height)
-
Field Details
-
MAX_SUBMITS_IN_FLIGHT
public static final int MAX_SUBMITS_IN_FLIGHT- See Also:
-
device
-
transientMemory
-
submitSemaphore
private final long submitSemaphore -
currentSubmitIndex
private long currentSubmitIndex -
completedSubmitIndex
private long completedSubmitIndex -
checkpointStorage
-
submissionBuilder
-
destroyQueue
-
commandPools
-
currentCommandBuffer
-
currentRenderPass
-
-
Constructor Details
-
VulkanCommandEncoder
-
-
Method Details
-
destroy
public void destroy()- Specified by:
destroyin interfaceDestroyable
-
queueForDestroy
-
currentCommandPool
-
allocateAndBeginTransientCommandBuffer
-
commandBuffer
-
textureInitCommandBuffer
VkCommandBuffer textureInitCommandBuffer() -
endCommandBuffer
private void endCommandBuffer() -
waitSemaphore
public void waitSemaphore(long vkSemaphore, long value, long stageMask) -
execute
-
signalSemaphore
public void signalSemaphore(long vkSemaphore, long value, long stageMask) -
memoryBarrier
-
memoryBarrier
-
submit
public void submit()- Specified by:
submitin interfaceCommandEncoderBackend
-
transientMemory
- Specified by:
transientMemoryin interfaceCommandEncoderBackend
-
createRenderPass
- Specified by:
createRenderPassin interfaceCommandEncoderBackend
-
submitRenderPass
public void submitRenderPass()- Specified by:
submitRenderPassin interfaceCommandEncoderBackend
-
clearColorTextureUnsynced
private void clearColorTextureUnsynced(MemoryStack stack, GpuTexture colorTexture, Vector4fc clearColor) -
clearDepthTextureUnsynced
public void clearDepthTextureUnsynced(MemoryStack stack, GpuTexture depthTexture, double clearDepth) -
clearColorTexture
- Specified by:
clearColorTexturein interfaceCommandEncoderBackend
-
clearColorAndDepthTextures
public void clearColorAndDepthTextures(GpuTexture colorTexture, Vector4fc clearColor, GpuTexture depthTexture, double clearDepth) - Specified by:
clearColorAndDepthTexturesin interfaceCommandEncoderBackend
-
clearColorAndDepthTextures
public void clearColorAndDepthTextures(GpuTexture colorTexture, Vector4fc clearColor, GpuTexture depthTexture, double clearDepth, int regionX, int regionY, int regionWidth, int regionHeight) - Specified by:
clearColorAndDepthTexturesin interfaceCommandEncoderBackend
-
clearDepthTexture
- Specified by:
clearDepthTexturein interfaceCommandEncoderBackend
-
clearStencilTexture
- Specified by:
clearStencilTexturein interfaceCommandEncoderBackend
-
writeToBuffer
- Specified by:
writeToBufferin interfaceCommandEncoderBackend
-
copyToBuffer
- Specified by:
copyToBufferin interfaceCommandEncoderBackend
-
writeToTexture
public void writeToTexture(GpuTexture destination, ByteBuffer source, int mipLevel, int depthOrLayer, int destX, int destY, int width, int height) - Specified by:
writeToTexturein interfaceCommandEncoderBackend
-
copyBufferToTexture
public void copyBufferToTexture(GpuBufferSlice source, int sourceX, int sourceY, int sourceWidth, int sourceHeight, GpuTexture destination, int destinationX, int destinationY, int copyWidth, int copyHeight, int mipLevel, int arrayLayer) - Specified by:
copyBufferToTexturein interfaceCommandEncoderBackend
-
copyTextureToBuffer
public void copyTextureToBuffer(GpuTexture source, GpuBuffer destination, long offset, Runnable callback, int mipLevel) - Specified by:
copyTextureToBufferin interfaceCommandEncoderBackend
-
copyTextureToBuffer
public void copyTextureToBuffer(GpuTexture source, GpuBuffer destination, long offset, Runnable callback, int mipLevel, int x, int y, int width, int height) - Specified by:
copyTextureToBufferin interfaceCommandEncoderBackend
-
copyTextureToTexture
public void copyTextureToTexture(GpuTexture source, GpuTexture destination, int mipLevel, int destX, int destY, int sourceX, int sourceY, int width, int height) - Specified by:
copyTextureToTexturein interfaceCommandEncoderBackend
-
awaitSubmitCompletion
private boolean awaitSubmitCompletion(long submitIndex, long timeoutNS) -
createFence
- Specified by:
createFencein interfaceCommandEncoderBackend
-
writeTimestamp
- Specified by:
writeTimestampin interfaceCommandEncoderBackend
-
getTimestampNow
public long getTimestampNow()
-