pipeline->vb_used |= BITFIELD64_BIT(state->vi->attributes[a].binding);
}
- u_foreach_bit(b, state->vi->bindings_valid) {
- pipeline->vb[b].stride = state->vi->bindings[b].stride;
- pipeline->vb[b].instanced = state->vi->bindings[b].input_rate ==
- VK_VERTEX_INPUT_RATE_INSTANCE;
- pipeline->vb[b].instance_divisor = state->vi->bindings[b].divisor;
- }
-
/* Our implementation of VK_KHR_multiview uses instancing to draw the
* different views when primitive replication cannot be used. If the
* client asks for instancing, we need to multiply by the client's
bool uses_xfb;
uint32_t vb_used;
- struct anv_pipeline_vertex_binding {
- uint32_t stride;
- bool instanced;
- uint32_t instance_divisor;
- } vb[MAX_VBS];
/* Pre computed CS instructions that can directly be copied into
* anv_cmd_buffer.
* VERTEX_BUFFER_STATE which we emit later.
*/
anv_batch_emit(&pipeline->base.batch, GENX(3DSTATE_VF_INSTANCING), vfi) {
- bool per_instance = pipeline->vb[binding].instanced;
- uint32_t divisor = pipeline->vb[binding].instance_divisor *
+ bool per_instance = vi->bindings[binding].input_rate ==
+ VK_VERTEX_INPUT_RATE_INSTANCE;
+ uint32_t divisor = vi->bindings[binding].divisor *
pipeline->instance_multiplier;
vfi.InstancingEnable = per_instance;