break;
}
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: {
+ VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *props =
+ (VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *)ext;
+ /* We have to restrict this a bit for multiview */
+ props->maxVertexAttribDivisor = UINT32_MAX / 16;
+ break;
+ }
+
default:
anv_debug_ignored_stype(ext->sType);
break;
'device->has_context_priority'),
Extension('VK_EXT_shader_viewport_index_layer', 1, True),
Extension('VK_EXT_shader_stencil_export', 1, 'device->info.gen >= 9'),
+ Extension('VK_EXT_vertex_attribute_divisor', 2, True),
]
class VkVersion:
#include "compiler/brw_nir.h"
#include "anv_nir.h"
#include "spirv/nir_spirv.h"
+#include "vk_util.h"
/* Needed for SWIZZLE macros */
#include "program/prog_instruction.h"
pipeline->vb[desc->binding].instance_divisor = 1;
}
+ const VkPipelineVertexInputDivisorStateCreateInfoEXT *vi_div_state =
+ vk_find_struct_const(vi_info->pNext,
+ PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT);
+ if (vi_div_state) {
+ for (uint32_t i = 0; i < vi_div_state->vertexBindingDivisorCount; i++) {
+ const VkVertexInputBindingDivisorDescriptionEXT *desc =
+ &vi_div_state->pVertexBindingDivisors[i];
+
+ pipeline->vb[desc->binding].instance_divisor = desc->divisor;
+ }
+ }
/* Our implementation of VK_KHR_multiview uses instancing to draw the
* different views. If the client asks for instancing, we need to multiply