diff options
author | Ameer <aj662@drexel.edu> | 2020-07-14 19:04:02 +0200 |
---|---|---|
committer | Ameer <aj662@drexel.edu> | 2020-07-14 19:04:02 +0200 |
commit | 93fe982a0c3a5bfb7fa5df97ebced0a7692ccaf3 (patch) | |
tree | c4ab9e3acff296733b00effd85371bf04db6491f /src/video_core/renderer_vulkan | |
parent | Break out of scan loop if can't find adapter on first run (diff) | |
parent | Merge pull request #4294 from MerryMage/cpu-opt-settings (diff) | |
download | yuzu-93fe982a0c3a5bfb7fa5df97ebced0a7692ccaf3.tar yuzu-93fe982a0c3a5bfb7fa5df97ebced0a7692ccaf3.tar.gz yuzu-93fe982a0c3a5bfb7fa5df97ebced0a7692ccaf3.tar.bz2 yuzu-93fe982a0c3a5bfb7fa5df97ebced0a7692ccaf3.tar.lz yuzu-93fe982a0c3a5bfb7fa5df97ebced0a7692ccaf3.tar.xz yuzu-93fe982a0c3a5bfb7fa5df97ebced0a7692ccaf3.tar.zst yuzu-93fe982a0c3a5bfb7fa5df97ebced0a7692ccaf3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/renderer_vulkan.cpp | 2 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 12 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_stream_buffer.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 2d9b18ed9..2258479f5 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -409,7 +409,7 @@ bool RendererVulkan::PickDevices() { return false; } - const s32 device_index = Settings::values.vulkan_device; + const s32 device_index = Settings::values.vulkan_device.GetValue(); if (device_index < 0 || device_index >= static_cast<s32>(devices->size())) { LOG_ERROR(Render_Vulkan, "Invalid device index {}!", device_index); return false; diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 380ed532b..7625871c2 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -332,23 +332,23 @@ private: if constexpr (has_extended_dynamic_state) { // With extended dynamic states we can specify the length and stride of a vertex buffer - // std::array<VkDeviceSize, N> sizes; + std::array<VkDeviceSize, N> sizes; std::array<u16, N> strides; - // std::copy(vertex.sizes.begin(), vertex.sizes.begin() + N, sizes.begin()); + std::copy(vertex.sizes.begin(), vertex.sizes.begin() + N, sizes.begin()); std::copy(vertex.strides.begin(), vertex.strides.begin() + N, strides.begin()); if constexpr (is_indexed) { scheduler.Record( - [buffers, offsets, strides, index = index](vk::CommandBuffer cmdbuf) { + [buffers, offsets, sizes, strides, index = index](vk::CommandBuffer cmdbuf) { cmdbuf.BindIndexBuffer(index.buffer, index.offset, index.type); cmdbuf.BindVertexBuffers2EXT(0, static_cast<u32>(N), buffers.data(), - offsets.data(), nullptr, + offsets.data(), sizes.data(), ExpandStrides(strides).data()); }); } else { - scheduler.Record([buffers, offsets, strides](vk::CommandBuffer cmdbuf) { + scheduler.Record([buffers, offsets, sizes, strides](vk::CommandBuffer cmdbuf) { cmdbuf.BindVertexBuffers2EXT(0, static_cast<u32>(N), buffers.data(), - offsets.data(), nullptr, + offsets.data(), sizes.data(), ExpandStrides(strides).data()); }); } diff --git a/src/video_core/renderer_vulkan/vk_stream_buffer.cpp b/src/video_core/renderer_vulkan/vk_stream_buffer.cpp index 868447af2..2d28a6c47 100644 --- a/src/video_core/renderer_vulkan/vk_stream_buffer.cpp +++ b/src/video_core/renderer_vulkan/vk_stream_buffer.cpp @@ -121,7 +121,7 @@ void VKStreamBuffer::CreateBuffers(VkBufferUsageFlags usage) { // Substract from the preferred heap size some bytes to avoid getting out of memory. const VkDeviceSize heap_size = memory_properties.memoryHeaps[preferred_heap].size; - const VkDeviceSize allocable_size = heap_size - 4 * 1024 * 1024; + const VkDeviceSize allocable_size = heap_size - 9 * 1024 * 1024; VkBufferCreateInfo buffer_ci; buffer_ci.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; |