Always set vertex stride for unbound buffers

This commit is contained in:
Billy Laws 2022-12-03 14:31:17 +00:00
parent f4f658e3b7
commit df19810c6c

View File

@ -43,9 +43,9 @@ namespace skyline::gpu::interconnect::maxwell3d {
megaBufferBinding = {}; megaBufferBinding = {};
if (ctx.gpu.traits.supportsNullDescriptor) if (ctx.gpu.traits.supportsNullDescriptor)
builder.SetVertexBuffer(index, BufferBinding{}); builder.SetVertexBuffer(index, BufferBinding{}, ctx.gpu.traits.supportsExtendedDynamicState, engine->vertexStream.format.stride);
else else
builder.SetVertexBuffer(index, {ctx.gpu.megaBufferAllocator.Allocate(ctx.executor.cycle, 0).buffer}); builder.SetVertexBuffer(index, {ctx.gpu.megaBufferAllocator.Allocate(ctx.executor.cycle, 0).buffer}, ctx.gpu.traits.supportsExtendedDynamicState, engine->vertexStream.format.stride);
} }
bool VertexBufferState::Refresh(InterconnectContext &ctx, StateUpdateBuilder &builder) { bool VertexBufferState::Refresh(InterconnectContext &ctx, StateUpdateBuilder &builder) {
@ -55,9 +55,9 @@ namespace skyline::gpu::interconnect::maxwell3d {
megaBufferBinding = newMegaBufferBinding; megaBufferBinding = newMegaBufferBinding;
if (megaBufferBinding) if (megaBufferBinding)
builder.SetVertexBuffer(index, megaBufferBinding); builder.SetVertexBuffer(index, megaBufferBinding, ctx.gpu.traits.supportsExtendedDynamicState, engine->vertexStream.format.stride);
else else
builder.SetVertexBuffer(index, *view); builder.SetVertexBuffer(index, *view, ctx.gpu.traits.supportsExtendedDynamicState, engine->vertexStream.format.stride);
} }
} }
return false; return false;