12#include <Metal/Metal.h>
32 return (
format == other.format) && (offset == other.offset) &&
39 return uint64_t((
uint64_t(this->format) ^ (this->offset << 4) ^ (this->buffer_index << 8) ^
40 (this->format_conversion_mode << 12)));
45 format = MTLVertexFormatInvalid;
65 return uint64_t(
uint64_t(this->step_function) ^ (this->step_rate << 4) ^ (this->stride << 8));
88 int attribute_ind,
int vertexbuffer_ind,
int offset,
int stride,
int format,
bool instanced)
134 if ((this->max_attribute_value != other.max_attribute_value) ||
135 (this->total_attributes != other.total_attributes) ||
136 (this->num_vert_buffers != other.num_vert_buffers))
140 if (this->prim_topology_class != other.prim_topology_class) {
144 for (
const int a :
IndexRange(this->max_attribute_value + 1)) {
145 if (!(this->attributes[a] == other.attributes[a])) {
150 for (
const int b :
IndexRange(this->num_vert_buffers)) {
165 for (
const int a :
IndexRange(this->max_attribute_value + 1)) {
166 hash ^= this->attributes[a].
hash() << a;
169 for (
const int b :
IndexRange(this->num_vert_buffers)) {
186 return values == other.values;
296 hash ^=
uint64_t(this->stencil_attachment_format) << 20;
302 if (this->num_color_attachments > 0) {
312 hash ^=
uint64_t(this->color_attachment_format[c]) << (c + 52);
316 hash |=
uint64_t((this->blending_enabled && (this->num_color_attachments > 0)) ? 1 : 0) << 62;
#define GPU_BATCH_INST_VBO_MAX_LEN
#define GPU_BATCH_VBO_MAX_LEN
static unsigned long seed
local_group_size(16, 16) .push_constant(Type b
#define GPU_FB_MAX_COLOR_ATTACHMENT
unsigned __int64 uint64_t
bool operator==(const MTLComputePipelineStateDescriptor &other) const
MTLComputePipelineStateDescriptor()
SpecializationStateDescriptor specialization_state
MTLComputePipelineStateDescriptor(Vector< Shader::Constants::Value > values)
uchar clipping_plane_enable_mask
MTLBlendFactor dest_alpha_blend_factor
void reset_vertex_descriptor()
MTLBlendOperation alpha_blend_op
MTLPixelFormat color_attachment_format[GPU_FB_MAX_COLOR_ATTACHMENT]
MTLPixelFormat depth_attachment_format
MTLVertexDescriptor vertex_descriptor
int num_color_attachments
MTLColorWriteMask color_write_mask
MTLBlendFactor dest_rgb_blend_factor
MTLBlendFactor src_alpha_blend_factor
MTLBlendFactor src_rgb_blend_factor
MTLPixelFormat stencil_attachment_format
MTLBlendOperation rgb_blend_op
bool operator==(const MTLRenderPipelineStateDescriptor &other) const
SpecializationStateDescriptor specialization_state
MTLSSBOAttribute(int attribute_ind, int vertexbuffer_ind, int offset, int stride, int format, bool instanced)
bool operator==(const MTLSSBOAttribute &other) const
GPUVertFetchMode format_conversion_mode
bool operator==(const MTLVertexAttributeDescriptorPSO &other) const
MTLVertexStepFunction step_function
bool operator==(const MTLVertexBufferLayoutDescriptorPSO &other) const
MTLSSBOAttribute ssbo_attributes[GPU_VERT_ATTR_MAX_LEN]
MTLVertexBufferLayoutDescriptorPSO buffer_layouts[GPU_BATCH_VBO_MAX_LEN+GPU_BATCH_INST_VBO_MAX_LEN]
bool uses_ssbo_vertex_fetch
MTLVertexAttributeDescriptorPSO attributes[GPU_VERT_ATTR_MAX_LEN]
bool operator==(const MTLVertexDescriptor &other) const
MTLPrimitiveTopologyClass prim_topology_class
SpecializationStateDescriptor()=default
bool operator==(const SpecializationStateDescriptor &other) const
SpecializationStateDescriptor(Vector< Shader::Constants::Value > source)
Vector< Shader::Constants::Value > values