Class FrontendCommandEncoder
java.lang.Object
com.mojang.renderpearl.frontend.FrontendCommandEncoder
- All Implemented Interfaces:
CommandEncoder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CommandEncoderBackendprivate final GpuDeviceBackendprivate booleanprivate static final org.slf4j.Loggerprivate final @Nullable TracyGpuProfiler -
Constructor Summary
ConstructorsConstructorDescriptionFrontendCommandEncoder(@Nullable TracyGpuProfiler profiler, GpuDeviceBackend device, CommandEncoderBackend backend) -
Method Summary
Modifier and TypeMethodDescriptionbackend()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, int mipLevel) voidclearColorTexture(GpuTexture colorTexture, Vector4fc clearColor) voidclearDepthTexture(GpuTexture depthTexture, double clearDepth) voidclearStencilTexture(GpuTexture texture, int value) voidcopyBufferToTexture(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) createRenderPass(Supplier<String> label, GpuTextureView colorTexture, Optional<Vector4fc> clearColor) createRenderPass(Supplier<String> label, GpuTextureView colorTexture, Optional<Vector4fc> clearColor, @Nullable GpuTextureView depthTexture, OptionalDouble clearDepth) createRenderPass(Supplier<String> label, GpuTextureView colorTexture, Optional<Vector4fc> clearColor, @Nullable GpuTextureView depthTexture, OptionalDouble clearDepth, RenderPass.RenderArea renderArea) booleanvoidsubmit()protected voidprivate voidverifyColorTexture(GpuTexture colorTexture) private voidverifyDepthTexture(GpuTexture depthTexture) private voidverifyRegion(GpuTexture colorTexture, int regionX, int regionY, int regionWidth, int regionHeight, int mipLevel) private voidverifyStencilTexture(GpuTexture stencilTexture) voidwriteTimestamp(GpuQueryPool pool, int index) voidwriteToBuffer(GpuBufferSlice destination, ByteBuffer data) voidwriteToTexture(GpuTexture destination, NativeImage source) voidwriteToTexture(GpuTexture destination, NativeImage source, int mipLevel, int depthOrLayer, int destX, int destY) voidwriteToTexture(GpuTexture destination, ByteBuffer source, int mipLevel, int depthOrLayer, int destX, int destY, int width, int height)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
device
-
backend
-
isInRenderPass
private boolean isInRenderPass -
profiler
-
-
Constructor Details
-
FrontendCommandEncoder
public FrontendCommandEncoder(@Nullable TracyGpuProfiler profiler, GpuDeviceBackend device, CommandEncoderBackend backend)
-
-
Method Details
-
backend
-
submit
public void submit()- Specified by:
submitin interfaceCommandEncoder
-
transientMemory
- Specified by:
transientMemoryin interfaceCommandEncoder
-
isInRenderPass
-
createRenderPass
public RenderPass createRenderPass(Supplier<String> label, GpuTextureView colorTexture, Optional<Vector4fc> clearColor) - Specified by:
createRenderPassin interfaceCommandEncoder
-
createRenderPass
public RenderPass createRenderPass(Supplier<String> label, GpuTextureView colorTexture, Optional<Vector4fc> clearColor, @Nullable GpuTextureView depthTexture, OptionalDouble clearDepth) - Specified by:
createRenderPassin interfaceCommandEncoder
-
createRenderPass
public RenderPass createRenderPass(Supplier<String> label, GpuTextureView colorTexture, Optional<Vector4fc> clearColor, @Nullable GpuTextureView depthTexture, OptionalDouble clearDepth, RenderPass.RenderArea renderArea) - Specified by:
createRenderPassin interfaceCommandEncoder
-
createRenderPass
- Specified by:
createRenderPassin interfaceCommandEncoder
-
submitRenderPass
protected void submitRenderPass() -
clearColorTexture
- Specified by:
clearColorTexturein interfaceCommandEncoder
-
clearColorAndDepthTextures
public void clearColorAndDepthTextures(GpuTexture colorTexture, Vector4fc clearColor, GpuTexture depthTexture, double clearDepth) - Specified by:
clearColorAndDepthTexturesin interfaceCommandEncoder
-
clearColorAndDepthTextures
public void clearColorAndDepthTextures(GpuTexture colorTexture, Vector4fc clearColor, GpuTexture depthTexture, double clearDepth, int regionX, int regionY, int regionWidth, int regionHeight, int mipLevel) - Specified by:
clearColorAndDepthTexturesin interfaceCommandEncoder
-
clearDepthTexture
- Specified by:
clearDepthTexturein interfaceCommandEncoder
-
clearStencilTexture
- Specified by:
clearStencilTexturein interfaceCommandEncoder
-
writeToBuffer
- Specified by:
writeToBufferin interfaceCommandEncoder
-
copyToBuffer
- Specified by:
copyToBufferin interfaceCommandEncoder
-
writeToTexture
- Specified by:
writeToTexturein interfaceCommandEncoder
-
writeToTexture
public void writeToTexture(GpuTexture destination, NativeImage source, int mipLevel, int depthOrLayer, int destX, int destY) - Specified by:
writeToTexturein interfaceCommandEncoder
-
writeToTexture
public void writeToTexture(GpuTexture destination, ByteBuffer source, int mipLevel, int depthOrLayer, int destX, int destY, int width, int height) - Specified by:
writeToTexturein interfaceCommandEncoder
-
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 interfaceCommandEncoder
-
copyTextureToBuffer
public void copyTextureToBuffer(GpuTexture source, GpuBuffer destination, long offset, Runnable callback, int mipLevel) - Specified by:
copyTextureToBufferin interfaceCommandEncoder
-
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 interfaceCommandEncoder
-
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 interfaceCommandEncoder
-
createFence
- Specified by:
createFencein interfaceCommandEncoder
-
writeTimestamp
- Specified by:
writeTimestampin interfaceCommandEncoder
-
verifyColorTexture
-
verifyDepthTexture
-
verifyStencilTexture
-
verifyRegion
private void verifyRegion(GpuTexture colorTexture, int regionX, int regionY, int regionWidth, int regionHeight, int mipLevel)
-