diff options
49 files changed, 305 insertions, 292 deletions
diff --git a/src/common/scope_exit.h b/src/common/scope_exit.h index 68ef5f197..fa46cb394 100644 --- a/src/common/scope_exit.h +++ b/src/common/scope_exit.h | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | namespace detail { | 10 | namespace detail { |
| 11 | template <typename Func> | 11 | template <typename Func> |
| 12 | struct ScopeExitHelper { | 12 | struct ScopeExitHelper { |
| 13 | explicit ScopeExitHelper(Func&& func) : func(std::move(func)) {} | 13 | explicit ScopeExitHelper(Func&& func_) : func(std::move(func_)) {} |
| 14 | ~ScopeExitHelper() { | 14 | ~ScopeExitHelper() { |
| 15 | if (active) { | 15 | if (active) { |
| 16 | func(); | 16 | func(); |
diff --git a/src/common/telemetry.h b/src/common/telemetry.h index a50c5d1de..49186e848 100644 --- a/src/common/telemetry.h +++ b/src/common/telemetry.h | |||
| @@ -52,8 +52,8 @@ public: | |||
| 52 | template <typename T> | 52 | template <typename T> |
| 53 | class Field : public FieldInterface { | 53 | class Field : public FieldInterface { |
| 54 | public: | 54 | public: |
| 55 | Field(FieldType type, std::string name, T value) | 55 | Field(FieldType type_, std::string name_, T value_) |
| 56 | : name(std::move(name)), type(type), value(std::move(value)) {} | 56 | : name(std::move(name_)), type(type_), value(std::move(value_)) {} |
| 57 | 57 | ||
| 58 | Field(const Field&) = default; | 58 | Field(const Field&) = default; |
| 59 | Field& operator=(const Field&) = default; | 59 | Field& operator=(const Field&) = default; |
diff --git a/src/core/file_sys/vfs_vector.h b/src/core/file_sys/vfs_vector.h index 95d3da2f2..c214db422 100644 --- a/src/core/file_sys/vfs_vector.h +++ b/src/core/file_sys/vfs_vector.h | |||
| @@ -17,9 +17,9 @@ namespace FileSys { | |||
| 17 | template <std::size_t size> | 17 | template <std::size_t size> |
| 18 | class ArrayVfsFile : public VfsFile { | 18 | class ArrayVfsFile : public VfsFile { |
| 19 | public: | 19 | public: |
| 20 | explicit ArrayVfsFile(const std::array<u8, size>& data, std::string name = "", | 20 | explicit ArrayVfsFile(const std::array<u8, size>& data_, std::string name_ = "", |
| 21 | VirtualDir parent = nullptr) | 21 | VirtualDir parent_ = nullptr) |
| 22 | : data(data), name(std::move(name)), parent(std::move(parent)) {} | 22 | : data(data_), name(std::move(name_)), parent(std::move(parent_)) {} |
| 23 | 23 | ||
| 24 | std::string GetName() const override { | 24 | std::string GetName() const override { |
| 25 | return name; | 25 | return name; |
| @@ -51,12 +51,12 @@ public: | |||
| 51 | return read; | 51 | return read; |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | std::size_t Write(const u8* data, std::size_t length, std::size_t offset) override { | 54 | std::size_t Write(const u8* data_, std::size_t length, std::size_t offset) override { |
| 55 | return 0; | 55 | return 0; |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | bool Rename(std::string_view name) override { | 58 | bool Rename(std::string_view new_name) override { |
| 59 | this->name = name; | 59 | name = new_name; |
| 60 | return true; | 60 | return true; |
| 61 | } | 61 | } |
| 62 | 62 | ||
diff --git a/src/core/hle/kernel/memory/memory_block.h b/src/core/hle/kernel/memory/memory_block.h index 9d7839d08..37fe19916 100644 --- a/src/core/hle/kernel/memory/memory_block.h +++ b/src/core/hle/kernel/memory/memory_block.h | |||
| @@ -222,9 +222,9 @@ public: | |||
| 222 | 222 | ||
| 223 | public: | 223 | public: |
| 224 | constexpr MemoryBlock() = default; | 224 | constexpr MemoryBlock() = default; |
| 225 | constexpr MemoryBlock(VAddr addr, std::size_t num_pages, MemoryState state, | 225 | constexpr MemoryBlock(VAddr addr_, std::size_t num_pages_, MemoryState state_, |
| 226 | MemoryPermission perm, MemoryAttribute attribute) | 226 | MemoryPermission perm_, MemoryAttribute attribute_) |
| 227 | : addr{addr}, num_pages(num_pages), state{state}, perm{perm}, attribute{attribute} {} | 227 | : addr{addr_}, num_pages(num_pages_), state{state_}, perm{perm_}, attribute{attribute_} {} |
| 228 | 228 | ||
| 229 | constexpr VAddr GetAddress() const { | 229 | constexpr VAddr GetAddress() const { |
| 230 | return addr; | 230 | return addr; |
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index abcee2a1c..a021d61f5 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt | |||
| @@ -297,13 +297,20 @@ if (ENABLE_NSIGHT_AFTERMATH) | |||
| 297 | endif() | 297 | endif() |
| 298 | 298 | ||
| 299 | if (MSVC) | 299 | if (MSVC) |
| 300 | target_compile_options(video_core PRIVATE /we4267) | 300 | target_compile_options(video_core PRIVATE |
| 301 | /we4267 # 'var' : conversion from 'size_t' to 'type', possible loss of data | ||
| 302 | /we4456 # Declaration of 'identifier' hides previous local declaration | ||
| 303 | /we4457 # Declaration of 'identifier' hides function parameter | ||
| 304 | /we4458 # Declaration of 'identifier' hides class member | ||
| 305 | /we4459 # Declaration of 'identifier' hides global declaration | ||
| 306 | ) | ||
| 301 | else() | 307 | else() |
| 302 | target_compile_options(video_core PRIVATE | 308 | target_compile_options(video_core PRIVATE |
| 303 | -Werror=conversion | 309 | -Werror=conversion |
| 304 | -Wno-error=sign-conversion | 310 | -Wno-error=sign-conversion |
| 305 | -Werror=pessimizing-move | 311 | -Werror=pessimizing-move |
| 306 | -Werror=redundant-move | 312 | -Werror=redundant-move |
| 313 | -Werror=shadow | ||
| 307 | -Werror=switch | 314 | -Werror=switch |
| 308 | -Werror=type-limits | 315 | -Werror=type-limits |
| 309 | -Werror=unused-variable | 316 | -Werror=unused-variable |
diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h index fc54ca0ef..203f2af05 100644 --- a/src/video_core/query_cache.h +++ b/src/video_core/query_cache.h | |||
| @@ -28,8 +28,8 @@ namespace VideoCommon { | |||
| 28 | template <class QueryCache, class HostCounter> | 28 | template <class QueryCache, class HostCounter> |
| 29 | class CounterStreamBase { | 29 | class CounterStreamBase { |
| 30 | public: | 30 | public: |
| 31 | explicit CounterStreamBase(QueryCache& cache, VideoCore::QueryType type) | 31 | explicit CounterStreamBase(QueryCache& cache_, VideoCore::QueryType type_) |
| 32 | : cache{cache}, type{type} {} | 32 | : cache{cache_}, type{type_} {} |
| 33 | 33 | ||
| 34 | /// Updates the state of the stream, enabling or disabling as needed. | 34 | /// Updates the state of the stream, enabling or disabling as needed. |
| 35 | void Update(bool enabled) { | 35 | void Update(bool enabled) { |
| @@ -334,8 +334,8 @@ private: | |||
| 334 | template <class HostCounter> | 334 | template <class HostCounter> |
| 335 | class CachedQueryBase { | 335 | class CachedQueryBase { |
| 336 | public: | 336 | public: |
| 337 | explicit CachedQueryBase(VAddr cpu_addr, u8* host_ptr) | 337 | explicit CachedQueryBase(VAddr cpu_addr_, u8* host_ptr_) |
| 338 | : cpu_addr{cpu_addr}, host_ptr{host_ptr} {} | 338 | : cpu_addr{cpu_addr_}, host_ptr{host_ptr_} {} |
| 339 | virtual ~CachedQueryBase() = default; | 339 | virtual ~CachedQueryBase() = default; |
| 340 | 340 | ||
| 341 | CachedQueryBase(CachedQueryBase&&) noexcept = default; | 341 | CachedQueryBase(CachedQueryBase&&) noexcept = default; |
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.cpp b/src/video_core/renderer_opengl/gl_buffer_cache.cpp index b1c4cd62f..60735d502 100644 --- a/src/video_core/renderer_opengl/gl_buffer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_buffer_cache.cpp | |||
| @@ -22,11 +22,11 @@ using Maxwell = Tegra::Engines::Maxwell3D::Regs; | |||
| 22 | 22 | ||
| 23 | MICROPROFILE_DEFINE(OpenGL_Buffer_Download, "OpenGL", "Buffer Download", MP_RGB(192, 192, 128)); | 23 | MICROPROFILE_DEFINE(OpenGL_Buffer_Download, "OpenGL", "Buffer Download", MP_RGB(192, 192, 128)); |
| 24 | 24 | ||
| 25 | Buffer::Buffer(const Device& device, VAddr cpu_addr, std::size_t size) | 25 | Buffer::Buffer(const Device& device_, VAddr cpu_addr_, std::size_t size_) |
| 26 | : VideoCommon::BufferBlock{cpu_addr, size} { | 26 | : BufferBlock{cpu_addr_, size_} { |
| 27 | gl_buffer.Create(); | 27 | gl_buffer.Create(); |
| 28 | glNamedBufferData(gl_buffer.handle, static_cast<GLsizeiptr>(size), nullptr, GL_DYNAMIC_DRAW); | 28 | glNamedBufferData(gl_buffer.handle, static_cast<GLsizeiptr>(size_), nullptr, GL_DYNAMIC_DRAW); |
| 29 | if (device.UseAssemblyShaders() || device.HasVertexBufferUnifiedMemory()) { | 29 | if (device_.UseAssemblyShaders() || device_.HasVertexBufferUnifiedMemory()) { |
| 30 | glMakeNamedBufferResidentNV(gl_buffer.handle, GL_READ_WRITE); | 30 | glMakeNamedBufferResidentNV(gl_buffer.handle, GL_READ_WRITE); |
| 31 | glGetNamedBufferParameterui64vNV(gl_buffer.handle, GL_BUFFER_GPU_ADDRESS_NV, &gpu_address); | 31 | glGetNamedBufferParameterui64vNV(gl_buffer.handle, GL_BUFFER_GPU_ADDRESS_NV, &gpu_address); |
| 32 | } | 32 | } |
| @@ -34,14 +34,14 @@ Buffer::Buffer(const Device& device, VAddr cpu_addr, std::size_t size) | |||
| 34 | 34 | ||
| 35 | Buffer::~Buffer() = default; | 35 | Buffer::~Buffer() = default; |
| 36 | 36 | ||
| 37 | void Buffer::Upload(std::size_t offset, std::size_t size, const u8* data) { | 37 | void Buffer::Upload(std::size_t offset, std::size_t data_size, const u8* data) { |
| 38 | glNamedBufferSubData(Handle(), static_cast<GLintptr>(offset), static_cast<GLsizeiptr>(size), | 38 | glNamedBufferSubData(Handle(), static_cast<GLintptr>(offset), |
| 39 | data); | 39 | static_cast<GLsizeiptr>(data_size), data); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | void Buffer::Download(std::size_t offset, std::size_t size, u8* data) { | 42 | void Buffer::Download(std::size_t offset, std::size_t data_size, u8* data) { |
| 43 | MICROPROFILE_SCOPE(OpenGL_Buffer_Download); | 43 | MICROPROFILE_SCOPE(OpenGL_Buffer_Download); |
| 44 | const GLsizeiptr gl_size = static_cast<GLsizeiptr>(size); | 44 | const GLsizeiptr gl_size = static_cast<GLsizeiptr>(data_size); |
| 45 | const GLintptr gl_offset = static_cast<GLintptr>(offset); | 45 | const GLintptr gl_offset = static_cast<GLintptr>(offset); |
| 46 | if (read_buffer.handle == 0) { | 46 | if (read_buffer.handle == 0) { |
| 47 | read_buffer.Create(); | 47 | read_buffer.Create(); |
| @@ -54,16 +54,16 @@ void Buffer::Download(std::size_t offset, std::size_t size, u8* data) { | |||
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | void Buffer::CopyFrom(const Buffer& src, std::size_t src_offset, std::size_t dst_offset, | 56 | void Buffer::CopyFrom(const Buffer& src, std::size_t src_offset, std::size_t dst_offset, |
| 57 | std::size_t size) { | 57 | std::size_t copy_size) { |
| 58 | glCopyNamedBufferSubData(src.Handle(), Handle(), static_cast<GLintptr>(src_offset), | 58 | glCopyNamedBufferSubData(src.Handle(), Handle(), static_cast<GLintptr>(src_offset), |
| 59 | static_cast<GLintptr>(dst_offset), static_cast<GLsizeiptr>(size)); | 59 | static_cast<GLintptr>(dst_offset), static_cast<GLsizeiptr>(copy_size)); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | OGLBufferCache::OGLBufferCache(VideoCore::RasterizerInterface& rasterizer, | 62 | OGLBufferCache::OGLBufferCache(VideoCore::RasterizerInterface& rasterizer_, |
| 63 | Tegra::MemoryManager& gpu_memory, Core::Memory::Memory& cpu_memory, | 63 | Tegra::MemoryManager& gpu_memory_, Core::Memory::Memory& cpu_memory_, |
| 64 | const Device& device_, std::size_t stream_size) | 64 | const Device& device_, std::size_t stream_size_) |
| 65 | : GenericBufferCache{rasterizer, gpu_memory, cpu_memory, | 65 | : GenericBufferCache{rasterizer_, gpu_memory_, cpu_memory_, |
| 66 | std::make_unique<OGLStreamBuffer>(device_, stream_size, true)}, | 66 | std::make_unique<OGLStreamBuffer>(device_, stream_size_, true)}, |
| 67 | device{device_} { | 67 | device{device_} { |
| 68 | if (!device.HasFastBufferSubData()) { | 68 | if (!device.HasFastBufferSubData()) { |
| 69 | return; | 69 | return; |
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.h b/src/video_core/renderer_opengl/gl_buffer_cache.h index f75b32e31..95251e26b 100644 --- a/src/video_core/renderer_opengl/gl_buffer_cache.h +++ b/src/video_core/renderer_opengl/gl_buffer_cache.h | |||
| @@ -25,15 +25,15 @@ class RasterizerOpenGL; | |||
| 25 | 25 | ||
| 26 | class Buffer : public VideoCommon::BufferBlock { | 26 | class Buffer : public VideoCommon::BufferBlock { |
| 27 | public: | 27 | public: |
| 28 | explicit Buffer(const Device& device, VAddr cpu_addr, std::size_t size); | 28 | explicit Buffer(const Device& device_, VAddr cpu_addr_, std::size_t size_); |
| 29 | ~Buffer(); | 29 | ~Buffer(); |
| 30 | 30 | ||
| 31 | void Upload(std::size_t offset, std::size_t size, const u8* data); | 31 | void Upload(std::size_t offset, std::size_t data_size, const u8* data); |
| 32 | 32 | ||
| 33 | void Download(std::size_t offset, std::size_t size, u8* data); | 33 | void Download(std::size_t offset, std::size_t data_size, u8* data); |
| 34 | 34 | ||
| 35 | void CopyFrom(const Buffer& src, std::size_t src_offset, std::size_t dst_offset, | 35 | void CopyFrom(const Buffer& src, std::size_t src_offset, std::size_t dst_offset, |
| 36 | std::size_t size); | 36 | std::size_t copy_size); |
| 37 | 37 | ||
| 38 | GLuint Handle() const noexcept { | 38 | GLuint Handle() const noexcept { |
| 39 | return gl_buffer.handle; | 39 | return gl_buffer.handle; |
| @@ -52,9 +52,9 @@ private: | |||
| 52 | using GenericBufferCache = VideoCommon::BufferCache<Buffer, GLuint, OGLStreamBuffer>; | 52 | using GenericBufferCache = VideoCommon::BufferCache<Buffer, GLuint, OGLStreamBuffer>; |
| 53 | class OGLBufferCache final : public GenericBufferCache { | 53 | class OGLBufferCache final : public GenericBufferCache { |
| 54 | public: | 54 | public: |
| 55 | explicit OGLBufferCache(VideoCore::RasterizerInterface& rasterizer, | 55 | explicit OGLBufferCache(VideoCore::RasterizerInterface& rasterizer_, |
| 56 | Tegra::MemoryManager& gpu_memory, Core::Memory::Memory& cpu_memory, | 56 | Tegra::MemoryManager& gpu_memory_, Core::Memory::Memory& cpu_memory_, |
| 57 | const Device& device, std::size_t stream_size); | 57 | const Device& device_, std::size_t stream_size_); |
| 58 | ~OGLBufferCache(); | 58 | ~OGLBufferCache(); |
| 59 | 59 | ||
| 60 | BufferInfo GetEmptyBuffer(std::size_t) override; | 60 | BufferInfo GetEmptyBuffer(std::size_t) override; |
diff --git a/src/video_core/renderer_opengl/gl_query_cache.cpp b/src/video_core/renderer_opengl/gl_query_cache.cpp index bcc37471f..acebbf5f4 100644 --- a/src/video_core/renderer_opengl/gl_query_cache.cpp +++ b/src/video_core/renderer_opengl/gl_query_cache.cpp | |||
| @@ -30,11 +30,9 @@ constexpr GLenum GetTarget(VideoCore::QueryType type) { | |||
| 30 | 30 | ||
| 31 | } // Anonymous namespace | 31 | } // Anonymous namespace |
| 32 | 32 | ||
| 33 | QueryCache::QueryCache(RasterizerOpenGL& rasterizer, Tegra::Engines::Maxwell3D& maxwell3d, | 33 | QueryCache::QueryCache(RasterizerOpenGL& rasterizer_, Tegra::Engines::Maxwell3D& maxwell3d_, |
| 34 | Tegra::MemoryManager& gpu_memory) | 34 | Tegra::MemoryManager& gpu_memory_) |
| 35 | : VideoCommon::QueryCacheBase<QueryCache, CachedQuery, CounterStream, HostCounter>( | 35 | : QueryCacheBase(rasterizer_, maxwell3d_, gpu_memory_), gl_rasterizer{rasterizer_} {} |
| 36 | rasterizer, maxwell3d, gpu_memory), | ||
| 37 | gl_rasterizer{rasterizer} {} | ||
| 38 | 36 | ||
| 39 | QueryCache::~QueryCache() = default; | 37 | QueryCache::~QueryCache() = default; |
| 40 | 38 | ||
| @@ -59,10 +57,11 @@ bool QueryCache::AnyCommandQueued() const noexcept { | |||
| 59 | return gl_rasterizer.AnyCommandQueued(); | 57 | return gl_rasterizer.AnyCommandQueued(); |
| 60 | } | 58 | } |
| 61 | 59 | ||
| 62 | HostCounter::HostCounter(QueryCache& cache_, std::shared_ptr<HostCounter> dependency, | 60 | HostCounter::HostCounter(QueryCache& cache_, std::shared_ptr<HostCounter> dependency_, |
| 63 | VideoCore::QueryType type_) | 61 | VideoCore::QueryType type_) |
| 64 | : HostCounterBase<QueryCache, HostCounter>{std::move(dependency)}, cache{cache_}, type{type_}, | 62 | : HostCounterBase{std::move(dependency_)}, cache{cache_}, type{type_}, query{ |
| 65 | query{cache.AllocateQuery(type)} { | 63 | cache.AllocateQuery( |
| 64 | type)} { | ||
| 66 | glBeginQuery(GetTarget(type), query.handle); | 65 | glBeginQuery(GetTarget(type), query.handle); |
| 67 | } | 66 | } |
| 68 | 67 | ||
| @@ -86,14 +85,14 @@ u64 HostCounter::BlockingQuery() const { | |||
| 86 | return static_cast<u64>(value); | 85 | return static_cast<u64>(value); |
| 87 | } | 86 | } |
| 88 | 87 | ||
| 89 | CachedQuery::CachedQuery(QueryCache& cache_, VideoCore::QueryType type_, VAddr cpu_addr, | 88 | CachedQuery::CachedQuery(QueryCache& cache_, VideoCore::QueryType type_, VAddr cpu_addr_, |
| 90 | u8* host_ptr) | 89 | u8* host_ptr_) |
| 91 | : CachedQueryBase<HostCounter>{cpu_addr, host_ptr}, cache{&cache_}, type{type_} {} | 90 | : CachedQueryBase{cpu_addr_, host_ptr_}, cache{&cache_}, type{type_} {} |
| 92 | 91 | ||
| 93 | CachedQuery::~CachedQuery() = default; | 92 | CachedQuery::~CachedQuery() = default; |
| 94 | 93 | ||
| 95 | CachedQuery::CachedQuery(CachedQuery&& rhs) noexcept | 94 | CachedQuery::CachedQuery(CachedQuery&& rhs) noexcept |
| 96 | : CachedQueryBase<HostCounter>(std::move(rhs)), cache{rhs.cache}, type{rhs.type} {} | 95 | : CachedQueryBase(std::move(rhs)), cache{rhs.cache}, type{rhs.type} {} |
| 97 | 96 | ||
| 98 | CachedQuery& CachedQuery::operator=(CachedQuery&& rhs) noexcept { | 97 | CachedQuery& CachedQuery::operator=(CachedQuery&& rhs) noexcept { |
| 99 | cache = rhs.cache; | 98 | cache = rhs.cache; |
diff --git a/src/video_core/renderer_opengl/gl_query_cache.h b/src/video_core/renderer_opengl/gl_query_cache.h index d9851e880..7bbe5cfe9 100644 --- a/src/video_core/renderer_opengl/gl_query_cache.h +++ b/src/video_core/renderer_opengl/gl_query_cache.h | |||
| @@ -29,8 +29,8 @@ using CounterStream = VideoCommon::CounterStreamBase<QueryCache, HostCounter>; | |||
| 29 | class QueryCache final | 29 | class QueryCache final |
| 30 | : public VideoCommon::QueryCacheBase<QueryCache, CachedQuery, CounterStream, HostCounter> { | 30 | : public VideoCommon::QueryCacheBase<QueryCache, CachedQuery, CounterStream, HostCounter> { |
| 31 | public: | 31 | public: |
| 32 | explicit QueryCache(RasterizerOpenGL& rasterizer, Tegra::Engines::Maxwell3D& maxwell3d, | 32 | explicit QueryCache(RasterizerOpenGL& rasterizer_, Tegra::Engines::Maxwell3D& maxwell3d_, |
| 33 | Tegra::MemoryManager& gpu_memory); | 33 | Tegra::MemoryManager& gpu_memory_); |
| 34 | ~QueryCache(); | 34 | ~QueryCache(); |
| 35 | 35 | ||
| 36 | OGLQuery AllocateQuery(VideoCore::QueryType type); | 36 | OGLQuery AllocateQuery(VideoCore::QueryType type); |
| @@ -46,7 +46,7 @@ private: | |||
| 46 | 46 | ||
| 47 | class HostCounter final : public VideoCommon::HostCounterBase<QueryCache, HostCounter> { | 47 | class HostCounter final : public VideoCommon::HostCounterBase<QueryCache, HostCounter> { |
| 48 | public: | 48 | public: |
| 49 | explicit HostCounter(QueryCache& cache_, std::shared_ptr<HostCounter> dependency, | 49 | explicit HostCounter(QueryCache& cache_, std::shared_ptr<HostCounter> dependency_, |
| 50 | VideoCore::QueryType type_); | 50 | VideoCore::QueryType type_); |
| 51 | ~HostCounter(); | 51 | ~HostCounter(); |
| 52 | 52 | ||
| @@ -62,8 +62,8 @@ private: | |||
| 62 | 62 | ||
| 63 | class CachedQuery final : public VideoCommon::CachedQueryBase<HostCounter> { | 63 | class CachedQuery final : public VideoCommon::CachedQueryBase<HostCounter> { |
| 64 | public: | 64 | public: |
| 65 | explicit CachedQuery(QueryCache& cache_, VideoCore::QueryType type_, VAddr cpu_addr, | 65 | explicit CachedQuery(QueryCache& cache_, VideoCore::QueryType type_, VAddr cpu_addr_, |
| 66 | u8* host_ptr); | 66 | u8* host_ptr_); |
| 67 | ~CachedQuery() override; | 67 | ~CachedQuery() override; |
| 68 | 68 | ||
| 69 | CachedQuery(CachedQuery&& rhs) noexcept; | 69 | CachedQuery(CachedQuery&& rhs) noexcept; |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index cfddbde5d..8572af5a5 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -149,19 +149,19 @@ void UpdateBindlessSSBOs(GLenum target, const BindlessSSBO* ssbos, size_t num_ss | |||
| 149 | 149 | ||
| 150 | } // Anonymous namespace | 150 | } // Anonymous namespace |
| 151 | 151 | ||
| 152 | RasterizerOpenGL::RasterizerOpenGL(Core::Frontend::EmuWindow& emu_window, Tegra::GPU& gpu_, | 152 | RasterizerOpenGL::RasterizerOpenGL(Core::Frontend::EmuWindow& emu_window_, Tegra::GPU& gpu_, |
| 153 | Core::Memory::Memory& cpu_memory, const Device& device_, | 153 | Core::Memory::Memory& cpu_memory_, const Device& device_, |
| 154 | ScreenInfo& screen_info_, ProgramManager& program_manager_, | 154 | ScreenInfo& screen_info_, ProgramManager& program_manager_, |
| 155 | StateTracker& state_tracker_) | 155 | StateTracker& state_tracker_) |
| 156 | : RasterizerAccelerated{cpu_memory}, gpu(gpu_), maxwell3d(gpu.Maxwell3D()), | 156 | : RasterizerAccelerated{cpu_memory_}, gpu(gpu_), maxwell3d(gpu.Maxwell3D()), |
| 157 | kepler_compute(gpu.KeplerCompute()), gpu_memory(gpu.MemoryManager()), device(device_), | 157 | kepler_compute(gpu.KeplerCompute()), gpu_memory(gpu.MemoryManager()), device(device_), |
| 158 | screen_info(screen_info_), program_manager(program_manager_), state_tracker(state_tracker_), | 158 | screen_info(screen_info_), program_manager(program_manager_), state_tracker(state_tracker_), |
| 159 | texture_cache(*this, maxwell3d, gpu_memory, device, state_tracker), | 159 | texture_cache(*this, maxwell3d, gpu_memory, device, state_tracker), |
| 160 | shader_cache(*this, emu_window, gpu, maxwell3d, kepler_compute, gpu_memory, device), | 160 | shader_cache(*this, emu_window_, gpu, maxwell3d, kepler_compute, gpu_memory, device), |
| 161 | query_cache(*this, maxwell3d, gpu_memory), | 161 | query_cache(*this, maxwell3d, gpu_memory), |
| 162 | buffer_cache(*this, gpu_memory, cpu_memory, device, STREAM_BUFFER_SIZE), | 162 | buffer_cache(*this, gpu_memory, cpu_memory_, device, STREAM_BUFFER_SIZE), |
| 163 | fence_manager(*this, gpu, texture_cache, buffer_cache, query_cache), | 163 | fence_manager(*this, gpu, texture_cache, buffer_cache, query_cache), |
| 164 | async_shaders(emu_window) { | 164 | async_shaders(emu_window_) { |
| 165 | CheckExtensions(); | 165 | CheckExtensions(); |
| 166 | 166 | ||
| 167 | unified_uniform_buffer.Create(); | 167 | unified_uniform_buffer.Create(); |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index 1d0f585fa..de28cff15 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h | |||
| @@ -62,10 +62,10 @@ static_assert(sizeof(BindlessSSBO) * CHAR_BIT == 128); | |||
| 62 | 62 | ||
| 63 | class RasterizerOpenGL : public VideoCore::RasterizerAccelerated { | 63 | class RasterizerOpenGL : public VideoCore::RasterizerAccelerated { |
| 64 | public: | 64 | public: |
| 65 | explicit RasterizerOpenGL(Core::Frontend::EmuWindow& emu_window, Tegra::GPU& gpu, | 65 | explicit RasterizerOpenGL(Core::Frontend::EmuWindow& emu_window_, Tegra::GPU& gpu_, |
| 66 | Core::Memory::Memory& cpu_memory, const Device& device, | 66 | Core::Memory::Memory& cpu_memory_, const Device& device_, |
| 67 | ScreenInfo& screen_info, ProgramManager& program_manager, | 67 | ScreenInfo& screen_info_, ProgramManager& program_manager_, |
| 68 | StateTracker& state_tracker); | 68 | StateTracker& state_tracker_); |
| 69 | ~RasterizerOpenGL() override; | 69 | ~RasterizerOpenGL() override; |
| 70 | 70 | ||
| 71 | void Draw(bool is_indexed, bool is_instanced) override; | 71 | void Draw(bool is_indexed, bool is_instanced) override; |
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 9f2c0a222..0b96481f5 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -318,14 +318,13 @@ std::unique_ptr<Shader> Shader::CreateFromCache(const ShaderParameters& params, | |||
| 318 | precompiled_shader.registry, precompiled_shader.entries, precompiled_shader.program)); | 318 | precompiled_shader.registry, precompiled_shader.entries, precompiled_shader.program)); |
| 319 | } | 319 | } |
| 320 | 320 | ||
| 321 | ShaderCacheOpenGL::ShaderCacheOpenGL(RasterizerOpenGL& rasterizer, | 321 | ShaderCacheOpenGL::ShaderCacheOpenGL(RasterizerOpenGL& rasterizer_, |
| 322 | Core::Frontend::EmuWindow& emu_window_, Tegra::GPU& gpu_, | 322 | Core::Frontend::EmuWindow& emu_window_, Tegra::GPU& gpu_, |
| 323 | Tegra::Engines::Maxwell3D& maxwell3d_, | 323 | Tegra::Engines::Maxwell3D& maxwell3d_, |
| 324 | Tegra::Engines::KeplerCompute& kepler_compute_, | 324 | Tegra::Engines::KeplerCompute& kepler_compute_, |
| 325 | Tegra::MemoryManager& gpu_memory_, const Device& device_) | 325 | Tegra::MemoryManager& gpu_memory_, const Device& device_) |
| 326 | : VideoCommon::ShaderCache<Shader>{rasterizer}, emu_window{emu_window_}, gpu{gpu_}, | 326 | : ShaderCache{rasterizer_}, emu_window{emu_window_}, gpu{gpu_}, gpu_memory{gpu_memory_}, |
| 327 | gpu_memory{gpu_memory_}, maxwell3d{maxwell3d_}, | 327 | maxwell3d{maxwell3d_}, kepler_compute{kepler_compute_}, device{device_} {} |
| 328 | kepler_compute{kepler_compute_}, device{device_} {} | ||
| 329 | 328 | ||
| 330 | ShaderCacheOpenGL::~ShaderCacheOpenGL() = default; | 329 | ShaderCacheOpenGL::~ShaderCacheOpenGL() = default; |
| 331 | 330 | ||
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.h b/src/video_core/renderer_opengl/gl_shader_cache.h index ab5374fac..2aed0697e 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_cache.h | |||
| @@ -119,10 +119,11 @@ private: | |||
| 119 | 119 | ||
| 120 | class ShaderCacheOpenGL final : public VideoCommon::ShaderCache<Shader> { | 120 | class ShaderCacheOpenGL final : public VideoCommon::ShaderCache<Shader> { |
| 121 | public: | 121 | public: |
| 122 | explicit ShaderCacheOpenGL(RasterizerOpenGL& rasterizer, Core::Frontend::EmuWindow& emu_window, | 122 | explicit ShaderCacheOpenGL(RasterizerOpenGL& rasterizer_, |
| 123 | Tegra::GPU& gpu, Tegra::Engines::Maxwell3D& maxwell3d, | 123 | Core::Frontend::EmuWindow& emu_window_, Tegra::GPU& gpu, |
| 124 | Tegra::Engines::KeplerCompute& kepler_compute, | 124 | Tegra::Engines::Maxwell3D& maxwell3d_, |
| 125 | Tegra::MemoryManager& gpu_memory, const Device& device); | 125 | Tegra::Engines::KeplerCompute& kepler_compute_, |
| 126 | Tegra::MemoryManager& gpu_memory_, const Device& device_); | ||
| 126 | ~ShaderCacheOpenGL() override; | 127 | ~ShaderCacheOpenGL() override; |
| 127 | 128 | ||
| 128 | /// Loads disk cache for the current game | 129 | /// Loads disk cache for the current game |
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.h b/src/video_core/renderer_opengl/gl_shader_decompiler.h index f5a5249f2..c4ff47875 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.h +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.h | |||
| @@ -25,8 +25,8 @@ using ImageEntry = VideoCommon::Shader::Image; | |||
| 25 | 25 | ||
| 26 | class ConstBufferEntry : public VideoCommon::Shader::ConstBuffer { | 26 | class ConstBufferEntry : public VideoCommon::Shader::ConstBuffer { |
| 27 | public: | 27 | public: |
| 28 | explicit ConstBufferEntry(u32 max_offset, bool is_indirect, u32 index_) | 28 | explicit ConstBufferEntry(u32 max_offset_, bool is_indirect_, u32 index_) |
| 29 | : ConstBuffer{max_offset, is_indirect}, index{index_} {} | 29 | : ConstBuffer{max_offset_, is_indirect_}, index{index_} {} |
| 30 | 30 | ||
| 31 | u32 GetIndex() const { | 31 | u32 GetIndex() const { |
| 32 | return index; | 32 | return index; |
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index a59fe853e..f19ef2173 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp | |||
| @@ -347,14 +347,14 @@ void CachedSurface::UploadTextureMipmap(u32 level, const std::vector<u8>& stagin | |||
| 347 | internal_format, image_size, buffer); | 347 | internal_format, image_size, buffer); |
| 348 | break; | 348 | break; |
| 349 | case SurfaceTarget::TextureCubemap: { | 349 | case SurfaceTarget::TextureCubemap: { |
| 350 | const std::size_t layer_size{params.GetHostLayerSize(level)}; | 350 | const std::size_t host_layer_size{params.GetHostLayerSize(level)}; |
| 351 | for (std::size_t face = 0; face < params.depth; ++face) { | 351 | for (std::size_t face = 0; face < params.depth; ++face) { |
| 352 | glCompressedTextureSubImage3D(texture.handle, level, 0, 0, static_cast<GLint>(face), | 352 | glCompressedTextureSubImage3D(texture.handle, level, 0, 0, static_cast<GLint>(face), |
| 353 | static_cast<GLsizei>(params.GetMipWidth(level)), | 353 | static_cast<GLsizei>(params.GetMipWidth(level)), |
| 354 | static_cast<GLsizei>(params.GetMipHeight(level)), 1, | 354 | static_cast<GLsizei>(params.GetMipHeight(level)), 1, |
| 355 | internal_format, static_cast<GLsizei>(layer_size), | 355 | internal_format, |
| 356 | buffer); | 356 | static_cast<GLsizei>(host_layer_size), buffer); |
| 357 | buffer += layer_size; | 357 | buffer += host_layer_size; |
| 358 | } | 358 | } |
| 359 | break; | 359 | break; |
| 360 | } | 360 | } |
| @@ -532,12 +532,12 @@ OGLTextureView CachedSurfaceView::CreateTextureView() const { | |||
| 532 | return texture_view; | 532 | return texture_view; |
| 533 | } | 533 | } |
| 534 | 534 | ||
| 535 | TextureCacheOpenGL::TextureCacheOpenGL(VideoCore::RasterizerInterface& rasterizer, | 535 | TextureCacheOpenGL::TextureCacheOpenGL(VideoCore::RasterizerInterface& rasterizer_, |
| 536 | Tegra::Engines::Maxwell3D& maxwell3d, | 536 | Tegra::Engines::Maxwell3D& maxwell3d_, |
| 537 | Tegra::MemoryManager& gpu_memory, const Device& device, | 537 | Tegra::MemoryManager& gpu_memory_, const Device& device_, |
| 538 | StateTracker& state_tracker_) | 538 | StateTracker& state_tracker_) |
| 539 | : TextureCacheBase{rasterizer, maxwell3d, gpu_memory, device.HasASTC()}, state_tracker{ | 539 | : TextureCacheBase{rasterizer_, maxwell3d_, gpu_memory_, device_.HasASTC()}, |
| 540 | state_tracker_} { | 540 | state_tracker{state_tracker_} { |
| 541 | src_framebuffer.Create(); | 541 | src_framebuffer.Create(); |
| 542 | dst_framebuffer.Create(); | 542 | dst_framebuffer.Create(); |
| 543 | } | 543 | } |
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h index 76a7b2316..72b284fab 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.h +++ b/src/video_core/renderer_opengl/gl_texture_cache.h | |||
| @@ -130,9 +130,9 @@ private: | |||
| 130 | 130 | ||
| 131 | class TextureCacheOpenGL final : public TextureCacheBase { | 131 | class TextureCacheOpenGL final : public TextureCacheBase { |
| 132 | public: | 132 | public: |
| 133 | explicit TextureCacheOpenGL(VideoCore::RasterizerInterface& rasterizer, | 133 | explicit TextureCacheOpenGL(VideoCore::RasterizerInterface& rasterizer_, |
| 134 | Tegra::Engines::Maxwell3D& maxwell3d, | 134 | Tegra::Engines::Maxwell3D& maxwell3d_, |
| 135 | Tegra::MemoryManager& gpu_memory, const Device& device, | 135 | Tegra::MemoryManager& gpu_memory_, const Device& device_, |
| 136 | StateTracker& state_tracker); | 136 | StateTracker& state_tracker); |
| 137 | ~TextureCacheOpenGL(); | 137 | ~TextureCacheOpenGL(); |
| 138 | 138 | ||
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 1523cd6fa..521b03ba2 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -130,8 +130,8 @@ void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum severit | |||
| 130 | RendererOpenGL::RendererOpenGL(Core::TelemetrySession& telemetry_session_, | 130 | RendererOpenGL::RendererOpenGL(Core::TelemetrySession& telemetry_session_, |
| 131 | Core::Frontend::EmuWindow& emu_window_, | 131 | Core::Frontend::EmuWindow& emu_window_, |
| 132 | Core::Memory::Memory& cpu_memory_, Tegra::GPU& gpu_, | 132 | Core::Memory::Memory& cpu_memory_, Tegra::GPU& gpu_, |
| 133 | std::unique_ptr<Core::Frontend::GraphicsContext> context) | 133 | std::unique_ptr<Core::Frontend::GraphicsContext> context_) |
| 134 | : RendererBase{emu_window_, std::move(context)}, telemetry_session{telemetry_session_}, | 134 | : RendererBase{emu_window_, std::move(context_)}, telemetry_session{telemetry_session_}, |
| 135 | emu_window{emu_window_}, cpu_memory{cpu_memory_}, gpu{gpu_}, program_manager{device} {} | 135 | emu_window{emu_window_}, cpu_memory{cpu_memory_}, gpu{gpu_}, program_manager{device} {} |
| 136 | 136 | ||
| 137 | RendererOpenGL::~RendererOpenGL() = default; | 137 | RendererOpenGL::~RendererOpenGL() = default; |
diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h index 9ef181f95..376f88766 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.h +++ b/src/video_core/renderer_opengl/renderer_opengl.h | |||
| @@ -57,10 +57,10 @@ struct ScreenInfo { | |||
| 57 | 57 | ||
| 58 | class RendererOpenGL final : public VideoCore::RendererBase { | 58 | class RendererOpenGL final : public VideoCore::RendererBase { |
| 59 | public: | 59 | public: |
| 60 | explicit RendererOpenGL(Core::TelemetrySession& telemetry_session, | 60 | explicit RendererOpenGL(Core::TelemetrySession& telemetry_session_, |
| 61 | Core::Frontend::EmuWindow& emu_window, Core::Memory::Memory& cpu_memory, | 61 | Core::Frontend::EmuWindow& emu_window_, |
| 62 | Tegra::GPU& gpu, | 62 | Core::Memory::Memory& cpu_memory_, Tegra::GPU& gpu_, |
| 63 | std::unique_ptr<Core::Frontend::GraphicsContext> context); | 63 | std::unique_ptr<Core::Frontend::GraphicsContext> context_); |
| 64 | ~RendererOpenGL() override; | 64 | ~RendererOpenGL() override; |
| 65 | 65 | ||
| 66 | bool Init() override; | 66 | bool Init() override; |
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index d9d3da9ea..444d3fb93 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp | |||
| @@ -38,13 +38,13 @@ std::unique_ptr<VKStreamBuffer> CreateStreamBuffer(const VKDevice& device, VKSch | |||
| 38 | } // Anonymous namespace | 38 | } // Anonymous namespace |
| 39 | 39 | ||
| 40 | Buffer::Buffer(const VKDevice& device, VKMemoryManager& memory_manager, VKScheduler& scheduler_, | 40 | Buffer::Buffer(const VKDevice& device, VKMemoryManager& memory_manager, VKScheduler& scheduler_, |
| 41 | VKStagingBufferPool& staging_pool_, VAddr cpu_addr, std::size_t size) | 41 | VKStagingBufferPool& staging_pool_, VAddr cpu_addr_, std::size_t size_) |
| 42 | : BufferBlock{cpu_addr, size}, scheduler{scheduler_}, staging_pool{staging_pool_} { | 42 | : BufferBlock{cpu_addr_, size_}, scheduler{scheduler_}, staging_pool{staging_pool_} { |
| 43 | const VkBufferCreateInfo ci{ | 43 | const VkBufferCreateInfo ci{ |
| 44 | .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, | 44 | .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, |
| 45 | .pNext = nullptr, | 45 | .pNext = nullptr, |
| 46 | .flags = 0, | 46 | .flags = 0, |
| 47 | .size = static_cast<VkDeviceSize>(size), | 47 | .size = static_cast<VkDeviceSize>(size_), |
| 48 | .usage = BUFFER_USAGE | VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT, | 48 | .usage = BUFFER_USAGE | VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT, |
| 49 | .sharingMode = VK_SHARING_MODE_EXCLUSIVE, | 49 | .sharingMode = VK_SHARING_MODE_EXCLUSIVE, |
| 50 | .queueFamilyIndexCount = 0, | 50 | .queueFamilyIndexCount = 0, |
| @@ -57,69 +57,71 @@ Buffer::Buffer(const VKDevice& device, VKMemoryManager& memory_manager, VKSchedu | |||
| 57 | 57 | ||
| 58 | Buffer::~Buffer() = default; | 58 | Buffer::~Buffer() = default; |
| 59 | 59 | ||
| 60 | void Buffer::Upload(std::size_t offset, std::size_t size, const u8* data) { | 60 | void Buffer::Upload(std::size_t offset, std::size_t data_size, const u8* data) { |
| 61 | const auto& staging = staging_pool.GetUnusedBuffer(size, true); | 61 | const auto& staging = staging_pool.GetUnusedBuffer(data_size, true); |
| 62 | std::memcpy(staging.commit->Map(size), data, size); | 62 | std::memcpy(staging.commit->Map(data_size), data, data_size); |
| 63 | 63 | ||
| 64 | scheduler.RequestOutsideRenderPassOperationContext(); | 64 | scheduler.RequestOutsideRenderPassOperationContext(); |
| 65 | 65 | ||
| 66 | const VkBuffer handle = Handle(); | 66 | const VkBuffer handle = Handle(); |
| 67 | scheduler.Record([staging = *staging.handle, handle, offset, size](vk::CommandBuffer cmdbuf) { | 67 | scheduler.Record( |
| 68 | cmdbuf.CopyBuffer(staging, handle, VkBufferCopy{0, offset, size}); | 68 | [staging = *staging.handle, handle, offset, data_size](vk::CommandBuffer cmdbuf) { |
| 69 | 69 | cmdbuf.CopyBuffer(staging, handle, VkBufferCopy{0, offset, data_size}); | |
| 70 | const VkBufferMemoryBarrier barrier{ | 70 | |
| 71 | .sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, | 71 | const VkBufferMemoryBarrier barrier{ |
| 72 | .pNext = nullptr, | 72 | .sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, |
| 73 | .srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT, | 73 | .pNext = nullptr, |
| 74 | .dstAccessMask = UPLOAD_ACCESS_BARRIERS, | 74 | .srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT, |
| 75 | .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, | 75 | .dstAccessMask = UPLOAD_ACCESS_BARRIERS, |
| 76 | .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, | 76 | .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, |
| 77 | .buffer = handle, | 77 | .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, |
| 78 | .offset = offset, | 78 | .buffer = handle, |
| 79 | .size = size, | 79 | .offset = offset, |
| 80 | }; | 80 | .size = data_size, |
| 81 | cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, UPLOAD_PIPELINE_STAGE, 0, {}, | 81 | }; |
| 82 | barrier, {}); | 82 | cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, UPLOAD_PIPELINE_STAGE, 0, {}, |
| 83 | }); | 83 | barrier, {}); |
| 84 | }); | ||
| 84 | } | 85 | } |
| 85 | 86 | ||
| 86 | void Buffer::Download(std::size_t offset, std::size_t size, u8* data) { | 87 | void Buffer::Download(std::size_t offset, std::size_t data_size, u8* data) { |
| 87 | const auto& staging = staging_pool.GetUnusedBuffer(size, true); | 88 | const auto& staging = staging_pool.GetUnusedBuffer(data_size, true); |
| 88 | scheduler.RequestOutsideRenderPassOperationContext(); | 89 | scheduler.RequestOutsideRenderPassOperationContext(); |
| 89 | 90 | ||
| 90 | const VkBuffer handle = Handle(); | 91 | const VkBuffer handle = Handle(); |
| 91 | scheduler.Record([staging = *staging.handle, handle, offset, size](vk::CommandBuffer cmdbuf) { | 92 | scheduler.Record( |
| 92 | const VkBufferMemoryBarrier barrier{ | 93 | [staging = *staging.handle, handle, offset, data_size](vk::CommandBuffer cmdbuf) { |
| 93 | .sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, | 94 | const VkBufferMemoryBarrier barrier{ |
| 94 | .pNext = nullptr, | 95 | .sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, |
| 95 | .srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT, | 96 | .pNext = nullptr, |
| 96 | .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT, | 97 | .srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT, |
| 97 | .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, | 98 | .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT, |
| 98 | .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, | 99 | .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, |
| 99 | .buffer = handle, | 100 | .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, |
| 100 | .offset = offset, | 101 | .buffer = handle, |
| 101 | .size = size, | 102 | .offset = offset, |
| 102 | }; | 103 | .size = data_size, |
| 103 | 104 | }; | |
| 104 | cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | | 105 | |
| 105 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | | 106 | cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | |
| 106 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, | 107 | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | |
| 107 | VK_PIPELINE_STAGE_TRANSFER_BIT, 0, {}, barrier, {}); | 108 | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, |
| 108 | cmdbuf.CopyBuffer(handle, staging, VkBufferCopy{offset, 0, size}); | 109 | VK_PIPELINE_STAGE_TRANSFER_BIT, 0, {}, barrier, {}); |
| 109 | }); | 110 | cmdbuf.CopyBuffer(handle, staging, VkBufferCopy{offset, 0, data_size}); |
| 111 | }); | ||
| 110 | scheduler.Finish(); | 112 | scheduler.Finish(); |
| 111 | 113 | ||
| 112 | std::memcpy(data, staging.commit->Map(size), size); | 114 | std::memcpy(data, staging.commit->Map(data_size), data_size); |
| 113 | } | 115 | } |
| 114 | 116 | ||
| 115 | void Buffer::CopyFrom(const Buffer& src, std::size_t src_offset, std::size_t dst_offset, | 117 | void Buffer::CopyFrom(const Buffer& src, std::size_t src_offset, std::size_t dst_offset, |
| 116 | std::size_t size) { | 118 | std::size_t copy_size) { |
| 117 | scheduler.RequestOutsideRenderPassOperationContext(); | 119 | scheduler.RequestOutsideRenderPassOperationContext(); |
| 118 | 120 | ||
| 119 | const VkBuffer dst_buffer = Handle(); | 121 | const VkBuffer dst_buffer = Handle(); |
| 120 | scheduler.Record([src_buffer = src.Handle(), dst_buffer, src_offset, dst_offset, | 122 | scheduler.Record([src_buffer = src.Handle(), dst_buffer, src_offset, dst_offset, |
| 121 | size](vk::CommandBuffer cmdbuf) { | 123 | copy_size](vk::CommandBuffer cmdbuf) { |
| 122 | cmdbuf.CopyBuffer(src_buffer, dst_buffer, VkBufferCopy{src_offset, dst_offset, size}); | 124 | cmdbuf.CopyBuffer(src_buffer, dst_buffer, VkBufferCopy{src_offset, dst_offset, copy_size}); |
| 123 | 125 | ||
| 124 | std::array<VkBufferMemoryBarrier, 2> barriers; | 126 | std::array<VkBufferMemoryBarrier, 2> barriers; |
| 125 | barriers[0].sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER; | 127 | barriers[0].sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER; |
| @@ -130,7 +132,7 @@ void Buffer::CopyFrom(const Buffer& src, std::size_t src_offset, std::size_t dst | |||
| 130 | barriers[0].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; | 132 | barriers[0].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; |
| 131 | barriers[0].buffer = src_buffer; | 133 | barriers[0].buffer = src_buffer; |
| 132 | barriers[0].offset = src_offset; | 134 | barriers[0].offset = src_offset; |
| 133 | barriers[0].size = size; | 135 | barriers[0].size = copy_size; |
| 134 | barriers[1].sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER; | 136 | barriers[1].sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER; |
| 135 | barriers[1].pNext = nullptr; | 137 | barriers[1].pNext = nullptr; |
| 136 | barriers[1].srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; | 138 | barriers[1].srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; |
| @@ -139,19 +141,17 @@ void Buffer::CopyFrom(const Buffer& src, std::size_t src_offset, std::size_t dst | |||
| 139 | barriers[1].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; | 141 | barriers[1].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; |
| 140 | barriers[1].buffer = dst_buffer; | 142 | barriers[1].buffer = dst_buffer; |
| 141 | barriers[1].offset = dst_offset; | 143 | barriers[1].offset = dst_offset; |
| 142 | barriers[1].size = size; | 144 | barriers[1].size = copy_size; |
| 143 | cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, UPLOAD_PIPELINE_STAGE, 0, {}, | 145 | cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, UPLOAD_PIPELINE_STAGE, 0, {}, |
| 144 | barriers, {}); | 146 | barriers, {}); |
| 145 | }); | 147 | }); |
| 146 | } | 148 | } |
| 147 | 149 | ||
| 148 | VKBufferCache::VKBufferCache(VideoCore::RasterizerInterface& rasterizer, | 150 | VKBufferCache::VKBufferCache(VideoCore::RasterizerInterface& rasterizer_, |
| 149 | Tegra::MemoryManager& gpu_memory, Core::Memory::Memory& cpu_memory, | 151 | Tegra::MemoryManager& gpu_memory_, Core::Memory::Memory& cpu_memory_, |
| 150 | const VKDevice& device_, VKMemoryManager& memory_manager_, | 152 | const VKDevice& device_, VKMemoryManager& memory_manager_, |
| 151 | VKScheduler& scheduler_, VKStagingBufferPool& staging_pool_) | 153 | VKScheduler& scheduler_, VKStagingBufferPool& staging_pool_) |
| 152 | : VideoCommon::BufferCache<Buffer, VkBuffer, VKStreamBuffer>{rasterizer, gpu_memory, cpu_memory, | 154 | : BufferCache{rasterizer_, gpu_memory_, cpu_memory_, CreateStreamBuffer(device_, scheduler_)}, |
| 153 | CreateStreamBuffer(device_, | ||
| 154 | scheduler_)}, | ||
| 155 | device{device_}, memory_manager{memory_manager_}, scheduler{scheduler_}, staging_pool{ | 155 | device{device_}, memory_manager{memory_manager_}, scheduler{scheduler_}, staging_pool{ |
| 156 | staging_pool_} {} | 156 | staging_pool_} {} |
| 157 | 157 | ||
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.h b/src/video_core/renderer_vulkan/vk_buffer_cache.h index 7fb5ceedf..6008b8373 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.h +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.h | |||
| @@ -22,15 +22,15 @@ class VKScheduler; | |||
| 22 | class Buffer final : public VideoCommon::BufferBlock { | 22 | class Buffer final : public VideoCommon::BufferBlock { |
| 23 | public: | 23 | public: |
| 24 | explicit Buffer(const VKDevice& device, VKMemoryManager& memory_manager, VKScheduler& scheduler, | 24 | explicit Buffer(const VKDevice& device, VKMemoryManager& memory_manager, VKScheduler& scheduler, |
| 25 | VKStagingBufferPool& staging_pool, VAddr cpu_addr, std::size_t size); | 25 | VKStagingBufferPool& staging_pool, VAddr cpu_addr_, std::size_t size_); |
| 26 | ~Buffer(); | 26 | ~Buffer(); |
| 27 | 27 | ||
| 28 | void Upload(std::size_t offset, std::size_t size, const u8* data); | 28 | void Upload(std::size_t offset, std::size_t data_size, const u8* data); |
| 29 | 29 | ||
| 30 | void Download(std::size_t offset, std::size_t size, u8* data); | 30 | void Download(std::size_t offset, std::size_t data_size, u8* data); |
| 31 | 31 | ||
| 32 | void CopyFrom(const Buffer& src, std::size_t src_offset, std::size_t dst_offset, | 32 | void CopyFrom(const Buffer& src, std::size_t src_offset, std::size_t dst_offset, |
| 33 | std::size_t size); | 33 | std::size_t copy_size); |
| 34 | 34 | ||
| 35 | VkBuffer Handle() const { | 35 | VkBuffer Handle() const { |
| 36 | return *buffer.handle; | 36 | return *buffer.handle; |
| @@ -49,10 +49,10 @@ private: | |||
| 49 | 49 | ||
| 50 | class VKBufferCache final : public VideoCommon::BufferCache<Buffer, VkBuffer, VKStreamBuffer> { | 50 | class VKBufferCache final : public VideoCommon::BufferCache<Buffer, VkBuffer, VKStreamBuffer> { |
| 51 | public: | 51 | public: |
| 52 | explicit VKBufferCache(VideoCore::RasterizerInterface& rasterizer, | 52 | explicit VKBufferCache(VideoCore::RasterizerInterface& rasterizer_, |
| 53 | Tegra::MemoryManager& gpu_memory, Core::Memory::Memory& cpu_memory, | 53 | Tegra::MemoryManager& gpu_memory_, Core::Memory::Memory& cpu_memory_, |
| 54 | const VKDevice& device, VKMemoryManager& memory_manager, | 54 | const VKDevice& device_, VKMemoryManager& memory_manager_, |
| 55 | VKScheduler& scheduler, VKStagingBufferPool& staging_pool); | 55 | VKScheduler& scheduler_, VKStagingBufferPool& staging_pool_); |
| 56 | ~VKBufferCache(); | 56 | ~VKBufferCache(); |
| 57 | 57 | ||
| 58 | BufferInfo GetEmptyBuffer(std::size_t size) override; | 58 | BufferInfo GetEmptyBuffer(std::size_t size) override; |
diff --git a/src/video_core/renderer_vulkan/vk_command_pool.cpp b/src/video_core/renderer_vulkan/vk_command_pool.cpp index 256a39148..8f7d6410e 100644 --- a/src/video_core/renderer_vulkan/vk_command_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_command_pool.cpp | |||
| @@ -17,8 +17,8 @@ struct CommandPool::Pool { | |||
| 17 | vk::CommandBuffers cmdbufs; | 17 | vk::CommandBuffers cmdbufs; |
| 18 | }; | 18 | }; |
| 19 | 19 | ||
| 20 | CommandPool::CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device_) | 20 | CommandPool::CommandPool(MasterSemaphore& master_semaphore_, const VKDevice& device_) |
| 21 | : ResourcePool(master_semaphore, COMMAND_BUFFER_POOL_SIZE), device{device_} {} | 21 | : ResourcePool(master_semaphore_, COMMAND_BUFFER_POOL_SIZE), device{device_} {} |
| 22 | 22 | ||
| 23 | CommandPool::~CommandPool() = default; | 23 | CommandPool::~CommandPool() = default; |
| 24 | 24 | ||
diff --git a/src/video_core/renderer_vulkan/vk_command_pool.h b/src/video_core/renderer_vulkan/vk_command_pool.h index 33655eca4..62a7ce3f1 100644 --- a/src/video_core/renderer_vulkan/vk_command_pool.h +++ b/src/video_core/renderer_vulkan/vk_command_pool.h | |||
| @@ -17,7 +17,7 @@ class VKDevice; | |||
| 17 | 17 | ||
| 18 | class CommandPool final : public ResourcePool { | 18 | class CommandPool final : public ResourcePool { |
| 19 | public: | 19 | public: |
| 20 | explicit CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device_); | 20 | explicit CommandPool(MasterSemaphore& master_semaphore_, const VKDevice& device_); |
| 21 | ~CommandPool() override; | 21 | ~CommandPool() override; |
| 22 | 22 | ||
| 23 | void Allocate(size_t begin, size_t end) override; | 23 | void Allocate(size_t begin, size_t end) override; |
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index df7e8c864..39e58a56f 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | |||
| @@ -136,26 +136,25 @@ bool ComputePipelineCacheKey::operator==(const ComputePipelineCacheKey& rhs) con | |||
| 136 | return std::memcmp(&rhs, this, sizeof *this) == 0; | 136 | return std::memcmp(&rhs, this, sizeof *this) == 0; |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | Shader::Shader(Tegra::Engines::ConstBufferEngineInterface& engine, Tegra::Engines::ShaderType stage, | 139 | Shader::Shader(Tegra::Engines::ConstBufferEngineInterface& engine_, ShaderType stage_, |
| 140 | GPUVAddr gpu_addr_, VAddr cpu_addr, VideoCommon::Shader::ProgramCode program_code_, | 140 | GPUVAddr gpu_addr_, VAddr cpu_addr_, ProgramCode program_code_, u32 main_offset_) |
| 141 | u32 main_offset) | 141 | : gpu_addr(gpu_addr_), program_code(std::move(program_code_)), registry(stage_, engine_), |
| 142 | : gpu_addr(gpu_addr_), program_code(std::move(program_code_)), registry(stage, engine), | 142 | shader_ir(program_code, main_offset_, compiler_settings, registry), |
| 143 | shader_ir(program_code, main_offset, compiler_settings, registry), | ||
| 144 | entries(GenerateShaderEntries(shader_ir)) {} | 143 | entries(GenerateShaderEntries(shader_ir)) {} |
| 145 | 144 | ||
| 146 | Shader::~Shader() = default; | 145 | Shader::~Shader() = default; |
| 147 | 146 | ||
| 148 | VKPipelineCache::VKPipelineCache(RasterizerVulkan& rasterizer, Tegra::GPU& gpu_, | 147 | VKPipelineCache::VKPipelineCache(RasterizerVulkan& rasterizer_, Tegra::GPU& gpu_, |
| 149 | Tegra::Engines::Maxwell3D& maxwell3d_, | 148 | Tegra::Engines::Maxwell3D& maxwell3d_, |
| 150 | Tegra::Engines::KeplerCompute& kepler_compute_, | 149 | Tegra::Engines::KeplerCompute& kepler_compute_, |
| 151 | Tegra::MemoryManager& gpu_memory_, const VKDevice& device_, | 150 | Tegra::MemoryManager& gpu_memory_, const VKDevice& device_, |
| 152 | VKScheduler& scheduler_, VKDescriptorPool& descriptor_pool_, | 151 | VKScheduler& scheduler_, VKDescriptorPool& descriptor_pool_, |
| 153 | VKUpdateDescriptorQueue& update_descriptor_queue_, | 152 | VKUpdateDescriptorQueue& update_descriptor_queue_, |
| 154 | VKRenderPassCache& renderpass_cache_) | 153 | VKRenderPassCache& renderpass_cache_) |
| 155 | : VideoCommon::ShaderCache<Shader>{rasterizer}, gpu{gpu_}, maxwell3d{maxwell3d_}, | 154 | : ShaderCache{rasterizer_}, gpu{gpu_}, maxwell3d{maxwell3d_}, kepler_compute{kepler_compute_}, |
| 156 | kepler_compute{kepler_compute_}, gpu_memory{gpu_memory_}, device{device_}, | 155 | gpu_memory{gpu_memory_}, device{device_}, scheduler{scheduler_}, |
| 157 | scheduler{scheduler_}, descriptor_pool{descriptor_pool_}, | 156 | descriptor_pool{descriptor_pool_}, update_descriptor_queue{update_descriptor_queue_}, |
| 158 | update_descriptor_queue{update_descriptor_queue_}, renderpass_cache{renderpass_cache_} {} | 157 | renderpass_cache{renderpass_cache_} {} |
| 159 | 158 | ||
| 160 | VKPipelineCache::~VKPipelineCache() = default; | 159 | VKPipelineCache::~VKPipelineCache() = default; |
| 161 | 160 | ||
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.h b/src/video_core/renderer_vulkan/vk_pipeline_cache.h index e558e6658..9e1f8fcbb 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.h +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.h | |||
| @@ -84,9 +84,9 @@ namespace Vulkan { | |||
| 84 | 84 | ||
| 85 | class Shader { | 85 | class Shader { |
| 86 | public: | 86 | public: |
| 87 | explicit Shader(Tegra::Engines::ConstBufferEngineInterface& engine, | 87 | explicit Shader(Tegra::Engines::ConstBufferEngineInterface& engine_, |
| 88 | Tegra::Engines::ShaderType stage, GPUVAddr gpu_addr, VAddr cpu_addr, | 88 | Tegra::Engines::ShaderType stage_, GPUVAddr gpu_addr, VAddr cpu_addr_, |
| 89 | VideoCommon::Shader::ProgramCode program_code, u32 main_offset); | 89 | VideoCommon::Shader::ProgramCode program_code, u32 main_offset_); |
| 90 | ~Shader(); | 90 | ~Shader(); |
| 91 | 91 | ||
| 92 | GPUVAddr GetGpuAddr() const { | 92 | GPUVAddr GetGpuAddr() const { |
| @@ -119,13 +119,13 @@ private: | |||
| 119 | 119 | ||
| 120 | class VKPipelineCache final : public VideoCommon::ShaderCache<Shader> { | 120 | class VKPipelineCache final : public VideoCommon::ShaderCache<Shader> { |
| 121 | public: | 121 | public: |
| 122 | explicit VKPipelineCache(RasterizerVulkan& rasterizer, Tegra::GPU& gpu, | 122 | explicit VKPipelineCache(RasterizerVulkan& rasterizer_, Tegra::GPU& gpu_, |
| 123 | Tegra::Engines::Maxwell3D& maxwell3d, | 123 | Tegra::Engines::Maxwell3D& maxwell3d_, |
| 124 | Tegra::Engines::KeplerCompute& kepler_compute, | 124 | Tegra::Engines::KeplerCompute& kepler_compute_, |
| 125 | Tegra::MemoryManager& gpu_memory, const VKDevice& device, | 125 | Tegra::MemoryManager& gpu_memory_, const VKDevice& device_, |
| 126 | VKScheduler& scheduler, VKDescriptorPool& descriptor_pool, | 126 | VKScheduler& scheduler_, VKDescriptorPool& descriptor_pool_, |
| 127 | VKUpdateDescriptorQueue& update_descriptor_queue, | 127 | VKUpdateDescriptorQueue& update_descriptor_queue_, |
| 128 | VKRenderPassCache& renderpass_cache); | 128 | VKRenderPassCache& renderpass_cache_); |
| 129 | ~VKPipelineCache() override; | 129 | ~VKPipelineCache() override; |
| 130 | 130 | ||
| 131 | std::array<Shader*, Maxwell::MaxShaderProgram> GetShaders(); | 131 | std::array<Shader*, Maxwell::MaxShaderProgram> GetShaders(); |
diff --git a/src/video_core/renderer_vulkan/vk_query_cache.cpp b/src/video_core/renderer_vulkan/vk_query_cache.cpp index 6fa071737..038760de3 100644 --- a/src/video_core/renderer_vulkan/vk_query_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_query_cache.cpp | |||
| @@ -69,12 +69,10 @@ void QueryPool::Reserve(std::pair<VkQueryPool, u32> query) { | |||
| 69 | VKQueryCache::VKQueryCache(VideoCore::RasterizerInterface& rasterizer_, | 69 | VKQueryCache::VKQueryCache(VideoCore::RasterizerInterface& rasterizer_, |
| 70 | Tegra::Engines::Maxwell3D& maxwell3d_, Tegra::MemoryManager& gpu_memory_, | 70 | Tegra::Engines::Maxwell3D& maxwell3d_, Tegra::MemoryManager& gpu_memory_, |
| 71 | const VKDevice& device_, VKScheduler& scheduler_) | 71 | const VKDevice& device_, VKScheduler& scheduler_) |
| 72 | : QueryCacheBase<VKQueryCache, CachedQuery, CounterStream, HostCounter>{rasterizer_, maxwell3d_, | 72 | : QueryCacheBase{rasterizer_, maxwell3d_, gpu_memory_}, device{device_}, scheduler{scheduler_}, |
| 73 | gpu_memory_}, | 73 | query_pools{ |
| 74 | device{device_}, scheduler{scheduler_}, query_pools{ | 74 | QueryPool{device_, scheduler_, QueryType::SamplesPassed}, |
| 75 | QueryPool{device_, scheduler_, | 75 | } {} |
| 76 | QueryType::SamplesPassed}, | ||
| 77 | } {} | ||
| 78 | 76 | ||
| 79 | VKQueryCache::~VKQueryCache() { | 77 | VKQueryCache::~VKQueryCache() { |
| 80 | // TODO(Rodrigo): This is a hack to destroy all HostCounter instances before the base class | 78 | // TODO(Rodrigo): This is a hack to destroy all HostCounter instances before the base class |
| @@ -97,8 +95,8 @@ void VKQueryCache::Reserve(QueryType type, std::pair<VkQueryPool, u32> query) { | |||
| 97 | 95 | ||
| 98 | HostCounter::HostCounter(VKQueryCache& cache_, std::shared_ptr<HostCounter> dependency_, | 96 | HostCounter::HostCounter(VKQueryCache& cache_, std::shared_ptr<HostCounter> dependency_, |
| 99 | QueryType type_) | 97 | QueryType type_) |
| 100 | : HostCounterBase<VKQueryCache, HostCounter>{std::move(dependency_)}, cache{cache_}, | 98 | : HostCounterBase{std::move(dependency_)}, cache{cache_}, type{type_}, |
| 101 | type{type_}, query{cache_.AllocateQuery(type_)}, tick{cache_.Scheduler().CurrentTick()} { | 99 | query{cache_.AllocateQuery(type_)}, tick{cache_.Scheduler().CurrentTick()} { |
| 102 | const vk::Device* logical = &cache_.Device().GetLogical(); | 100 | const vk::Device* logical = &cache_.Device().GetLogical(); |
| 103 | cache_.Scheduler().Record([logical, query = query](vk::CommandBuffer cmdbuf) { | 101 | cache_.Scheduler().Record([logical, query = query](vk::CommandBuffer cmdbuf) { |
| 104 | logical->ResetQueryPoolEXT(query.first, query.second, 1); | 102 | logical->ResetQueryPoolEXT(query.first, query.second, 1); |
| @@ -119,18 +117,20 @@ u64 HostCounter::BlockingQuery() const { | |||
| 119 | if (tick >= cache.Scheduler().CurrentTick()) { | 117 | if (tick >= cache.Scheduler().CurrentTick()) { |
| 120 | cache.Scheduler().Flush(); | 118 | cache.Scheduler().Flush(); |
| 121 | } | 119 | } |
| 120 | |||
| 122 | u64 data; | 121 | u64 data; |
| 123 | const VkResult result = cache.Device().GetLogical().GetQueryResults( | 122 | const VkResult query_result = cache.Device().GetLogical().GetQueryResults( |
| 124 | query.first, query.second, 1, sizeof(data), &data, sizeof(data), | 123 | query.first, query.second, 1, sizeof(data), &data, sizeof(data), |
| 125 | VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT); | 124 | VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT); |
| 126 | switch (result) { | 125 | |
| 126 | switch (query_result) { | ||
| 127 | case VK_SUCCESS: | 127 | case VK_SUCCESS: |
| 128 | return data; | 128 | return data; |
| 129 | case VK_ERROR_DEVICE_LOST: | 129 | case VK_ERROR_DEVICE_LOST: |
| 130 | cache.Device().ReportLoss(); | 130 | cache.Device().ReportLoss(); |
| 131 | [[fallthrough]]; | 131 | [[fallthrough]]; |
| 132 | default: | 132 | default: |
| 133 | throw vk::Exception(result); | 133 | throw vk::Exception(query_result); |
| 134 | } | 134 | } |
| 135 | } | 135 | } |
| 136 | 136 | ||
diff --git a/src/video_core/renderer_vulkan/vk_query_cache.h b/src/video_core/renderer_vulkan/vk_query_cache.h index 201fca888..837fe9ebf 100644 --- a/src/video_core/renderer_vulkan/vk_query_cache.h +++ b/src/video_core/renderer_vulkan/vk_query_cache.h | |||
| @@ -95,8 +95,8 @@ private: | |||
| 95 | 95 | ||
| 96 | class CachedQuery : public VideoCommon::CachedQueryBase<HostCounter> { | 96 | class CachedQuery : public VideoCommon::CachedQueryBase<HostCounter> { |
| 97 | public: | 97 | public: |
| 98 | explicit CachedQuery(VKQueryCache&, VideoCore::QueryType, VAddr cpu_addr, u8* host_ptr) | 98 | explicit CachedQuery(VKQueryCache&, VideoCore::QueryType, VAddr cpu_addr_, u8* host_ptr_) |
| 99 | : VideoCommon::CachedQueryBase<HostCounter>{cpu_addr, host_ptr} {} | 99 | : CachedQueryBase{cpu_addr_, host_ptr_} {} |
| 100 | }; | 100 | }; |
| 101 | 101 | ||
| 102 | } // namespace Vulkan | 102 | } // namespace Vulkan |
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 560386081..f93986aab 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp | |||
| @@ -128,12 +128,12 @@ Tegra::Texture::FullTextureInfo GetTextureInfo(const Engine& engine, const Entry | |||
| 128 | const u32 offset_2 = entry.secondary_offset; | 128 | const u32 offset_2 = entry.secondary_offset; |
| 129 | const u32 handle_1 = engine.AccessConstBuffer32(stage_type, buffer_1, offset_1); | 129 | const u32 handle_1 = engine.AccessConstBuffer32(stage_type, buffer_1, offset_1); |
| 130 | const u32 handle_2 = engine.AccessConstBuffer32(stage_type, buffer_2, offset_2); | 130 | const u32 handle_2 = engine.AccessConstBuffer32(stage_type, buffer_2, offset_2); |
| 131 | return engine.GetTextureInfo(handle_1 | handle_2); | 131 | return engine.GetTextureInfo(Tegra::Texture::TextureHandle{handle_1 | handle_2}); |
| 132 | } | 132 | } |
| 133 | } | 133 | } |
| 134 | if (entry.is_bindless) { | 134 | if (entry.is_bindless) { |
| 135 | const auto tex_handle = engine.AccessConstBuffer32(stage_type, entry.buffer, entry.offset); | 135 | const auto tex_handle = engine.AccessConstBuffer32(stage_type, entry.buffer, entry.offset); |
| 136 | return engine.GetTextureInfo(tex_handle); | 136 | return engine.GetTextureInfo(Tegra::Texture::TextureHandle{tex_handle}); |
| 137 | } | 137 | } |
| 138 | const auto& gpu_profile = engine.AccessGuestDriverProfile(); | 138 | const auto& gpu_profile = engine.AccessGuestDriverProfile(); |
| 139 | const u32 entry_offset = static_cast<u32>(index * gpu_profile.GetTextureHandlerSize()); | 139 | const u32 entry_offset = static_cast<u32>(index * gpu_profile.GetTextureHandlerSize()); |
| @@ -380,12 +380,12 @@ void RasterizerVulkan::DrawParameters::Draw(vk::CommandBuffer cmdbuf) const { | |||
| 380 | } | 380 | } |
| 381 | } | 381 | } |
| 382 | 382 | ||
| 383 | RasterizerVulkan::RasterizerVulkan(Core::Frontend::EmuWindow& emu_window, Tegra::GPU& gpu_, | 383 | RasterizerVulkan::RasterizerVulkan(Core::Frontend::EmuWindow& emu_window_, Tegra::GPU& gpu_, |
| 384 | Tegra::MemoryManager& gpu_memory_, | 384 | Tegra::MemoryManager& gpu_memory_, |
| 385 | Core::Memory::Memory& cpu_memory, VKScreenInfo& screen_info_, | 385 | Core::Memory::Memory& cpu_memory_, VKScreenInfo& screen_info_, |
| 386 | const VKDevice& device_, VKMemoryManager& memory_manager_, | 386 | const VKDevice& device_, VKMemoryManager& memory_manager_, |
| 387 | StateTracker& state_tracker_, VKScheduler& scheduler_) | 387 | StateTracker& state_tracker_, VKScheduler& scheduler_) |
| 388 | : RasterizerAccelerated(cpu_memory), gpu(gpu_), gpu_memory(gpu_memory_), | 388 | : RasterizerAccelerated(cpu_memory_), gpu(gpu_), gpu_memory(gpu_memory_), |
| 389 | maxwell3d(gpu.Maxwell3D()), kepler_compute(gpu.KeplerCompute()), screen_info(screen_info_), | 389 | maxwell3d(gpu.Maxwell3D()), kepler_compute(gpu.KeplerCompute()), screen_info(screen_info_), |
| 390 | device(device_), memory_manager(memory_manager_), state_tracker(state_tracker_), | 390 | device(device_), memory_manager(memory_manager_), state_tracker(state_tracker_), |
| 391 | scheduler(scheduler_), staging_pool(device, memory_manager, scheduler), | 391 | scheduler(scheduler_), staging_pool(device, memory_manager, scheduler), |
| @@ -397,11 +397,11 @@ RasterizerVulkan::RasterizerVulkan(Core::Frontend::EmuWindow& emu_window, Tegra: | |||
| 397 | texture_cache(*this, maxwell3d, gpu_memory, device, memory_manager, scheduler, staging_pool), | 397 | texture_cache(*this, maxwell3d, gpu_memory, device, memory_manager, scheduler, staging_pool), |
| 398 | pipeline_cache(*this, gpu, maxwell3d, kepler_compute, gpu_memory, device, scheduler, | 398 | pipeline_cache(*this, gpu, maxwell3d, kepler_compute, gpu_memory, device, scheduler, |
| 399 | descriptor_pool, update_descriptor_queue, renderpass_cache), | 399 | descriptor_pool, update_descriptor_queue, renderpass_cache), |
| 400 | buffer_cache(*this, gpu_memory, cpu_memory, device, memory_manager, scheduler, staging_pool), | 400 | buffer_cache(*this, gpu_memory, cpu_memory_, device, memory_manager, scheduler, staging_pool), |
| 401 | sampler_cache(device), query_cache(*this, maxwell3d, gpu_memory, device, scheduler), | 401 | sampler_cache(device), query_cache(*this, maxwell3d, gpu_memory, device, scheduler), |
| 402 | fence_manager(*this, gpu, gpu_memory, texture_cache, buffer_cache, query_cache, device, | 402 | fence_manager(*this, gpu, gpu_memory, texture_cache, buffer_cache, query_cache, device, |
| 403 | scheduler), | 403 | scheduler), |
| 404 | wfi_event(device.GetLogical().CreateEvent()), async_shaders(emu_window) { | 404 | wfi_event(device.GetLogical().CreateEvent()), async_shaders(emu_window_) { |
| 405 | scheduler.SetQueryCache(query_cache); | 405 | scheduler.SetQueryCache(query_cache); |
| 406 | if (device.UseAsynchronousShaders()) { | 406 | if (device.UseAsynchronousShaders()) { |
| 407 | async_shaders.AllocateWorkers(); | 407 | async_shaders.AllocateWorkers(); |
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.h b/src/video_core/renderer_vulkan/vk_rasterizer.h index 1789fb285..30ec58eb4 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.h +++ b/src/video_core/renderer_vulkan/vk_rasterizer.h | |||
| @@ -105,11 +105,11 @@ struct ImageView { | |||
| 105 | 105 | ||
| 106 | class RasterizerVulkan final : public VideoCore::RasterizerAccelerated { | 106 | class RasterizerVulkan final : public VideoCore::RasterizerAccelerated { |
| 107 | public: | 107 | public: |
| 108 | explicit RasterizerVulkan(Core::Frontend::EmuWindow& emu_window, Tegra::GPU& gpu, | 108 | explicit RasterizerVulkan(Core::Frontend::EmuWindow& emu_window_, Tegra::GPU& gpu_, |
| 109 | Tegra::MemoryManager& gpu_memory, Core::Memory::Memory& cpu_memory, | 109 | Tegra::MemoryManager& gpu_memory_, Core::Memory::Memory& cpu_memory_, |
| 110 | VKScreenInfo& screen_info, const VKDevice& device, | 110 | VKScreenInfo& screen_info_, const VKDevice& device_, |
| 111 | VKMemoryManager& memory_manager, StateTracker& state_tracker, | 111 | VKMemoryManager& memory_manager_, StateTracker& state_tracker_, |
| 112 | VKScheduler& scheduler); | 112 | VKScheduler& scheduler_); |
| 113 | ~RasterizerVulkan() override; | 113 | ~RasterizerVulkan() override; |
| 114 | 114 | ||
| 115 | void Draw(bool is_indexed, bool is_instanced) override; | 115 | void Draw(bool is_indexed, bool is_instanced) override; |
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 64649699f..1ff109880 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp | |||
| @@ -489,12 +489,12 @@ VkImageView CachedSurfaceView::GetAttachment() { | |||
| 489 | return *render_target; | 489 | return *render_target; |
| 490 | } | 490 | } |
| 491 | 491 | ||
| 492 | VKTextureCache::VKTextureCache(VideoCore::RasterizerInterface& rasterizer, | 492 | VKTextureCache::VKTextureCache(VideoCore::RasterizerInterface& rasterizer_, |
| 493 | Tegra::Engines::Maxwell3D& maxwell3d, | 493 | Tegra::Engines::Maxwell3D& maxwell3d_, |
| 494 | Tegra::MemoryManager& gpu_memory, const VKDevice& device_, | 494 | Tegra::MemoryManager& gpu_memory_, const VKDevice& device_, |
| 495 | VKMemoryManager& memory_manager_, VKScheduler& scheduler_, | 495 | VKMemoryManager& memory_manager_, VKScheduler& scheduler_, |
| 496 | VKStagingBufferPool& staging_pool_) | 496 | VKStagingBufferPool& staging_pool_) |
| 497 | : TextureCache(rasterizer, maxwell3d, gpu_memory, device_.IsOptimalAstcSupported()), | 497 | : TextureCache(rasterizer_, maxwell3d_, gpu_memory_, device_.IsOptimalAstcSupported()), |
| 498 | device{device_}, memory_manager{memory_manager_}, scheduler{scheduler_}, staging_pool{ | 498 | device{device_}, memory_manager{memory_manager_}, scheduler{scheduler_}, staging_pool{ |
| 499 | staging_pool_} {} | 499 | staging_pool_} {} |
| 500 | 500 | ||
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index 06880f228..1c632bd2c 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h | |||
| @@ -193,10 +193,11 @@ private: | |||
| 193 | 193 | ||
| 194 | class VKTextureCache final : public TextureCacheBase { | 194 | class VKTextureCache final : public TextureCacheBase { |
| 195 | public: | 195 | public: |
| 196 | explicit VKTextureCache(VideoCore::RasterizerInterface& rasterizer, | 196 | explicit VKTextureCache(VideoCore::RasterizerInterface& rasterizer_, |
| 197 | Tegra::Engines::Maxwell3D& maxwell3d, Tegra::MemoryManager& gpu_memory, | 197 | Tegra::Engines::Maxwell3D& maxwell3d_, |
| 198 | const VKDevice& device, VKMemoryManager& memory_manager, | 198 | Tegra::MemoryManager& gpu_memory_, const VKDevice& device_, |
| 199 | VKScheduler& scheduler, VKStagingBufferPool& staging_pool); | 199 | VKMemoryManager& memory_manager_, VKScheduler& scheduler_, |
| 200 | VKStagingBufferPool& staging_pool_); | ||
| 200 | ~VKTextureCache(); | 201 | ~VKTextureCache(); |
| 201 | 202 | ||
| 202 | private: | 203 | private: |
diff --git a/src/video_core/shader/ast.cpp b/src/video_core/shader/ast.cpp index 3f96d9076..cc2dbe36c 100644 --- a/src/video_core/shader/ast.cpp +++ b/src/video_core/shader/ast.cpp | |||
| @@ -374,8 +374,8 @@ std::string ASTManager::Print() const { | |||
| 374 | return printer.GetResult(); | 374 | return printer.GetResult(); |
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | ASTManager::ASTManager(bool full_decompile, bool disable_else_derivation) | 377 | ASTManager::ASTManager(bool do_full_decompile, bool disable_else_derivation_) |
| 378 | : full_decompile{full_decompile}, disable_else_derivation{disable_else_derivation} {}; | 378 | : full_decompile{do_full_decompile}, disable_else_derivation{disable_else_derivation_} {} |
| 379 | 379 | ||
| 380 | ASTManager::~ASTManager() { | 380 | ASTManager::~ASTManager() { |
| 381 | Clear(); | 381 | Clear(); |
diff --git a/src/video_core/shader/ast.h b/src/video_core/shader/ast.h index 8e5a22ab3..dc49b369e 100644 --- a/src/video_core/shader/ast.h +++ b/src/video_core/shader/ast.h | |||
| @@ -76,7 +76,7 @@ public: | |||
| 76 | 76 | ||
| 77 | class ASTIfThen { | 77 | class ASTIfThen { |
| 78 | public: | 78 | public: |
| 79 | explicit ASTIfThen(Expr condition) : condition{std::move(condition)} {} | 79 | explicit ASTIfThen(Expr condition_) : condition{std::move(condition_)} {} |
| 80 | Expr condition; | 80 | Expr condition; |
| 81 | ASTZipper nodes{}; | 81 | ASTZipper nodes{}; |
| 82 | }; | 82 | }; |
| @@ -88,63 +88,68 @@ public: | |||
| 88 | 88 | ||
| 89 | class ASTBlockEncoded { | 89 | class ASTBlockEncoded { |
| 90 | public: | 90 | public: |
| 91 | explicit ASTBlockEncoded(u32 start, u32 end) : start{start}, end{end} {} | 91 | explicit ASTBlockEncoded(u32 start_, u32 _) : start{start_}, end{_} {} |
| 92 | u32 start; | 92 | u32 start; |
| 93 | u32 end; | 93 | u32 end; |
| 94 | }; | 94 | }; |
| 95 | 95 | ||
| 96 | class ASTBlockDecoded { | 96 | class ASTBlockDecoded { |
| 97 | public: | 97 | public: |
| 98 | explicit ASTBlockDecoded(NodeBlock&& new_nodes) : nodes(std::move(new_nodes)) {} | 98 | explicit ASTBlockDecoded(NodeBlock&& new_nodes_) : nodes(std::move(new_nodes_)) {} |
| 99 | NodeBlock nodes; | 99 | NodeBlock nodes; |
| 100 | }; | 100 | }; |
| 101 | 101 | ||
| 102 | class ASTVarSet { | 102 | class ASTVarSet { |
| 103 | public: | 103 | public: |
| 104 | explicit ASTVarSet(u32 index, Expr condition) : index{index}, condition{std::move(condition)} {} | 104 | explicit ASTVarSet(u32 index_, Expr condition_) |
| 105 | : index{index_}, condition{std::move(condition_)} {} | ||
| 106 | |||
| 105 | u32 index; | 107 | u32 index; |
| 106 | Expr condition; | 108 | Expr condition; |
| 107 | }; | 109 | }; |
| 108 | 110 | ||
| 109 | class ASTLabel { | 111 | class ASTLabel { |
| 110 | public: | 112 | public: |
| 111 | explicit ASTLabel(u32 index) : index{index} {} | 113 | explicit ASTLabel(u32 index_) : index{index_} {} |
| 112 | u32 index; | 114 | u32 index; |
| 113 | bool unused{}; | 115 | bool unused{}; |
| 114 | }; | 116 | }; |
| 115 | 117 | ||
| 116 | class ASTGoto { | 118 | class ASTGoto { |
| 117 | public: | 119 | public: |
| 118 | explicit ASTGoto(Expr condition, u32 label) : condition{std::move(condition)}, label{label} {} | 120 | explicit ASTGoto(Expr condition_, u32 label_) |
| 121 | : condition{std::move(condition_)}, label{label_} {} | ||
| 122 | |||
| 119 | Expr condition; | 123 | Expr condition; |
| 120 | u32 label; | 124 | u32 label; |
| 121 | }; | 125 | }; |
| 122 | 126 | ||
| 123 | class ASTDoWhile { | 127 | class ASTDoWhile { |
| 124 | public: | 128 | public: |
| 125 | explicit ASTDoWhile(Expr condition) : condition{std::move(condition)} {} | 129 | explicit ASTDoWhile(Expr condition_) : condition{std::move(condition_)} {} |
| 126 | Expr condition; | 130 | Expr condition; |
| 127 | ASTZipper nodes{}; | 131 | ASTZipper nodes{}; |
| 128 | }; | 132 | }; |
| 129 | 133 | ||
| 130 | class ASTReturn { | 134 | class ASTReturn { |
| 131 | public: | 135 | public: |
| 132 | explicit ASTReturn(Expr condition, bool kills) | 136 | explicit ASTReturn(Expr condition_, bool kills_) |
| 133 | : condition{std::move(condition)}, kills{kills} {} | 137 | : condition{std::move(condition_)}, kills{kills_} {} |
| 138 | |||
| 134 | Expr condition; | 139 | Expr condition; |
| 135 | bool kills; | 140 | bool kills; |
| 136 | }; | 141 | }; |
| 137 | 142 | ||
| 138 | class ASTBreak { | 143 | class ASTBreak { |
| 139 | public: | 144 | public: |
| 140 | explicit ASTBreak(Expr condition) : condition{std::move(condition)} {} | 145 | explicit ASTBreak(Expr condition_) : condition{std::move(condition_)} {} |
| 141 | Expr condition; | 146 | Expr condition; |
| 142 | }; | 147 | }; |
| 143 | 148 | ||
| 144 | class ASTBase { | 149 | class ASTBase { |
| 145 | public: | 150 | public: |
| 146 | explicit ASTBase(ASTNode parent, ASTData data) | 151 | explicit ASTBase(ASTNode parent_, ASTData data_) |
| 147 | : data{std::move(data)}, parent{std::move(parent)} {} | 152 | : data{std::move(data_)}, parent{std::move(parent_)} {} |
| 148 | 153 | ||
| 149 | template <class U, class... Args> | 154 | template <class U, class... Args> |
| 150 | static ASTNode Make(ASTNode parent, Args&&... args) { | 155 | static ASTNode Make(ASTNode parent, Args&&... args) { |
| @@ -300,7 +305,7 @@ private: | |||
| 300 | 305 | ||
| 301 | class ASTManager final { | 306 | class ASTManager final { |
| 302 | public: | 307 | public: |
| 303 | ASTManager(bool full_decompile, bool disable_else_derivation); | 308 | explicit ASTManager(bool do_full_decompile, bool disable_else_derivation_); |
| 304 | ~ASTManager(); | 309 | ~ASTManager(); |
| 305 | 310 | ||
| 306 | ASTManager(const ASTManager& o) = delete; | 311 | ASTManager(const ASTManager& o) = delete; |
diff --git a/src/video_core/shader/async_shaders.cpp b/src/video_core/shader/async_shaders.cpp index 6920afdf2..78245473c 100644 --- a/src/video_core/shader/async_shaders.cpp +++ b/src/video_core/shader/async_shaders.cpp | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | namespace VideoCommon::Shader { | 14 | namespace VideoCommon::Shader { |
| 15 | 15 | ||
| 16 | AsyncShaders::AsyncShaders(Core::Frontend::EmuWindow& emu_window) : emu_window(emu_window) {} | 16 | AsyncShaders::AsyncShaders(Core::Frontend::EmuWindow& emu_window_) : emu_window(emu_window_) {} |
| 17 | 17 | ||
| 18 | AsyncShaders::~AsyncShaders() { | 18 | AsyncShaders::~AsyncShaders() { |
| 19 | KillWorkers(); | 19 | KillWorkers(); |
diff --git a/src/video_core/shader/async_shaders.h b/src/video_core/shader/async_shaders.h index 7a99e1dc5..5a7216019 100644 --- a/src/video_core/shader/async_shaders.h +++ b/src/video_core/shader/async_shaders.h | |||
| @@ -66,7 +66,7 @@ public: | |||
| 66 | Tegra::Engines::ShaderType shader_type; | 66 | Tegra::Engines::ShaderType shader_type; |
| 67 | }; | 67 | }; |
| 68 | 68 | ||
| 69 | explicit AsyncShaders(Core::Frontend::EmuWindow& emu_window); | 69 | explicit AsyncShaders(Core::Frontend::EmuWindow& emu_window_); |
| 70 | ~AsyncShaders(); | 70 | ~AsyncShaders(); |
| 71 | 71 | ||
| 72 | /// Start up shader worker threads | 72 | /// Start up shader worker threads |
diff --git a/src/video_core/shader/control_flow.cpp b/src/video_core/shader/control_flow.cpp index d656e0668..9120bf705 100644 --- a/src/video_core/shader/control_flow.cpp +++ b/src/video_core/shader/control_flow.cpp | |||
| @@ -66,8 +66,8 @@ struct BlockInfo { | |||
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | struct CFGRebuildState { | 68 | struct CFGRebuildState { |
| 69 | explicit CFGRebuildState(const ProgramCode& program_code, u32 start, Registry& registry) | 69 | explicit CFGRebuildState(const ProgramCode& program_code_, u32 start_, Registry& registry_) |
| 70 | : program_code{program_code}, registry{registry}, start{start} {} | 70 | : program_code{program_code_}, registry{registry_}, start{start_} {} |
| 71 | 71 | ||
| 72 | const ProgramCode& program_code; | 72 | const ProgramCode& program_code; |
| 73 | Registry& registry; | 73 | Registry& registry; |
diff --git a/src/video_core/shader/control_flow.h b/src/video_core/shader/control_flow.h index 62a3510d8..37bf96492 100644 --- a/src/video_core/shader/control_flow.h +++ b/src/video_core/shader/control_flow.h | |||
| @@ -42,10 +42,10 @@ struct Condition { | |||
| 42 | class SingleBranch { | 42 | class SingleBranch { |
| 43 | public: | 43 | public: |
| 44 | SingleBranch() = default; | 44 | SingleBranch() = default; |
| 45 | SingleBranch(Condition condition, s32 address, bool kill, bool is_sync, bool is_brk, | 45 | explicit SingleBranch(Condition condition_, s32 address_, bool kill_, bool is_sync_, |
| 46 | bool ignore) | 46 | bool is_brk_, bool ignore_) |
| 47 | : condition{condition}, address{address}, kill{kill}, is_sync{is_sync}, is_brk{is_brk}, | 47 | : condition{condition_}, address{address_}, kill{kill_}, is_sync{is_sync_}, is_brk{is_brk_}, |
| 48 | ignore{ignore} {} | 48 | ignore{ignore_} {} |
| 49 | 49 | ||
| 50 | bool operator==(const SingleBranch& b) const { | 50 | bool operator==(const SingleBranch& b) const { |
| 51 | return std::tie(condition, address, kill, is_sync, is_brk, ignore) == | 51 | return std::tie(condition, address, kill, is_sync, is_brk, ignore) == |
| @@ -65,15 +65,15 @@ public: | |||
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | struct CaseBranch { | 67 | struct CaseBranch { |
| 68 | CaseBranch(u32 cmp_value, u32 address) : cmp_value{cmp_value}, address{address} {} | 68 | explicit CaseBranch(u32 cmp_value_, u32 address_) : cmp_value{cmp_value_}, address{address_} {} |
| 69 | u32 cmp_value; | 69 | u32 cmp_value; |
| 70 | u32 address; | 70 | u32 address; |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | class MultiBranch { | 73 | class MultiBranch { |
| 74 | public: | 74 | public: |
| 75 | MultiBranch(u32 gpr, std::vector<CaseBranch>&& branches) | 75 | explicit MultiBranch(u32 gpr_, std::vector<CaseBranch>&& branches_) |
| 76 | : gpr{gpr}, branches{std::move(branches)} {} | 76 | : gpr{gpr_}, branches{std::move(branches_)} {} |
| 77 | 77 | ||
| 78 | u32 gpr{}; | 78 | u32 gpr{}; |
| 79 | std::vector<CaseBranch> branches{}; | 79 | std::vector<CaseBranch> branches{}; |
diff --git a/src/video_core/shader/decode.cpp b/src/video_core/shader/decode.cpp index eeac328a6..c8f4da6df 100644 --- a/src/video_core/shader/decode.cpp +++ b/src/video_core/shader/decode.cpp | |||
| @@ -66,7 +66,7 @@ std::optional<u32> TryDeduceSamplerSize(const Sampler& sampler_to_deduce, | |||
| 66 | 66 | ||
| 67 | class ASTDecoder { | 67 | class ASTDecoder { |
| 68 | public: | 68 | public: |
| 69 | ASTDecoder(ShaderIR& ir) : ir(ir) {} | 69 | explicit ASTDecoder(ShaderIR& ir_) : ir(ir_) {} |
| 70 | 70 | ||
| 71 | void operator()(ASTProgram& ast) { | 71 | void operator()(ASTProgram& ast) { |
| 72 | ASTNode current = ast.nodes.GetFirst(); | 72 | ASTNode current = ast.nodes.GetFirst(); |
diff --git a/src/video_core/shader/decode/arithmetic_integer.cpp b/src/video_core/shader/decode/arithmetic_integer.cpp index 73155966f..f32c3134b 100644 --- a/src/video_core/shader/decode/arithmetic_integer.cpp +++ b/src/video_core/shader/decode/arithmetic_integer.cpp | |||
| @@ -258,7 +258,7 @@ u32 ShaderIR::DecodeArithmeticInteger(NodeBlock& bb, u32 pc) { | |||
| 258 | case OpCode::Id::LEA_IMM: | 258 | case OpCode::Id::LEA_IMM: |
| 259 | case OpCode::Id::LEA_RZ: | 259 | case OpCode::Id::LEA_RZ: |
| 260 | case OpCode::Id::LEA_HI: { | 260 | case OpCode::Id::LEA_HI: { |
| 261 | auto [op_a, op_b, op_c] = [&]() -> std::tuple<Node, Node, Node> { | 261 | auto [op_a_, op_b_, op_c_] = [&]() -> std::tuple<Node, Node, Node> { |
| 262 | switch (opcode->get().GetId()) { | 262 | switch (opcode->get().GetId()) { |
| 263 | case OpCode::Id::LEA_R2: { | 263 | case OpCode::Id::LEA_R2: { |
| 264 | return {GetRegister(instr.gpr20), GetRegister(instr.gpr39), | 264 | return {GetRegister(instr.gpr20), GetRegister(instr.gpr39), |
| @@ -294,8 +294,9 @@ u32 ShaderIR::DecodeArithmeticInteger(NodeBlock& bb, u32 pc) { | |||
| 294 | UNIMPLEMENTED_IF_MSG(instr.lea.pred48 != static_cast<u64>(Pred::UnusedIndex), | 294 | UNIMPLEMENTED_IF_MSG(instr.lea.pred48 != static_cast<u64>(Pred::UnusedIndex), |
| 295 | "Unhandled LEA Predicate"); | 295 | "Unhandled LEA Predicate"); |
| 296 | 296 | ||
| 297 | Node value = Operation(OperationCode::ILogicalShiftLeft, std::move(op_a), std::move(op_c)); | 297 | Node value = |
| 298 | value = Operation(OperationCode::IAdd, std::move(op_b), std::move(value)); | 298 | Operation(OperationCode::ILogicalShiftLeft, std::move(op_a_), std::move(op_c_)); |
| 299 | value = Operation(OperationCode::IAdd, std::move(op_b_), std::move(value)); | ||
| 299 | SetRegister(bb, instr.gpr0, std::move(value)); | 300 | SetRegister(bb, instr.gpr0, std::move(value)); |
| 300 | 301 | ||
| 301 | break; | 302 | break; |
diff --git a/src/video_core/shader/expr.h b/src/video_core/shader/expr.h index 4e8264367..cda284c72 100644 --- a/src/video_core/shader/expr.h +++ b/src/video_core/shader/expr.h | |||
| @@ -76,7 +76,7 @@ public: | |||
| 76 | 76 | ||
| 77 | class ExprPredicate final { | 77 | class ExprPredicate final { |
| 78 | public: | 78 | public: |
| 79 | explicit ExprPredicate(u32 predicate) : predicate{predicate} {} | 79 | explicit ExprPredicate(u32 predicate_) : predicate{predicate_} {} |
| 80 | 80 | ||
| 81 | bool operator==(const ExprPredicate& b) const { | 81 | bool operator==(const ExprPredicate& b) const { |
| 82 | return predicate == b.predicate; | 82 | return predicate == b.predicate; |
| @@ -91,7 +91,7 @@ public: | |||
| 91 | 91 | ||
| 92 | class ExprCondCode final { | 92 | class ExprCondCode final { |
| 93 | public: | 93 | public: |
| 94 | explicit ExprCondCode(ConditionCode cc) : cc{cc} {} | 94 | explicit ExprCondCode(ConditionCode condition_code) : cc{condition_code} {} |
| 95 | 95 | ||
| 96 | bool operator==(const ExprCondCode& b) const { | 96 | bool operator==(const ExprCondCode& b) const { |
| 97 | return cc == b.cc; | 97 | return cc == b.cc; |
| @@ -121,7 +121,7 @@ public: | |||
| 121 | 121 | ||
| 122 | class ExprGprEqual final { | 122 | class ExprGprEqual final { |
| 123 | public: | 123 | public: |
| 124 | ExprGprEqual(u32 gpr, u32 value) : gpr{gpr}, value{value} {} | 124 | explicit ExprGprEqual(u32 gpr_, u32 value_) : gpr{gpr_}, value{value_} {} |
| 125 | 125 | ||
| 126 | bool operator==(const ExprGprEqual& b) const { | 126 | bool operator==(const ExprGprEqual& b) const { |
| 127 | return gpr == b.gpr && value == b.value; | 127 | return gpr == b.gpr && value == b.value; |
diff --git a/src/video_core/shader/node.h b/src/video_core/shader/node.h index a1e2c4d8e..8db9e1de7 100644 --- a/src/video_core/shader/node.h +++ b/src/video_core/shader/node.h | |||
| @@ -290,18 +290,18 @@ struct Sampler { | |||
| 290 | is_buffer{is_buffer_}, is_indexed{is_indexed_} {} | 290 | is_buffer{is_buffer_}, is_indexed{is_indexed_} {} |
| 291 | 291 | ||
| 292 | /// Separate sampler constructor | 292 | /// Separate sampler constructor |
| 293 | constexpr explicit Sampler(u32 index_, std::pair<u32, u32> offsets, std::pair<u32, u32> buffers, | 293 | constexpr explicit Sampler(u32 index_, std::pair<u32, u32> offsets_, |
| 294 | Tegra::Shader::TextureType type, bool is_array_, bool is_shadow_, | 294 | std::pair<u32, u32> buffers_, Tegra::Shader::TextureType type_, |
| 295 | bool is_buffer_) | 295 | bool is_array_, bool is_shadow_, bool is_buffer_) |
| 296 | : index{index_}, offset{offsets.first}, secondary_offset{offsets.second}, | 296 | : index{index_}, offset{offsets_.first}, secondary_offset{offsets_.second}, |
| 297 | buffer{buffers.first}, secondary_buffer{buffers.second}, type{type}, is_array{is_array_}, | 297 | buffer{buffers_.first}, secondary_buffer{buffers_.second}, type{type_}, |
| 298 | is_shadow{is_shadow_}, is_buffer{is_buffer_}, is_separated{true} {} | 298 | is_array{is_array_}, is_shadow{is_shadow_}, is_buffer{is_buffer_}, is_separated{true} {} |
| 299 | 299 | ||
| 300 | /// Bindless samplers constructor | 300 | /// Bindless samplers constructor |
| 301 | constexpr explicit Sampler(u32 index_, u32 offset_, u32 buffer_, | 301 | constexpr explicit Sampler(u32 index_, u32 offset_, u32 buffer_, |
| 302 | Tegra::Shader::TextureType type, bool is_array_, bool is_shadow_, | 302 | Tegra::Shader::TextureType type_, bool is_array_, bool is_shadow_, |
| 303 | bool is_buffer_, bool is_indexed_) | 303 | bool is_buffer_, bool is_indexed_) |
| 304 | : index{index_}, offset{offset_}, buffer{buffer_}, type{type}, is_array{is_array_}, | 304 | : index{index_}, offset{offset_}, buffer{buffer_}, type{type_}, is_array{is_array_}, |
| 305 | is_shadow{is_shadow_}, is_buffer{is_buffer_}, is_bindless{true}, is_indexed{is_indexed_} { | 305 | is_shadow{is_shadow_}, is_buffer{is_buffer_}, is_bindless{true}, is_indexed{is_indexed_} { |
| 306 | } | 306 | } |
| 307 | 307 | ||
diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp index 29d794b34..879088a27 100644 --- a/src/video_core/shader/shader_ir.cpp +++ b/src/video_core/shader/shader_ir.cpp | |||
| @@ -25,9 +25,10 @@ using Tegra::Shader::PredCondition; | |||
| 25 | using Tegra::Shader::PredOperation; | 25 | using Tegra::Shader::PredOperation; |
| 26 | using Tegra::Shader::Register; | 26 | using Tegra::Shader::Register; |
| 27 | 27 | ||
| 28 | ShaderIR::ShaderIR(const ProgramCode& program_code, u32 main_offset, CompilerSettings settings, | 28 | ShaderIR::ShaderIR(const ProgramCode& program_code_, u32 main_offset_, CompilerSettings settings_, |
| 29 | Registry& registry) | 29 | Registry& registry_) |
| 30 | : program_code{program_code}, main_offset{main_offset}, settings{settings}, registry{registry} { | 30 | : program_code{program_code_}, main_offset{main_offset_}, settings{settings_}, registry{ |
| 31 | registry_} { | ||
| 31 | Decode(); | 32 | Decode(); |
| 32 | PostDecode(); | 33 | PostDecode(); |
| 33 | } | 34 | } |
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h index 3a98b2104..6aae14e34 100644 --- a/src/video_core/shader/shader_ir.h +++ b/src/video_core/shader/shader_ir.h | |||
| @@ -29,8 +29,8 @@ struct ShaderBlock; | |||
| 29 | constexpr u32 MAX_PROGRAM_LENGTH = 0x1000; | 29 | constexpr u32 MAX_PROGRAM_LENGTH = 0x1000; |
| 30 | 30 | ||
| 31 | struct ConstBuffer { | 31 | struct ConstBuffer { |
| 32 | constexpr explicit ConstBuffer(u32 max_offset, bool is_indirect) | 32 | constexpr explicit ConstBuffer(u32 max_offset_, bool is_indirect_) |
| 33 | : max_offset{max_offset}, is_indirect{is_indirect} {} | 33 | : max_offset{max_offset_}, is_indirect{is_indirect_} {} |
| 34 | 34 | ||
| 35 | constexpr ConstBuffer() = default; | 35 | constexpr ConstBuffer() = default; |
| 36 | 36 | ||
| @@ -66,8 +66,8 @@ struct GlobalMemoryUsage { | |||
| 66 | 66 | ||
| 67 | class ShaderIR final { | 67 | class ShaderIR final { |
| 68 | public: | 68 | public: |
| 69 | explicit ShaderIR(const ProgramCode& program_code, u32 main_offset, CompilerSettings settings, | 69 | explicit ShaderIR(const ProgramCode& program_code_, u32 main_offset_, |
| 70 | Registry& registry); | 70 | CompilerSettings settings_, Registry& registry_); |
| 71 | ~ShaderIR(); | 71 | ~ShaderIR(); |
| 72 | 72 | ||
| 73 | const std::map<u32, NodeBlock>& GetBasicBlocks() const { | 73 | const std::map<u32, NodeBlock>& GetBasicBlocks() const { |
diff --git a/src/video_core/texture_cache/copy_params.h b/src/video_core/texture_cache/copy_params.h index 9c21a0649..5b475fe06 100644 --- a/src/video_core/texture_cache/copy_params.h +++ b/src/video_core/texture_cache/copy_params.h | |||
| @@ -9,16 +9,16 @@ | |||
| 9 | namespace VideoCommon { | 9 | namespace VideoCommon { |
| 10 | 10 | ||
| 11 | struct CopyParams { | 11 | struct CopyParams { |
| 12 | constexpr CopyParams(u32 source_x, u32 source_y, u32 source_z, u32 dest_x, u32 dest_y, | 12 | constexpr CopyParams(u32 source_x_, u32 source_y_, u32 source_z_, u32 dest_x_, u32 dest_y_, |
| 13 | u32 dest_z, u32 source_level, u32 dest_level, u32 width, u32 height, | 13 | u32 dest_z_, u32 source_level_, u32 dest_level_, u32 width_, u32 height_, |
| 14 | u32 depth) | 14 | u32 depth_) |
| 15 | : source_x{source_x}, source_y{source_y}, source_z{source_z}, dest_x{dest_x}, | 15 | : source_x{source_x_}, source_y{source_y_}, source_z{source_z_}, dest_x{dest_x_}, |
| 16 | dest_y{dest_y}, dest_z{dest_z}, source_level{source_level}, | 16 | dest_y{dest_y_}, dest_z{dest_z_}, source_level{source_level_}, |
| 17 | dest_level{dest_level}, width{width}, height{height}, depth{depth} {} | 17 | dest_level{dest_level_}, width{width_}, height{height_}, depth{depth_} {} |
| 18 | 18 | ||
| 19 | constexpr CopyParams(u32 width, u32 height, u32 depth, u32 level) | 19 | constexpr CopyParams(u32 width_, u32 height_, u32 depth_, u32 level_) |
| 20 | : source_x{}, source_y{}, source_z{}, dest_x{}, dest_y{}, dest_z{}, source_level{level}, | 20 | : source_x{}, source_y{}, source_z{}, dest_x{}, dest_y{}, dest_z{}, source_level{level_}, |
| 21 | dest_level{level}, width{width}, height{height}, depth{depth} {} | 21 | dest_level{level_}, width{width_}, height{height_}, depth{depth_} {} |
| 22 | 22 | ||
| 23 | u32 source_x; | 23 | u32 source_x; |
| 24 | u32 source_y; | 24 | u32 source_y; |
diff --git a/src/video_core/texture_cache/format_lookup_table.cpp b/src/video_core/texture_cache/format_lookup_table.cpp index 7d5a75648..7938d71eb 100644 --- a/src/video_core/texture_cache/format_lookup_table.cpp +++ b/src/video_core/texture_cache/format_lookup_table.cpp | |||
| @@ -24,12 +24,12 @@ constexpr bool C = false; // Normal color | |||
| 24 | constexpr bool S = true; // Srgb | 24 | constexpr bool S = true; // Srgb |
| 25 | 25 | ||
| 26 | struct Table { | 26 | struct Table { |
| 27 | constexpr Table(TextureFormat texture_format, bool is_srgb, ComponentType red_component, | 27 | constexpr Table(TextureFormat texture_format_, bool is_srgb_, ComponentType red_component_, |
| 28 | ComponentType green_component, ComponentType blue_component, | 28 | ComponentType green_component_, ComponentType blue_component_, |
| 29 | ComponentType alpha_component, PixelFormat pixel_format) | 29 | ComponentType alpha_component_, PixelFormat pixel_format_) |
| 30 | : texture_format{texture_format}, pixel_format{pixel_format}, red_component{red_component}, | 30 | : texture_format{texture_format_}, pixel_format{pixel_format_}, |
| 31 | green_component{green_component}, blue_component{blue_component}, | 31 | red_component{red_component_}, green_component{green_component_}, |
| 32 | alpha_component{alpha_component}, is_srgb{is_srgb} {} | 32 | blue_component{blue_component_}, alpha_component{alpha_component_}, is_srgb{is_srgb_} {} |
| 33 | 33 | ||
| 34 | TextureFormat texture_format; | 34 | TextureFormat texture_format; |
| 35 | PixelFormat pixel_format; | 35 | PixelFormat pixel_format; |
diff --git a/src/video_core/texture_cache/surface_base.cpp b/src/video_core/texture_cache/surface_base.cpp index 42a1c0c6f..efbcf6723 100644 --- a/src/video_core/texture_cache/surface_base.cpp +++ b/src/video_core/texture_cache/surface_base.cpp | |||
| @@ -25,11 +25,11 @@ StagingCache::StagingCache() = default; | |||
| 25 | 25 | ||
| 26 | StagingCache::~StagingCache() = default; | 26 | StagingCache::~StagingCache() = default; |
| 27 | 27 | ||
| 28 | SurfaceBaseImpl::SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params, | 28 | SurfaceBaseImpl::SurfaceBaseImpl(GPUVAddr gpu_addr_, const SurfaceParams& params_, |
| 29 | bool is_astc_supported) | 29 | bool is_astc_supported_) |
| 30 | : params{params}, gpu_addr{gpu_addr}, mipmap_sizes(params.num_levels), | 30 | : params{params_}, gpu_addr{gpu_addr_}, mipmap_sizes(params_.num_levels), |
| 31 | mipmap_offsets(params.num_levels) { | 31 | mipmap_offsets(params.num_levels) { |
| 32 | is_converted = IsPixelFormatASTC(params.pixel_format) && !is_astc_supported; | 32 | is_converted = IsPixelFormatASTC(params.pixel_format) && !is_astc_supported_; |
| 33 | host_memory_size = params.GetHostSizeInBytes(is_converted); | 33 | host_memory_size = params.GetHostSizeInBytes(is_converted); |
| 34 | 34 | ||
| 35 | std::size_t offset = 0; | 35 | std::size_t offset = 0; |
diff --git a/src/video_core/texture_cache/surface_base.h b/src/video_core/texture_cache/surface_base.h index cfcfa5b3a..b57135fe4 100644 --- a/src/video_core/texture_cache/surface_base.h +++ b/src/video_core/texture_cache/surface_base.h | |||
| @@ -148,8 +148,8 @@ public: | |||
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | protected: | 150 | protected: |
| 151 | explicit SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params, | 151 | explicit SurfaceBaseImpl(GPUVAddr gpu_addr_, const SurfaceParams& params_, |
| 152 | bool is_astc_supported); | 152 | bool is_astc_supported_); |
| 153 | ~SurfaceBaseImpl() = default; | 153 | ~SurfaceBaseImpl() = default; |
| 154 | 154 | ||
| 155 | virtual void DecorateSurfaceName() = 0; | 155 | virtual void DecorateSurfaceName() = 0; |
| @@ -297,9 +297,9 @@ public: | |||
| 297 | } | 297 | } |
| 298 | 298 | ||
| 299 | protected: | 299 | protected: |
| 300 | explicit SurfaceBase(const GPUVAddr gpu_addr, const SurfaceParams& params, | 300 | explicit SurfaceBase(const GPUVAddr gpu_addr_, const SurfaceParams& params_, |
| 301 | bool is_astc_supported) | 301 | bool is_astc_supported_) |
| 302 | : SurfaceBaseImpl(gpu_addr, params, is_astc_supported) {} | 302 | : SurfaceBaseImpl{gpu_addr_, params_, is_astc_supported_} {} |
| 303 | 303 | ||
| 304 | ~SurfaceBase() = default; | 304 | ~SurfaceBase() = default; |
| 305 | 305 | ||
diff --git a/src/video_core/texture_cache/surface_view.h b/src/video_core/texture_cache/surface_view.h index 90a8bb0ae..199f72732 100644 --- a/src/video_core/texture_cache/surface_view.h +++ b/src/video_core/texture_cache/surface_view.h | |||
| @@ -13,10 +13,10 @@ | |||
| 13 | namespace VideoCommon { | 13 | namespace VideoCommon { |
| 14 | 14 | ||
| 15 | struct ViewParams { | 15 | struct ViewParams { |
| 16 | constexpr explicit ViewParams(VideoCore::Surface::SurfaceTarget target, u32 base_layer, | 16 | constexpr explicit ViewParams(VideoCore::Surface::SurfaceTarget target_, u32 base_layer_, |
| 17 | u32 num_layers, u32 base_level, u32 num_levels) | 17 | u32 num_layers_, u32 base_level_, u32 num_levels_) |
| 18 | : target{target}, base_layer{base_layer}, num_layers{num_layers}, base_level{base_level}, | 18 | : target{target_}, base_layer{base_layer_}, num_layers{num_layers_}, |
| 19 | num_levels{num_levels} {} | 19 | base_level{base_level_}, num_levels{num_levels_} {} |
| 20 | 20 | ||
| 21 | std::size_t Hash() const; | 21 | std::size_t Hash() const; |
| 22 | 22 | ||
| @@ -44,7 +44,7 @@ struct ViewParams { | |||
| 44 | 44 | ||
| 45 | class ViewBase { | 45 | class ViewBase { |
| 46 | public: | 46 | public: |
| 47 | constexpr explicit ViewBase(const ViewParams& params) : params{params} {} | 47 | constexpr explicit ViewBase(const ViewParams& view_params) : params{view_params} {} |
| 48 | 48 | ||
| 49 | constexpr const ViewParams& GetViewParams() const { | 49 | constexpr const ViewParams& GetViewParams() const { |
| 50 | return params; | 50 | return params; |
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h index 0574fef12..bbc7e3eaf 100644 --- a/src/video_core/textures/texture.h +++ b/src/video_core/textures/texture.h | |||
| @@ -146,7 +146,7 @@ enum class MsaaMode : u32 { | |||
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | union TextureHandle { | 148 | union TextureHandle { |
| 149 | TextureHandle(u32 raw) : raw{raw} {} | 149 | /* implicit */ TextureHandle(u32 raw_) : raw{raw_} {} |
| 150 | 150 | ||
| 151 | u32 raw; | 151 | u32 raw; |
| 152 | BitField<0, 20, u32> tic_id; | 152 | BitField<0, 20, u32> tic_id; |