VKCTX(CmdBindIndexBuffer)(batch->state->cmdbuf, res->obj->buffer, index_offset, index_type[index_size >> 1]);
}
if (DYNAMIC_STATE < ZINK_DYNAMIC_STATE2) {
- if (ctx->gfx_pipeline_state.primitive_restart != dinfo->primitive_restart)
+ if (ctx->gfx_pipeline_state.dyn_state2.primitive_restart != dinfo->primitive_restart)
ctx->gfx_pipeline_state.dirty = true;
- ctx->gfx_pipeline_state.primitive_restart = dinfo->primitive_restart;
+ ctx->gfx_pipeline_state.dyn_state2.primitive_restart = dinfo->primitive_restart;
}
if (have_streamout && ctx->dirty_so_targets)
case VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY:
case VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY:
case VK_PRIMITIVE_TOPOLOGY_PATCH_LIST:
- if (state->primitive_restart)
+ if (state->dyn_state2.primitive_restart)
debug_printf("restart_index set with unsupported primitive topology %u\n", primitive_topology);
primitive_state.primitiveRestartEnable = VK_FALSE;
break;
default:
- primitive_state.primitiveRestartEnable = state->primitive_restart ? VK_TRUE : VK_FALSE;
+ primitive_state.primitiveRestartEnable = state->dyn_state2.primitive_restart ? VK_TRUE : VK_FALSE;
}
}
unsigned num_viewports;
} dyn_state1;
- bool primitive_restart; //dynamic state2
+ struct {
+ bool primitive_restart;
+ } dyn_state2;
VkShaderModule modules[PIPE_SHADER_TYPES - 1];
bool modules_changed;
const struct zink_gfx_pipeline_state *state = key;
uint32_t hash = _mesa_hash_data(key, offsetof(struct zink_gfx_pipeline_state, hash));
if (!state->have_EXT_extended_dynamic_state2)
- hash = XXH32(&state->primitive_restart, 1, hash);
+ hash = XXH32(&state->dyn_state2, sizeof(state->dyn_state2), hash);
if (state->have_EXT_extended_dynamic_state)
return hash;
return XXH32(&state->dyn_state1, sizeof(state->dyn_state1), hash);
return false;
}
if (!sa->have_EXT_extended_dynamic_state2) {
- if (sa->primitive_restart != sb->primitive_restart)
+ if (sa->dyn_state2.primitive_restart != sb->dyn_state2.primitive_restart)
return false;
}
return !memcmp(sa->modules, sb->modules, sizeof(sa->modules)) &&