mirror of https://gitlab.freedesktop.org/mesa/mesa
v3d,v3dv: stop hard-coding max attrib divisor
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28964>
This commit is contained in:
parent
e8f96dd0b0
commit
027c01bd8f
|
@ -69,4 +69,6 @@
|
||||||
|
|
||||||
#define V3D_MAX_ARRAY_LAYERS 2048
|
#define V3D_MAX_ARRAY_LAYERS 2048
|
||||||
|
|
||||||
|
#define V3D_MAX_VERTEX_ATTRIB_DIVISOR 0xffff
|
||||||
|
|
||||||
#endif /* V3D_LIMITS_H */
|
#endif /* V3D_LIMITS_H */
|
||||||
|
|
|
@ -1459,13 +1459,13 @@ v3dv_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
|
||||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: {
|
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: {
|
||||||
VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *props =
|
VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *props =
|
||||||
(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *)ext;
|
(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *)ext;
|
||||||
props->maxVertexAttribDivisor = 0xffff;
|
props->maxVertexAttribDivisor = V3D_MAX_VERTEX_ATTRIB_DIVISOR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR: {
|
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR: {
|
||||||
VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR *props =
|
VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR *props =
|
||||||
(VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR *)ext;
|
(VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR *)ext;
|
||||||
props->maxVertexAttribDivisor = 0xffff;
|
props->maxVertexAttribDivisor = V3D_MAX_VERTEX_ATTRIB_DIVISOR;
|
||||||
props->supportsNonZeroFirstInstance = true;
|
props->supportsNonZeroFirstInstance = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -616,7 +616,7 @@ pack_shader_state_attribute_record(struct v3dv_pipeline *pipeline,
|
||||||
attr.read_as_int_uint = desc->channel[0].pure_integer;
|
attr.read_as_int_uint = desc->channel[0].pure_integer;
|
||||||
|
|
||||||
attr.instance_divisor = MIN2(pipeline->vb[binding].instance_divisor,
|
attr.instance_divisor = MIN2(pipeline->vb[binding].instance_divisor,
|
||||||
0xffff);
|
V3D_MAX_VERTEX_ATTRIB_DIVISOR);
|
||||||
attr.type = get_attr_type(desc);
|
attr.type = get_attr_type(desc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -374,7 +374,7 @@ v3d_vertex_state_create(struct pipe_context *pctx, unsigned num_elements,
|
||||||
attr.normalized_int_type = desc->channel[0].normalized;
|
attr.normalized_int_type = desc->channel[0].normalized;
|
||||||
attr.read_as_int_uint = desc->channel[0].pure_integer;
|
attr.read_as_int_uint = desc->channel[0].pure_integer;
|
||||||
attr.instance_divisor = MIN2(elem->instance_divisor,
|
attr.instance_divisor = MIN2(elem->instance_divisor,
|
||||||
0xffff);
|
V3D_MAX_VERTEX_ATTRIB_DIVISOR);
|
||||||
|
|
||||||
switch (desc->channel[0].type) {
|
switch (desc->channel[0].type) {
|
||||||
case UTIL_FORMAT_TYPE_FLOAT:
|
case UTIL_FORMAT_TYPE_FLOAT:
|
||||||
|
|
Loading…
Reference in New Issue