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

org.lwjgl.vulkan.VkShaderResourceUsageAMD 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 javax.annotation.*;

import java.nio.*;

import org.lwjgl.system.*;

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

/**
 * Resource usage information about a particular shader within a pipeline.
 * 
 * 

Member documentation

* *
    *
  • {@code numUsedVgprs} – the number of vector instruction general-purpose registers used by this shader.
  • *
  • {@code numUsedSgprs} – the number of scalar instruction general-purpose registers used by this shader.
  • *
  • {@code ldsSizePerLocalWorkGroup} – the maximum local data store size per work group in bytes.
  • *
  • {@code ldsUsageSizeInBytes} – the LDS usage size in bytes per work group by this shader.
  • *
  • {@code scratchMemUsageInBytes} – the scratch memory usage in bytes by this shader.
  • *
* *

Layout

* *
 * struct VkShaderResourceUsageAMD {
 *     uint32_t numUsedVgprs;
 *     uint32_t numUsedSgprs;
 *     uint32_t ldsSizePerLocalWorkGroup;
 *     size_t ldsUsageSizeInBytes;
 *     size_t scratchMemUsageInBytes;
 * }
*/ public class VkShaderResourceUsageAMD extends Struct { /** The struct size in bytes. */ public static final int SIZEOF; public static final int ALIGNOF; /** The struct member offsets. */ public static final int NUMUSEDVGPRS, NUMUSEDSGPRS, LDSSIZEPERLOCALWORKGROUP, LDSUSAGESIZEINBYTES, SCRATCHMEMUSAGEINBYTES; static { Layout layout = __struct( __member(4), __member(4), __member(4), __member(POINTER_SIZE), __member(POINTER_SIZE) ); SIZEOF = layout.getSize(); ALIGNOF = layout.getAlignment(); NUMUSEDVGPRS = layout.offsetof(0); NUMUSEDSGPRS = layout.offsetof(1); LDSSIZEPERLOCALWORKGROUP = layout.offsetof(2); LDSUSAGESIZEINBYTES = layout.offsetof(3); SCRATCHMEMUSAGEINBYTES = layout.offsetof(4); } VkShaderResourceUsageAMD(long address, @Nullable ByteBuffer container) { super(address, container); } /** * Creates a {@link VkShaderResourceUsageAMD} 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 VkShaderResourceUsageAMD(ByteBuffer container) { this(memAddress(container), __checkContainer(container, SIZEOF)); } @Override public int sizeof() { return SIZEOF; } /** Returns the value of the {@code numUsedVgprs} field. */ @NativeType("uint32_t") public int numUsedVgprs() { return nnumUsedVgprs(address()); } /** Returns the value of the {@code numUsedSgprs} field. */ @NativeType("uint32_t") public int numUsedSgprs() { return nnumUsedSgprs(address()); } /** Returns the value of the {@code ldsSizePerLocalWorkGroup} field. */ @NativeType("uint32_t") public int ldsSizePerLocalWorkGroup() { return nldsSizePerLocalWorkGroup(address()); } /** Returns the value of the {@code ldsUsageSizeInBytes} field. */ @NativeType("size_t") public long ldsUsageSizeInBytes() { return nldsUsageSizeInBytes(address()); } /** Returns the value of the {@code scratchMemUsageInBytes} field. */ @NativeType("size_t") public long scratchMemUsageInBytes() { return nscratchMemUsageInBytes(address()); } // ----------------------------------- /** Returns a new {@link VkShaderResourceUsageAMD} instance for the specified memory address. */ public static VkShaderResourceUsageAMD create(long address) { return new VkShaderResourceUsageAMD(address, null); } /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ @Nullable public static VkShaderResourceUsageAMD createSafe(long address) { return address == NULL ? null : create(address); } /** * Create a {@link VkShaderResourceUsageAMD.Buffer} instance at the specified memory. * * @param address the memory address * @param capacity the buffer capacity */ public static VkShaderResourceUsageAMD.Buffer create(long address, int capacity) { return new Buffer(address, capacity); } /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ @Nullable public static VkShaderResourceUsageAMD.Buffer createSafe(long address, int capacity) { return address == NULL ? null : create(address, capacity); } // ----------------------------------- /** Unsafe version of {@link #numUsedVgprs}. */ public static int nnumUsedVgprs(long struct) { return memGetInt(struct + VkShaderResourceUsageAMD.NUMUSEDVGPRS); } /** Unsafe version of {@link #numUsedSgprs}. */ public static int nnumUsedSgprs(long struct) { return memGetInt(struct + VkShaderResourceUsageAMD.NUMUSEDSGPRS); } /** Unsafe version of {@link #ldsSizePerLocalWorkGroup}. */ public static int nldsSizePerLocalWorkGroup(long struct) { return memGetInt(struct + VkShaderResourceUsageAMD.LDSSIZEPERLOCALWORKGROUP); } /** Unsafe version of {@link #ldsUsageSizeInBytes}. */ public static long nldsUsageSizeInBytes(long struct) { return memGetAddress(struct + VkShaderResourceUsageAMD.LDSUSAGESIZEINBYTES); } /** Unsafe version of {@link #scratchMemUsageInBytes}. */ public static long nscratchMemUsageInBytes(long struct) { return memGetAddress(struct + VkShaderResourceUsageAMD.SCRATCHMEMUSAGEINBYTES); } // ----------------------------------- /** An array of {@link VkShaderResourceUsageAMD} structs. */ public static class Buffer extends StructBuffer { /** * Creates a new {@link VkShaderResourceUsageAMD.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 VkShaderResourceUsageAMD#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); } public Buffer(long address, int cap) { super(address, null, -1, 0, cap, cap); } Buffer(long address, @Nullable 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, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { return new Buffer(address, container, mark, pos, lim, cap); } @Override protected VkShaderResourceUsageAMD newInstance(long address) { return new VkShaderResourceUsageAMD(address, container); } @Override public int sizeof() { return SIZEOF; } /** Returns the value of the {@code numUsedVgprs} field. */ @NativeType("uint32_t") public int numUsedVgprs() { return VkShaderResourceUsageAMD.nnumUsedVgprs(address()); } /** Returns the value of the {@code numUsedSgprs} field. */ @NativeType("uint32_t") public int numUsedSgprs() { return VkShaderResourceUsageAMD.nnumUsedSgprs(address()); } /** Returns the value of the {@code ldsSizePerLocalWorkGroup} field. */ @NativeType("uint32_t") public int ldsSizePerLocalWorkGroup() { return VkShaderResourceUsageAMD.nldsSizePerLocalWorkGroup(address()); } /** Returns the value of the {@code ldsUsageSizeInBytes} field. */ @NativeType("size_t") public long ldsUsageSizeInBytes() { return VkShaderResourceUsageAMD.nldsUsageSizeInBytes(address()); } /** Returns the value of the {@code scratchMemUsageInBytes} field. */ @NativeType("size_t") public long scratchMemUsageInBytes() { return VkShaderResourceUsageAMD.nscratchMemUsageInBytes(address()); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy