Skip to content

Commit

Permalink
Merge branch 'feature/khr_sync_2' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
io7m committed Dec 6, 2024
2 parents e128ee4 + b3656a0 commit 54a7480
Show file tree
Hide file tree
Showing 141 changed files with 2,585 additions and 2,312 deletions.
475 changes: 25 additions & 450 deletions README.in

Large diffs are not rendered by default.

477 changes: 26 additions & 451 deletions README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -22,165 +22,145 @@
* @see "VkAccessFlagBits"
*/

@VulkanAPIEnumType(vulkanEnum = "VkAccessFlagBits")
public enum VulkanAccessFlag implements VulkanEnumBitmaskType
@VulkanAPIEnumType(vulkanEnum = "VkAccessFlagBits2")
public enum VulkanAccessFlag implements VulkanEnumBitmaskLongType
{
/**
* VK_ACCESS_INDIRECT_COMMAND_READ_BIT specifies read access to an indirect command structure read
* as part of an indirect drawing or dispatch command.
* VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT
*/

VK_ACCESS_INDIRECT_COMMAND_READ_BIT(0x00000001),
VK_ACCESS_COLOR_ATTACHMENT_READ_BIT(0x00000080L),

/**
* VK_ACCESS_INDEX_READ_BIT specifies read access to an index buffer as part of an indexed drawing
* command, bound by vkCmdBindIndexBuffer.
* VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT
*/

VK_ACCESS_INDEX_READ_BIT(0x00000002),
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT(0x00000100L),

/**
* VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT specifies read access to a vertex buffer as part of a
* drawing command, bound by vkCmdBindVertexBuffers.
* VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT
*/

VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT(0x00000004),
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT(0x00000200L),

/**
* VK_ACCESS_UNIFORM_READ_BIT specifies read access to a uniform buffer.
* VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
*/

VK_ACCESS_UNIFORM_READ_BIT(0x00000008),
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT(0x00000400L),

/**
* VK_ACCESS_INPUT_ATTACHMENT_READ_BIT specifies read access to an input attachment within a
* render pass during fragment shading.
* VK_ACCESS_2_HOST_READ_BIT
*/

VK_ACCESS_INPUT_ATTACHMENT_READ_BIT(0x00000010),
VK_ACCESS_HOST_READ_BIT(0x00002000L),

/**
* VK_ACCESS_SHADER_READ_BIT specifies read access to a storage buffer, uniform texel buffer,
* storage texel buffer, sampled image, or storage image.
* VK_ACCESS_2_HOST_WRITE_BIT
*/

VK_ACCESS_SHADER_READ_BIT(0x00000020),
VK_ACCESS_HOST_WRITE_BIT(0x00004000L),

/**
* VK_ACCESS_SHADER_WRITE_BIT specifies write access to a storage buffer, storage texel buffer, or
* storage image.
* VK_ACCESS_2_INDEX_READ_BIT
*/

VK_ACCESS_SHADER_WRITE_BIT(0x00000040),
VK_ACCESS_INDEX_READ_BIT(0x00000002L),

/**
* VK_ACCESS_COLOR_ATTACHMENT_READ_BIT specifies read access to a color attachment, such as via
* blending, logic operations, or via certain subpass load operations. It does not include
* advanced blend operations.
* VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT
*/

VK_ACCESS_COLOR_ATTACHMENT_READ_BIT(0x00000080),
VK_ACCESS_INDIRECT_COMMAND_READ_BIT(0x00000001L),

/**
* VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT specifies write access to a color or resolve attachment
* during a render pass or via certain subpass load and store operations.
* VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT
*/

VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT(0x00000100),
VK_ACCESS_INPUT_ATTACHMENT_READ_BIT(0x00000010L),

/**
* VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT specifies read access to a depth/stencil
* attachment, via depth or stencil operations or via certain subpass load operations.
* VK_ACCESS_2_MEMORY_READ_BIT
*/

VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT(0x00000200),
VK_ACCESS_MEMORY_READ_BIT(0x00008000L),

/**
* VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT specifies write access to a depth/stencil
* attachment, via depth or stencil operations or via certain subpass load and store operations.
* VK_ACCESS_2_MEMORY_WRITE_BIT
*/

VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT(0x00000400),
VK_ACCESS_MEMORY_WRITE_BIT(0x00010000L),

/**
* VK_ACCESS_TRANSFER_READ_BIT specifies read access to an image or buffer in a copy operation.
* VK_ACCESS_2_NONE
*/

VK_ACCESS_TRANSFER_READ_BIT(0x00000800),
VK_ACCESS_NONE(0L),

/**
* VK_ACCESS_TRANSFER_WRITE_BIT specifies write access to an image or buffer in a clear or copy
* operation.
* VK_ACCESS_2_SHADER_READ_BIT
*/

VK_ACCESS_TRANSFER_WRITE_BIT(0x00001000),
VK_ACCESS_SHADER_READ_BIT(0x00000020L),

/**
* VK_ACCESS_HOST_READ_BIT specifies read access by a host operation. Accesses of this type are
* not performed through a resource, but directly on memory.
* VK_ACCESS_2_SHADER_SAMPLED_READ_BIT
*/

VK_ACCESS_HOST_READ_BIT(0x00002000),
VK_ACCESS_SHADER_SAMPLED_READ_BIT(0x100000000L),

/**
* VK_ACCESS_HOST_WRITE_BIT specifies write access by a host operation. Accesses of this type are
* not performed through a resource, but directly on memory.
* VK_ACCESS_2_SHADER_STORAGE_READ_BIT
*/

VK_ACCESS_HOST_WRITE_BIT(0x00004000),
VK_ACCESS_SHADER_STORAGE_READ_BIT(0x200000000L),

/**
* VK_ACCESS_MEMORY_READ_BIT specifies read access via non-specific entities. These entities
* include the Vulkan device and host, but may also include entities external to the Vulkan device
* or otherwise not part of the core Vulkan pipeline. When included in a destination access mask,
* makes all available writes visible to all future read accesses on entities known to the Vulkan
* device.
* VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT
*/

VK_ACCESS_MEMORY_READ_BIT(0x00008000),
VK_ACCESS_SHADER_STORAGE_WRITE_BIT(0x400000000L),

/**
* VK_ACCESS_MEMORY_WRITE_BIT specifies write access via non-specific entities. These entities
* include the Vulkan device and host, but may also include entities external to the Vulkan device
* or otherwise not part of the core Vulkan pipeline. When included in a source access mask, all
* writes that are performed by entities known to the Vulkan device are made available. When
* included in a destination access mask, makes all available writes visible to all future write
* accesses on entities known to the Vulkan device.
* VK_ACCESS_2_SHADER_WRITE_BIT
*/

VK_ACCESS_MEMORY_WRITE_BIT(0x00010000),
VK_ACCESS_SHADER_WRITE_BIT(0x00000040L),

/**
* VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX specifies reads from VkBuffer inputs to
* vkCmdProcessCommandsNVX.
* VK_ACCESS_2_TRANSFER_READ_BIT
*/

VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX(0x00020000),
VK_ACCESS_TRANSFER_READ_BIT(0x00000800L),

/**
* VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX specifies writes to the target command buffer in
* vkCmdProcessCommandsNVX.
* VK_ACCESS_2_TRANSFER_WRITE_BIT
*/

VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX(0x00040000),
VK_ACCESS_TRANSFER_WRITE_BIT(0x00001000L),

/**
* VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT is similar to
* VK_ACCESS_COLOR_ATTACHMENT_READ_BIT, but also includes advanced blend operations.
* VK_ACCESS_2_UNIFORM_READ_BIT
*/

VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT(0x00080000);
VK_ACCESS_UNIFORM_READ_BIT(0x00000008L),

private final int value;
/**
* VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT
*/

VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT(0x00000004L);

private final long value;

VulkanAccessFlag(
final int i)
final long i)
{
this.value = i;
}

@Override
public int value()
public long value()
{
return this.value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
import com.io7m.immutables.styles.ImmutablesStyleType;
import org.immutables.value.Value;

import java.util.Set;

/**
* Structure specifying an attachment reference.
*
* @see "VkAttachmentReference"
* @see "VkAttachmentReference2"
*/

@VulkanAPIStructType(vulkanStruct = "VkAttachmentReference")
@VulkanAPIStructType(vulkanStruct = "VkAttachmentReference2")
@ImmutablesStyleType
@Value.Immutable
public interface VulkanAttachmentReferenceType
Expand All @@ -34,13 +36,18 @@ public interface VulkanAttachmentReferenceType
* @return The index of the attachment of the render pass
*/

@Value.Parameter
int attachment();

/**
* @return The layout the attachment uses during the subpass.
*/

@Value.Parameter
VulkanImageLayout layout();

/**
* @return A mask of which aspect(s) can be accessed within the specified
* subpass as an input attachment.
*/

Set<VulkanImageAspectFlag> aspectMask();
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,59 +27,64 @@
* @see "VkBufferMemoryBarrier"
*/

@VulkanAPIStructType(vulkanStruct = "VkBufferMemoryBarrier")
@VulkanAPIStructType(vulkanStruct = "VkBufferMemoryBarrier2")
@ImmutablesStyleType
@Value.Immutable
public interface VulkanBufferMemoryBarrierType
{
/**
* @return The source stage mask
*/

Set<VulkanPipelineStageFlag> srcStageMask();

/**
* @return The source access mask
*/

@Value.Parameter
Set<VulkanAccessFlag> sourceAccessMask();
Set<VulkanAccessFlag> srcAccessMask();

/**
* @return The destination stage mask
*/

Set<VulkanPipelineStageFlag> dstStageMask();

/**
* @return The target access mask
* @return The destination access mask
*/

@Value.Parameter
Set<VulkanAccessFlag> targetAccessMask();
Set<VulkanAccessFlag> dstAccessMask();

/**
* @return The source queue family for a queue family ownership transfer.
*/

@Value.Parameter
VulkanQueueFamilyIndex sourceQueueFamilyIndex();
VulkanQueueFamilyIndex srcQueueFamilyIndex();

/**
* @return The target queue family for a queue family ownership transfer.
*/

@Value.Parameter
VulkanQueueFamilyIndex targetQueueFamilyIndex();
VulkanQueueFamilyIndex dstQueueFamilyIndex();

/**
* @return The buffer affected by this barrier.
*/

@Value.Parameter
VulkanBufferType buffer();

/**
* @return An offset in bytes into the backing memory for buffer; this is relative to the base
* offset as bound to the buffer
*/

@Value.Parameter
long offset();

/**
* @return A size in bytes of the affected area of backing memory for buffer, or VK_WHOLE_SIZE to
* use the range from offset to the end of the buffer.
*/

@Value.Parameter
long size();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright © 2018 Mark Raynsford <[email protected]> http://io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

package com.io7m.jcoronado.api;

import com.io7m.immutables.styles.ImmutablesStyleType;
import org.immutables.value.Value;

/**
* The type of Vulkan command buffer submission information.
*
* @see "VkCommandBufferSubmitInfo"
*/

@VulkanAPIStructType(vulkanStruct = "VkCommandBufferSubmitInfo")
@ImmutablesStyleType
@Value.Immutable
public interface VulkanCommandBufferSubmitInfoType
{
/**
* @return The command buffer
*/

VulkanCommandBufferType commandBuffer();

/**
* @return A bitmask indicating which devices in a device group execute the command buffer
*/

@Value.Default
default long deviceMask()
{
return 0L;
}
}
Loading

0 comments on commit 54a7480

Please sign in to comment.