Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/metal/mtl_shader_generator.mm
| Show First 20 Lines • Show All 2,601 Lines • ▼ Show 20 Lines | else { | ||||
| name_buffer_offset), | name_buffer_offset), | ||||
| this->vertex_input_attributes[attribute].layout_location, | this->vertex_input_attributes[attribute].layout_location, | ||||
| mtl_datatype_to_vertex_type(mtl_type), | mtl_datatype_to_vertex_type(mtl_type), | ||||
| 0, | 0, | ||||
| size, | size, | ||||
| c_offset); | c_offset); | ||||
| c_offset += size; | c_offset += size; | ||||
| } | } | ||||
| /* Used in `GPU_shader_get_attribute_info`. */ | |||||
| interface->attr_types_[this->vertex_input_attributes[attribute].layout_location] = uint8_t( | |||||
| this->vertex_input_attributes[attribute].type); | |||||
| } | } | ||||
| /* Prepare Interface Default Uniform Block. */ | /* Prepare Interface Default Uniform Block. */ | ||||
| interface->add_push_constant_block(name_buffer_copystr( | interface->add_push_constant_block(name_buffer_copystr( | ||||
| &interface->name_buffer_, "PushConstantBlock", name_buffer_size, name_buffer_offset)); | &interface->name_buffer_, "PushConstantBlock", name_buffer_size, name_buffer_offset)); | ||||
| for (int uniform = 0; uniform < this->uniforms.size(); uniform++) { | for (int uniform = 0; uniform < this->uniforms.size(); uniform++) { | ||||
| interface->add_uniform( | interface->add_uniform( | ||||
| ▲ Show 20 Lines • Show All 475 Lines • Show Last 20 Lines | |||||