diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-22 00:30:23 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-27 01:55:15 +0200 |
commit | c387a72c7623aa452f6ca5b067079ce354be1f6c (patch) | |
tree | 62b0b0c0c26d64356b3ffb85b3dc38a57aa9fbde /src/video_core/renderer_vulkan/vk_rasterizer.cpp | |
parent | vk_device: Enable VK_EXT_extended_dynamic_state when available (diff) | |
download | yuzu-c387a72c7623aa452f6ca5b067079ce354be1f6c.tar yuzu-c387a72c7623aa452f6ca5b067079ce354be1f6c.tar.gz yuzu-c387a72c7623aa452f6ca5b067079ce354be1f6c.tar.bz2 yuzu-c387a72c7623aa452f6ca5b067079ce354be1f6c.tar.lz yuzu-c387a72c7623aa452f6ca5b067079ce354be1f6c.tar.xz yuzu-c387a72c7623aa452f6ca5b067079ce354be1f6c.tar.zst yuzu-c387a72c7623aa452f6ca5b067079ce354be1f6c.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index a8d94eac3..a42f8c564 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -822,7 +822,7 @@ RasterizerVulkan::DrawParameters RasterizerVulkan::SetupGeometry(FixedPipelineSt const auto& gpu = system.GPU().Maxwell3D(); const auto& regs = gpu.regs; - SetupVertexArrays(fixed_state.vertex_input, buffer_bindings); + SetupVertexArrays(buffer_bindings); const u32 base_instance = regs.vb_base_instance; const u32 num_instances = is_instanced ? gpu.mme_draw.instance_count : 1; @@ -940,30 +940,14 @@ void RasterizerVulkan::EndTransformFeedback() { [](vk::CommandBuffer cmdbuf) { cmdbuf.EndTransformFeedbackEXT(0, 0, nullptr, nullptr); }); } -void RasterizerVulkan::SetupVertexArrays(FixedPipelineState::VertexInput& vertex_input, - BufferBindings& buffer_bindings) { +void RasterizerVulkan::SetupVertexArrays(BufferBindings& buffer_bindings) { const auto& regs = system.GPU().Maxwell3D().regs; - for (std::size_t index = 0; index < Maxwell::NumVertexAttributes; ++index) { - const auto& attrib = regs.vertex_attrib_format[index]; - if (attrib.IsConstant()) { - vertex_input.SetAttribute(index, false, 0, 0, {}, {}); - continue; - } - vertex_input.SetAttribute(index, true, attrib.buffer, attrib.offset, attrib.type.Value(), - attrib.size.Value()); - } - for (std::size_t index = 0; index < Maxwell::NumVertexArrays; ++index) { const auto& vertex_array = regs.vertex_array[index]; if (!vertex_array.IsEnabled()) { - vertex_input.SetBinding(index, false, 0, 0); continue; } - vertex_input.SetBinding( - index, true, vertex_array.stride, - regs.instanced_arrays.IsInstancingEnabled(index) ? vertex_array.divisor : 0); - const GPUVAddr start{vertex_array.StartAddress()}; const GPUVAddr end{regs.vertex_array_limit[index].LimitAddress()}; |