All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.vulkan.VkQueueFamilyProperties Maven / Gradle / Ivy

Go to download

A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.vulkan;

import java.nio.*;

import org.lwjgl.*;
import org.lwjgl.system.*;

import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.MemoryStack.*;

/**
 * Structure providing information about a queue family.
 * 
 * 
Description
* *

The value returned in {@code minImageTransferGranularity} has a unit of compressed texel blocks for images having a block-compressed format, and a unit of texels otherwise.

* *

Possible values of {@code minImageTransferGranularity} are:

* *
    *
  • (0,0,0) which indicates that only whole mip levels must be transferred using the image transfer operations on the corresponding queues. In this case, the following restrictions apply to all offset and extent parameters of image transfer operations: * *
      *
    • The {@code x}, {@code y}, and {@code z} members of a {@link VkOffset3D} parameter must always be zero.
    • *
    • The {@code width}, {@code height}, and {@code depth} members of a {@link VkExtent3D} parameter must always match the width, height, and depth of the image subresource corresponding to the parameter, respectively.
    • *
    *
  • *
  • (Ax, Ay, Az) where Ax, Ay, and Az are all integer powers of two. In this case the following restrictions apply to all image transfer operations: * *
      *
    • {@code x}, {@code y}, and {@code z} of a {@link VkOffset3D} parameter must be integer multiples of Ax, Ay, and Az, respectively.
    • *
    • {@code width} of a {@link VkExtent3D} parameter must be an integer multiple of Ax, or else x + width must equal the width of the image subresource corresponding to the parameter.
    • *
    • {@code height} of a {@link VkExtent3D} parameter must be an integer multiple of Ay, or else y + height must equal the height of the image subresource corresponding to the parameter.
    • *
    • {@code depth} of a {@link VkExtent3D} parameter must be an integer multiple of Az, or else z + depth must equal the depth of the image subresource corresponding to the parameter.
    • *
    • If the format of the image corresponding to the parameters is one of the block-compressed formats then for the purposes of the above calculations the granularity must be scaled up by the compressed texel block dimensions.
    • *
    *
  • *
* *

Queues supporting graphics and/or compute operations must report (1,1,1) in {@code minImageTransferGranularity}, meaning that there are no additional restrictions on the granularity of image transfer operations for these queues. Other queues supporting image transfer operations are only required: to support whole mip level transfers, thus {@code minImageTransferGranularity} for queues belonging to such queue families may be (0,0,0).

* *

The Device Memory section describes memory properties queried from the physical device.

* *

For physical device feature queries see the Features chapter.

* *
See Also
* *

{@link VkExtent3D}, {@link VkQueueFamilyProperties2KHR}, {@link VK10#vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties}

* *

Member documentation

* *
    *
  • {@code queueFlags} – a bitmask of {@code VkQueueFlagBits} indicating capabilities of the queues in this queue family.
  • *
  • {@code queueCount} – the unsigned integer count of queues in this queue family.
  • *
  • {@code timestampValidBits} – the unsigned integer count of meaningful bits in the timestamps written via {@link VK10#vkCmdWriteTimestamp CmdWriteTimestamp}. The valid range for the count is 36..64 bits, or a value of 0, indicating no support for timestamps. Bits outside the valid range are guaranteed to be zeros.
  • *
  • {@code minImageTransferGranularity} – the minimum granularity supported for image transfer operations on the queues in this queue family.
  • *
* *

Layout

* *
 * struct VkQueueFamilyProperties {
 *     VkQueueFlags queueFlags;
 *     uint32_t queueCount;
 *     uint32_t timestampValidBits;
 *     {@link VkExtent3D VkExtent3D} minImageTransferGranularity;
 * }
*/ public class VkQueueFamilyProperties extends Struct implements NativeResource { /** The struct size in bytes. */ public static final int SIZEOF; public static final int ALIGNOF; /** The struct member offsets. */ public static final int QUEUEFLAGS, QUEUECOUNT, TIMESTAMPVALIDBITS, MINIMAGETRANSFERGRANULARITY; static { Layout layout = __struct( __member(4), __member(4), __member(4), __member(VkExtent3D.SIZEOF, VkExtent3D.ALIGNOF) ); SIZEOF = layout.getSize(); ALIGNOF = layout.getAlignment(); QUEUEFLAGS = layout.offsetof(0); QUEUECOUNT = layout.offsetof(1); TIMESTAMPVALIDBITS = layout.offsetof(2); MINIMAGETRANSFERGRANULARITY = layout.offsetof(3); } VkQueueFamilyProperties(long address, ByteBuffer container) { super(address, container); } /** * Creates a {@link VkQueueFamilyProperties} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be * visible to the struct instance and vice versa. * *

The created instance holds a strong reference to the container object.

*/ public VkQueueFamilyProperties(ByteBuffer container) { this(memAddress(container), checkContainer(container, SIZEOF)); } @Override public int sizeof() { return SIZEOF; } /** Returns the value of the {@code queueFlags} field. */ @NativeType("VkQueueFlags") public int queueFlags() { return nqueueFlags(address()); } /** Returns the value of the {@code queueCount} field. */ @NativeType("uint32_t") public int queueCount() { return nqueueCount(address()); } /** Returns the value of the {@code timestampValidBits} field. */ @NativeType("uint32_t") public int timestampValidBits() { return ntimestampValidBits(address()); } /** Returns a {@link VkExtent3D} view of the {@code minImageTransferGranularity} field. */ public VkExtent3D minImageTransferGranularity() { return nminImageTransferGranularity(address()); } // ----------------------------------- /** Returns a new {@link VkQueueFamilyProperties} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ public static VkQueueFamilyProperties malloc() { return create(nmemAlloc(SIZEOF)); } /** Returns a new {@link VkQueueFamilyProperties} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ public static VkQueueFamilyProperties calloc() { return create(nmemCalloc(1, SIZEOF)); } /** Returns a new {@link VkQueueFamilyProperties} instance allocated with {@link BufferUtils}. */ public static VkQueueFamilyProperties create() { return new VkQueueFamilyProperties(BufferUtils.createByteBuffer(SIZEOF)); } /** Returns a new {@link VkQueueFamilyProperties} instance for the specified memory address or {@code null} if the address is {@code NULL}. */ public static VkQueueFamilyProperties create(long address) { return address == NULL ? null : new VkQueueFamilyProperties(address, null); } /** * Returns a new {@link VkQueueFamilyProperties.Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. * * @param capacity the buffer capacity */ public static Buffer malloc(int capacity) { return create(__malloc(capacity, SIZEOF), capacity); } /** * Returns a new {@link VkQueueFamilyProperties.Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. * * @param capacity the buffer capacity */ public static Buffer calloc(int capacity) { return create(nmemCalloc(capacity, SIZEOF), capacity); } /** * Returns a new {@link VkQueueFamilyProperties.Buffer} instance allocated with {@link BufferUtils}. * * @param capacity the buffer capacity */ public static Buffer create(int capacity) { return new Buffer(__create(capacity, SIZEOF)); } /** * Create a {@link VkQueueFamilyProperties.Buffer} instance at the specified memory. * * @param address the memory address * @param capacity the buffer capacity */ public static Buffer create(long address, int capacity) { return address == NULL ? null : new Buffer(address, null, -1, 0, capacity, capacity); } // ----------------------------------- /** Returns a new {@link VkQueueFamilyProperties} instance allocated on the thread-local {@link MemoryStack}. */ public static VkQueueFamilyProperties mallocStack() { return mallocStack(stackGet()); } /** Returns a new {@link VkQueueFamilyProperties} instance allocated on the thread-local {@link MemoryStack} and initializes all its bits to zero. */ public static VkQueueFamilyProperties callocStack() { return callocStack(stackGet()); } /** * Returns a new {@link VkQueueFamilyProperties} instance allocated on the specified {@link MemoryStack}. * * @param stack the stack from which to allocate */ public static VkQueueFamilyProperties mallocStack(MemoryStack stack) { return create(stack.nmalloc(ALIGNOF, SIZEOF)); } /** * Returns a new {@link VkQueueFamilyProperties} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. * * @param stack the stack from which to allocate */ public static VkQueueFamilyProperties callocStack(MemoryStack stack) { return create(stack.ncalloc(ALIGNOF, 1, SIZEOF)); } /** * Returns a new {@link VkQueueFamilyProperties.Buffer} instance allocated on the thread-local {@link MemoryStack}. * * @param capacity the buffer capacity */ public static Buffer mallocStack(int capacity) { return mallocStack(capacity, stackGet()); } /** * Returns a new {@link VkQueueFamilyProperties.Buffer} instance allocated on the thread-local {@link MemoryStack} and initializes all its bits to zero. * * @param capacity the buffer capacity */ public static Buffer callocStack(int capacity) { return callocStack(capacity, stackGet()); } /** * Returns a new {@link VkQueueFamilyProperties.Buffer} instance allocated on the specified {@link MemoryStack}. * * @param stack the stack from which to allocate * @param capacity the buffer capacity */ public static Buffer mallocStack(int capacity, MemoryStack stack) { return create(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); } /** * Returns a new {@link VkQueueFamilyProperties.Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. * * @param stack the stack from which to allocate * @param capacity the buffer capacity */ public static Buffer callocStack(int capacity, MemoryStack stack) { return create(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); } // ----------------------------------- /** Unsafe version of {@link #queueFlags}. */ public static int nqueueFlags(long struct) { return memGetInt(struct + VkQueueFamilyProperties.QUEUEFLAGS); } /** Unsafe version of {@link #queueCount}. */ public static int nqueueCount(long struct) { return memGetInt(struct + VkQueueFamilyProperties.QUEUECOUNT); } /** Unsafe version of {@link #timestampValidBits}. */ public static int ntimestampValidBits(long struct) { return memGetInt(struct + VkQueueFamilyProperties.TIMESTAMPVALIDBITS); } /** Unsafe version of {@link #minImageTransferGranularity}. */ public static VkExtent3D nminImageTransferGranularity(long struct) { return VkExtent3D.create(struct + VkQueueFamilyProperties.MINIMAGETRANSFERGRANULARITY); } // ----------------------------------- /** An array of {@link VkQueueFamilyProperties} structs. */ public static class Buffer extends StructBuffer implements NativeResource { /** * Creates a new {@link VkQueueFamilyProperties.Buffer} instance backed by the specified container. * * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided * by {@link VkQueueFamilyProperties#SIZEOF}, and its mark will be undefined. * *

The created buffer instance holds a strong reference to the container object.

*/ public Buffer(ByteBuffer container) { super(container, container.remaining() / SIZEOF); } Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) { super(address, container, mark, pos, lim, cap); } @Override protected Buffer self() { return this; } @Override protected Buffer newBufferInstance(long address, ByteBuffer container, int mark, int pos, int lim, int cap) { return new Buffer(address, container, mark, pos, lim, cap); } @Override protected VkQueueFamilyProperties newInstance(long address) { return new VkQueueFamilyProperties(address, container); } @Override public int sizeof() { return SIZEOF; } /** Returns the value of the {@code queueFlags} field. */ @NativeType("VkQueueFlags") public int queueFlags() { return VkQueueFamilyProperties.nqueueFlags(address()); } /** Returns the value of the {@code queueCount} field. */ @NativeType("uint32_t") public int queueCount() { return VkQueueFamilyProperties.nqueueCount(address()); } /** Returns the value of the {@code timestampValidBits} field. */ @NativeType("uint32_t") public int timestampValidBits() { return VkQueueFamilyProperties.ntimestampValidBits(address()); } /** Returns a {@link VkExtent3D} view of the {@code minImageTransferGranularity} field. */ public VkExtent3D minImageTransferGranularity() { return VkQueueFamilyProperties.nminImageTransferGranularity(address()); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy