summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorRodrigo Locatti <rodrigo.locatti@gmail.com>2021-04-23 07:38:02 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:29 +0200
commit2dc86372c76afb134651499452bb5074b6d1e839 (patch)
tree97c6e2bc07710a0913f262f24d392e96699324a5 /src/video_core
parentshader: Fix render targets with null attachments (diff)
downloadyuzu-2dc86372c76afb134651499452bb5074b6d1e839.tar
yuzu-2dc86372c76afb134651499452bb5074b6d1e839.tar.gz
yuzu-2dc86372c76afb134651499452bb5074b6d1e839.tar.bz2
yuzu-2dc86372c76afb134651499452bb5074b6d1e839.tar.lz
yuzu-2dc86372c76afb134651499452bb5074b6d1e839.tar.xz
yuzu-2dc86372c76afb134651499452bb5074b6d1e839.tar.zst
yuzu-2dc86372c76afb134651499452bb5074b6d1e839.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_vulkan/vk_compute_pipeline.cpp4
-rw-r--r--src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp2
-rw-r--r--src/video_core/vulkan_common/vulkan_device.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp b/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp
index 6e9f66262..6611c1de3 100644
--- a/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp
+++ b/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp
@@ -95,7 +95,7 @@ void ComputePipeline::Configure(Tegra::Engines::KeplerCompute& kepler_compute,
ASSERT(((qmd.const_buffer_enable_mask >> desc.cbuf_index) & 1) != 0);
const u32 index_offset{index << desc.size_shift};
const u32 offset{desc.cbuf_offset + index_offset};
- const GPUVAddr addr{cbufs[desc.cbuf_index].Address() + desc.cbuf_offset};
+ const GPUVAddr addr{cbufs[desc.cbuf_index].Address() + offset};
if constexpr (std::is_same_v<decltype(desc), const Shader::TextureDescriptor&> ||
std::is_same_v<decltype(desc), const Shader::TextureBufferDescriptor&>) {
if (desc.has_secondary) {
@@ -136,7 +136,7 @@ void ComputePipeline::Configure(Tegra::Engines::KeplerCompute& kepler_compute,
ImageId* texture_buffer_ids{image_view_ids.data()};
size_t index{};
const auto add_buffer{[&](const auto& desc) {
- for (u32 index = 0; index < desc.count; ++index) {
+ for (u32 i = 0; index < desc.count; ++i) {
bool is_written{false};
if constexpr (std::is_same_v<decltype(desc), const Shader::ImageBufferDescriptor&>) {
is_written = desc.is_written;
diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp
index e43db280f..a8b402253 100644
--- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp
+++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp
@@ -226,7 +226,7 @@ void GraphicsPipeline::Configure(bool is_indexed) {
for (size_t stage = 0; stage < Maxwell::MaxShaderStage; ++stage) {
size_t index{};
const auto add_buffer{[&](const auto& desc) {
- for (u32 index = 0; index < desc.count; ++index) {
+ for (u32 i = 0; i < desc.count; ++i) {
bool is_written{false};
if constexpr (std::is_same_v<decltype(desc),
const Shader::ImageBufferDescriptor&>) {
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h
index 4415558bb..ebe073293 100644
--- a/src/video_core/vulkan_common/vulkan_device.h
+++ b/src/video_core/vulkan_common/vulkan_device.h
@@ -4,10 +4,10 @@
#pragma once
+#include <span>
#include <string>
#include <string_view>
#include <unordered_map>
-#include <span>
#include <vector>
#include "common/common_types.h"