Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/metal/mtl_pso_descriptor_state.hh
| Show First 20 Lines • Show All 237 Lines • ▼ Show 20 Lines | for (const uint c : IndexRange(GPU_FB_MAX_COLOR_ATTACHMENT)) { | ||||
| hash ^= uint64_t(this->color_attachment_format[c]) << (c + 52); /* Up to 555 (9 bits). */ | hash ^= uint64_t(this->color_attachment_format[c]) << (c + 52); /* Up to 555 (9 bits). */ | ||||
| } | } | ||||
| hash |= uint64_t((this->blending_enabled && (this->num_color_attachments > 0)) ? 1 : 0) << 62; | hash |= uint64_t((this->blending_enabled && (this->num_color_attachments > 0)) ? 1 : 0) << 62; | ||||
| hash ^= uint64_t(this->point_size); | hash ^= uint64_t(this->point_size); | ||||
| return hash; | return hash; | ||||
| } | } | ||||
| /* Reset the Vertex Descriptor to default. */ | |||||
| void reset_vertex_descriptor() | |||||
| { | |||||
| vertex_descriptor.num_attributes = 0; | |||||
| vertex_descriptor.num_vert_buffers = 0; | |||||
| for (int i = 0; i < GPU_VERT_ATTR_MAX_LEN; i++) { | |||||
| vertex_descriptor.attributes[i].format = MTLVertexFormatInvalid; | |||||
| vertex_descriptor.attributes[i].offset = 0; | |||||
| } | |||||
| vertex_descriptor.uses_ssbo_vertex_fetch = false; | |||||
| vertex_descriptor.num_ssbo_attributes = 0; | |||||
| } | |||||
| }; | }; | ||||
| } // namespace blender::gpu | } // namespace blender::gpu | ||||