Class VulkanDevice
java.lang.Object
com.mojang.blaze3d.vulkan.VulkanDevice
- All Implemented Interfaces:
GpuDeviceBackend
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CheckpointExtensionprivate final VulkanCommandEncoderprivate final VulkanQueueprivate final ShaderSourceprivate final DeviceInfoprivate final GlslCompilerprivate final VulkanQueueprivate final VulkanInstanceprivate final booleanprivate static final org.slf4j.Loggerprivate final Map<RenderPipeline, VulkanRenderPipeline> private final Map<VulkanDevice.ShaderCompilationKey, IntermediaryShaderModule> private final VulkanQueueprivate final VkDeviceprivate final long -
Constructor Summary
ConstructorsConstructorDescriptionVulkanDevice(ShaderSource defaultShaderSource, VulkanInstance instance, VulkanPhysicalDevice physicalDevice, Set<String> enabledDeviceExtensions, VkDevice vkDevice, long vma, CheckpointExtension checkpointExtension) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()private VulkanRenderPipelinecompilePipeline(RenderPipeline pipeline, ShaderSource shaderSource) private IntermediaryShaderModulecompileShader(VulkanDevice.ShaderCompilationKey key, ShaderSource shaderSource) createBuffer(@Nullable Supplier<String> label, int usage, long size) createBuffer(@Nullable Supplier<String> label, int usage, ByteBuffer data) createSampler(AddressMode addressModeU, AddressMode addressModeV, FilterMode minFilter, FilterMode magFilter, int maxAnisotropy, OptionalDouble maxLod) createSurface(long windowHandle) createTexture(@Nullable String label, int usage, GpuFormat format, int width, int height, int depthOrLayers, int mipLevels) createTexture(@Nullable Supplier<String> label, int usage, GpuFormat format, int width, int height, int depthOrLayers, int mipLevels) createTextureView(GpuTexture texture) createTextureView(GpuTexture texture, int baseMipLevel, int mipLevels) createTimestampQueryPool(int size) protected VulkanRenderPipelinegetOrCompilePipeline(RenderPipeline pipeline) protected IntermediaryShaderModulegetOrCompileShader(Identifier id, ShaderType type, ShaderDefines defines, ShaderSource shaderSource) longinstance()booleanprecompilePipeline(RenderPipeline pipeline, @Nullable ShaderSource customShaderSource) vkDevice()longvma()
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
defaultShaderSource
-
pipelineCache
-
shaderCache
-
instance
-
vkDevice
-
vma
private final long vma -
glslCompiler
-
deviceInfo
-
graphicsQueue
-
computeQueue
-
transferQueue
-
isIntegratedIntelMoltenVK
private final boolean isIntegratedIntelMoltenVK -
commandEncoder
-
checkpointExtension
-
-
Constructor Details
-
VulkanDevice
public VulkanDevice(ShaderSource defaultShaderSource, VulkanInstance instance, VulkanPhysicalDevice physicalDevice, Set<String> enabledDeviceExtensions, VkDevice vkDevice, long vma, CheckpointExtension checkpointExtension)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceGpuDeviceBackend
-
getDeviceInfo
- Specified by:
getDeviceInfoin interfaceGpuDeviceBackend
-
instance
-
vkDevice
-
graphicsQueue
-
computeQueue
-
transferQueue
-
vma
public long vma() -
createSurface
- Specified by:
createSurfacein interfaceGpuDeviceBackend
-
createCommandEncoder
- Specified by:
createCommandEncoderin interfaceGpuDeviceBackend
-
createSampler
public GpuSampler createSampler(AddressMode addressModeU, AddressMode addressModeV, FilterMode minFilter, FilterMode magFilter, int maxAnisotropy, OptionalDouble maxLod) - Specified by:
createSamplerin interfaceGpuDeviceBackend
-
createTexture
public GpuTexture createTexture(@Nullable Supplier<String> label, int usage, GpuFormat format, int width, int height, int depthOrLayers, int mipLevels) - Specified by:
createTexturein interfaceGpuDeviceBackend
-
createTexture
public GpuTexture createTexture(@Nullable String label, int usage, GpuFormat format, int width, int height, int depthOrLayers, int mipLevels) - Specified by:
createTexturein interfaceGpuDeviceBackend
-
createTextureView
- Specified by:
createTextureViewin interfaceGpuDeviceBackend
-
createTextureView
- Specified by:
createTextureViewin interfaceGpuDeviceBackend
-
createBuffer
- Specified by:
createBufferin interfaceGpuDeviceBackend
-
createBuffer
- Specified by:
createBufferin interfaceGpuDeviceBackend
-
getLastDebugMessages
- Specified by:
getLastDebugMessagesin interfaceGpuDeviceBackend
-
isDebuggingEnabled
public boolean isDebuggingEnabled()- Specified by:
isDebuggingEnabledin interfaceGpuDeviceBackend
-
precompilePipeline
public CompiledRenderPipeline precompilePipeline(RenderPipeline pipeline, @Nullable ShaderSource customShaderSource) - Specified by:
precompilePipelinein interfaceGpuDeviceBackend
-
getOrCompilePipeline
-
getOrCompileShader
protected IntermediaryShaderModule getOrCompileShader(Identifier id, ShaderType type, ShaderDefines defines, ShaderSource shaderSource) -
compileShader
private IntermediaryShaderModule compileShader(VulkanDevice.ShaderCompilationKey key, ShaderSource shaderSource) -
compilePipeline
-
clearPipelineCache
public void clearPipelineCache()- Specified by:
clearPipelineCachein interfaceGpuDeviceBackend
-
createTimestampQueryPool
- Specified by:
createTimestampQueryPoolin interfaceGpuDeviceBackend
-
getTimestampNow
public long getTimestampNow()- Specified by:
getTimestampNowin interfaceGpuDeviceBackend
-
checkpointExtension
-