mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-24 19:57:05 +02:00
[vulkan] BindVertexBuffers2EXT set properly within pipeline chain
This commit is contained in:
parent
ebacfbf4ed
commit
284018cd36
1 changed files with 12 additions and 2 deletions
|
|
@ -555,7 +555,10 @@ void BufferCacheRuntime::BindVertexBuffer(u32 index, VkBuffer buffer, u32 offset
|
||||||
if (index >= device.GetMaxVertexInputBindings()) {
|
if (index >= device.GetMaxVertexInputBindings()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (device.IsExtExtendedDynamicStateSupported()) {
|
const bool use_stride_dynamic = device.IsExtExtendedDynamicStateSupported() &&
|
||||||
|
!(device.IsExtVertexInputDynamicStateSupported() &&
|
||||||
|
Settings::values.vertex_input_dynamic_state.GetValue());
|
||||||
|
if (use_stride_dynamic) {
|
||||||
scheduler.Record([index, buffer, offset, size, stride](vk::CommandBuffer cmdbuf) {
|
scheduler.Record([index, buffer, offset, size, stride](vk::CommandBuffer cmdbuf) {
|
||||||
const VkDeviceSize vk_offset = buffer != VK_NULL_HANDLE ? offset : 0;
|
const VkDeviceSize vk_offset = buffer != VK_NULL_HANDLE ? offset : 0;
|
||||||
const VkDeviceSize vk_size = buffer != VK_NULL_HANDLE ? size : VK_WHOLE_SIZE;
|
const VkDeviceSize vk_size = buffer != VK_NULL_HANDLE ? size : VK_WHOLE_SIZE;
|
||||||
|
|
@ -595,7 +598,14 @@ void BufferCacheRuntime::BindVertexBuffers(VideoCommon::HostBindings<Buffer>& bi
|
||||||
if (binding_count == 0) {
|
if (binding_count == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (device.IsExtExtendedDynamicStateSupported()) {
|
// Use BindVertexBuffers2EXT (with stride) only if:
|
||||||
|
// 1. VK_EXT_extended_dynamic_state is supported (provides VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT)
|
||||||
|
// 2. AND VK_EXT_vertex_input_dynamic_state is NOT active (supported + enabled by toggle)
|
||||||
|
// Because VIDS and BINDING_STRIDE are mutually exclusive in the pipeline
|
||||||
|
const bool use_stride_dynamic = device.IsExtExtendedDynamicStateSupported() &&
|
||||||
|
!(device.IsExtVertexInputDynamicStateSupported() &&
|
||||||
|
Settings::values.vertex_input_dynamic_state.GetValue());
|
||||||
|
if (use_stride_dynamic) {
|
||||||
scheduler.Record([bindings_ = std::move(bindings),
|
scheduler.Record([bindings_ = std::move(bindings),
|
||||||
buffer_handles_ = std::move(buffer_handles),
|
buffer_handles_ = std::move(buffer_handles),
|
||||||
binding_count](vk::CommandBuffer cmdbuf) {
|
binding_count](vk::CommandBuffer cmdbuf) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue