- java.lang.Object
-
- com.io7m.jcoronado.api.VulkanComputeWorkGroupSize
-
- All Implemented Interfaces:
VulkanComputeWorkGroupSizeType
public final class VulkanComputeWorkGroupSize extends java.lang.Object implements VulkanComputeWorkGroupSizeType
the maximum size of a local compute workgroup, per dimension. These three values represent the maximum local workgroup size in the X, Y, and Z dimensions, respectively. The x, y, and z sizes specified by the LocalSize execution mode and by the object decorated by the WorkgroupSize decoration in shader modules must be less than or equal to the corresponding limit.- See Also:
- "VkPhysicalDeviceLimits"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VulkanComputeWorkGroupSize.Builder
Builds instances of typeVulkanComputeWorkGroupSize
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VulkanComputeWorkGroupSize.Builder
builder()
Creates a builder forVulkanComputeWorkGroupSize
.static VulkanComputeWorkGroupSize
copyOf(VulkanComputeWorkGroupSizeType instance)
Creates an immutable copy of aVulkanComputeWorkGroupSizeType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofVulkanComputeWorkGroupSize
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:maximumX
,maximumY
,maximumZ
.int
maximumX()
int
maximumY()
int
maximumZ()
static VulkanComputeWorkGroupSize
of(int maximumX, int maximumY, int maximumZ)
Construct a new immutableVulkanComputeWorkGroupSize
instance.java.lang.String
toString()
Prints the immutable valueVulkanComputeWorkGroupSize
with attribute values.VulkanComputeWorkGroupSize
withMaximumX(int value)
Copy the current immutable object by setting a value for themaximumX
attribute.VulkanComputeWorkGroupSize
withMaximumY(int value)
Copy the current immutable object by setting a value for themaximumY
attribute.VulkanComputeWorkGroupSize
withMaximumZ(int value)
Copy the current immutable object by setting a value for themaximumZ
attribute.
-
-
-
Method Detail
-
maximumX
public int maximumX()
- Specified by:
maximumX
in interfaceVulkanComputeWorkGroupSizeType
- Returns:
- The limit on the X dimension
-
maximumY
public int maximumY()
- Specified by:
maximumY
in interfaceVulkanComputeWorkGroupSizeType
- Returns:
- The limit on the Y dimension
-
maximumZ
public int maximumZ()
- Specified by:
maximumZ
in interfaceVulkanComputeWorkGroupSizeType
- Returns:
- The limit on the Z dimension
-
withMaximumX
public final VulkanComputeWorkGroupSize withMaximumX(int value)
Copy the current immutable object by setting a value for themaximumX
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maximumX- Returns:
- A modified copy of the
this
object
-
withMaximumY
public final VulkanComputeWorkGroupSize withMaximumY(int value)
Copy the current immutable object by setting a value for themaximumY
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maximumY- Returns:
- A modified copy of the
this
object
-
withMaximumZ
public final VulkanComputeWorkGroupSize withMaximumZ(int value)
Copy the current immutable object by setting a value for themaximumZ
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maximumZ- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofVulkanComputeWorkGroupSize
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()
Computes a hash code from attributes:maximumX
,maximumY
,maximumZ
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueVulkanComputeWorkGroupSize
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static VulkanComputeWorkGroupSize of(int maximumX, int maximumY, int maximumZ)
Construct a new immutableVulkanComputeWorkGroupSize
instance.- Parameters:
maximumX
- The value for themaximumX
attributemaximumY
- The value for themaximumY
attributemaximumZ
- The value for themaximumZ
attribute- Returns:
- An immutable VulkanComputeWorkGroupSize instance
-
copyOf
public static VulkanComputeWorkGroupSize copyOf(VulkanComputeWorkGroupSizeType instance)
Creates an immutable copy of aVulkanComputeWorkGroupSizeType
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable VulkanComputeWorkGroupSize instance
-
builder
public static VulkanComputeWorkGroupSize.Builder builder()
Creates a builder forVulkanComputeWorkGroupSize
.- Returns:
- A new VulkanComputeWorkGroupSize builder
-
-