diff options
Diffstat (limited to 'src')
17 files changed, 31 insertions, 39 deletions
diff --git a/src/common/common_types.h b/src/common/common_types.h index 6b1766dca..4cec89fbd 100644 --- a/src/common/common_types.h +++ b/src/common/common_types.h | |||
| @@ -40,10 +40,9 @@ using s64 = std::int64_t; ///< 64-bit signed int | |||
| 40 | using f32 = float; ///< 32-bit floating point | 40 | using f32 = float; ///< 32-bit floating point |
| 41 | using f64 = double; ///< 64-bit floating point | 41 | using f64 = double; ///< 64-bit floating point |
| 42 | 42 | ||
| 43 | // TODO: It would be nice to eventually replace these with strong types that prevent accidental | 43 | using VAddr = u64; ///< Represents a pointer in the userspace virtual address space. |
| 44 | // conversion between each other. | 44 | using PAddr = u64; ///< Represents a pointer in the ARM11 physical address space. |
| 45 | using VAddr = u64; ///< Represents a pointer in the userspace virtual address space. | 45 | using GPUVAddr = u64; ///< Represents a pointer in the GPU virtual address space. |
| 46 | using PAddr = u64; ///< Represents a pointer in the ARM11 physical address space. | ||
| 47 | 46 | ||
| 48 | using u128 = std::array<std::uint64_t, 2>; | 47 | using u128 = std::array<std::uint64_t, 2>; |
| 49 | static_assert(sizeof(u128) == 16, "u128 must be 128 bits wide"); | 48 | static_assert(sizeof(u128) == 16, "u128 must be 128 bits wide"); |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index b031ebc66..b7964d66e 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | |||
| @@ -89,7 +89,7 @@ u32 nvhost_as_gpu::Remap(const std::vector<u8>& input, std::vector<u8>& output) | |||
| 89 | for (const auto& entry : entries) { | 89 | for (const auto& entry : entries) { |
| 90 | LOG_WARNING(Service_NVDRV, "remap entry, offset=0x{:X} handle=0x{:X} pages=0x{:X}", | 90 | LOG_WARNING(Service_NVDRV, "remap entry, offset=0x{:X} handle=0x{:X} pages=0x{:X}", |
| 91 | entry.offset, entry.nvmap_handle, entry.pages); | 91 | entry.offset, entry.nvmap_handle, entry.pages); |
| 92 | Tegra::GPUVAddr offset = static_cast<Tegra::GPUVAddr>(entry.offset) << 0x10; | 92 | GPUVAddr offset = static_cast<GPUVAddr>(entry.offset) << 0x10; |
| 93 | auto object = nvmap_dev->GetObject(entry.nvmap_handle); | 93 | auto object = nvmap_dev->GetObject(entry.nvmap_handle); |
| 94 | if (!object) { | 94 | if (!object) { |
| 95 | LOG_CRITICAL(Service_NVDRV, "nvmap {} is an invalid handle!", entry.nvmap_handle); | 95 | LOG_CRITICAL(Service_NVDRV, "nvmap {} is an invalid handle!", entry.nvmap_handle); |
| @@ -102,7 +102,7 @@ u32 nvhost_as_gpu::Remap(const std::vector<u8>& input, std::vector<u8>& output) | |||
| 102 | u64 size = static_cast<u64>(entry.pages) << 0x10; | 102 | u64 size = static_cast<u64>(entry.pages) << 0x10; |
| 103 | ASSERT(size <= object->size); | 103 | ASSERT(size <= object->size); |
| 104 | 104 | ||
| 105 | Tegra::GPUVAddr returned = gpu.MemoryManager().MapBufferEx(object->addr, offset, size); | 105 | GPUVAddr returned = gpu.MemoryManager().MapBufferEx(object->addr, offset, size); |
| 106 | ASSERT(returned == offset); | 106 | ASSERT(returned == offset); |
| 107 | } | 107 | } |
| 108 | std::memcpy(output.data(), entries.data(), output.size()); | 108 | std::memcpy(output.data(), entries.data(), output.size()); |
diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h index 425e2f31c..bb87fa24d 100644 --- a/src/video_core/memory_manager.h +++ b/src/video_core/memory_manager.h | |||
| @@ -13,9 +13,6 @@ | |||
| 13 | 13 | ||
| 14 | namespace Tegra { | 14 | namespace Tegra { |
| 15 | 15 | ||
| 16 | /// Virtual addresses in the GPU's memory map are 64 bit. | ||
| 17 | using GPUVAddr = u64; | ||
| 18 | |||
| 19 | class MemoryManager final { | 16 | class MemoryManager final { |
| 20 | public: | 17 | public: |
| 21 | MemoryManager(); | 18 | MemoryManager(); |
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.cpp b/src/video_core/renderer_opengl/gl_buffer_cache.cpp index 5048ed6ce..f75c65825 100644 --- a/src/video_core/renderer_opengl/gl_buffer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_buffer_cache.cpp | |||
| @@ -21,8 +21,8 @@ CachedBufferEntry::CachedBufferEntry(VAddr cpu_addr, std::size_t size, GLintptr | |||
| 21 | OGLBufferCache::OGLBufferCache(RasterizerOpenGL& rasterizer, std::size_t size) | 21 | OGLBufferCache::OGLBufferCache(RasterizerOpenGL& rasterizer, std::size_t size) |
| 22 | : RasterizerCache{rasterizer}, stream_buffer(size, true) {} | 22 | : RasterizerCache{rasterizer}, stream_buffer(size, true) {} |
| 23 | 23 | ||
| 24 | GLintptr OGLBufferCache::UploadMemory(Tegra::GPUVAddr gpu_addr, std::size_t size, | 24 | GLintptr OGLBufferCache::UploadMemory(GPUVAddr gpu_addr, std::size_t size, std::size_t alignment, |
| 25 | std::size_t alignment, bool cache) { | 25 | bool cache) { |
| 26 | auto& memory_manager = Core::System::GetInstance().GPU().MemoryManager(); | 26 | auto& memory_manager = Core::System::GetInstance().GPU().MemoryManager(); |
| 27 | 27 | ||
| 28 | // Cache management is a big overhead, so only cache entries with a given size. | 28 | // Cache management is a big overhead, so only cache entries with a given size. |
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.h b/src/video_core/renderer_opengl/gl_buffer_cache.h index 1de1f84ae..fc33aa433 100644 --- a/src/video_core/renderer_opengl/gl_buffer_cache.h +++ b/src/video_core/renderer_opengl/gl_buffer_cache.h | |||
| @@ -58,7 +58,7 @@ public: | |||
| 58 | 58 | ||
| 59 | /// Uploads data from a guest GPU address. Returns host's buffer offset where it's been | 59 | /// Uploads data from a guest GPU address. Returns host's buffer offset where it's been |
| 60 | /// allocated. | 60 | /// allocated. |
| 61 | GLintptr UploadMemory(Tegra::GPUVAddr gpu_addr, std::size_t size, std::size_t alignment = 4, | 61 | GLintptr UploadMemory(GPUVAddr gpu_addr, std::size_t size, std::size_t alignment = 4, |
| 62 | bool cache = true); | 62 | bool cache = true); |
| 63 | 63 | ||
| 64 | /// Uploads from a host memory. Returns host's buffer offset where it's been allocated. | 64 | /// Uploads from a host memory. Returns host's buffer offset where it's been allocated. |
diff --git a/src/video_core/renderer_opengl/gl_global_cache.cpp b/src/video_core/renderer_opengl/gl_global_cache.cpp index c8dbcacbd..ac030cfc9 100644 --- a/src/video_core/renderer_opengl/gl_global_cache.cpp +++ b/src/video_core/renderer_opengl/gl_global_cache.cpp | |||
| @@ -46,7 +46,7 @@ GlobalRegion GlobalRegionCacheOpenGL::TryGetReservedGlobalRegion(CacheAddr addr, | |||
| 46 | return search->second; | 46 | return search->second; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | GlobalRegion GlobalRegionCacheOpenGL::GetUncachedGlobalRegion(Tegra::GPUVAddr addr, u32 size, | 49 | GlobalRegion GlobalRegionCacheOpenGL::GetUncachedGlobalRegion(GPUVAddr addr, u32 size, |
| 50 | u8* host_ptr) { | 50 | u8* host_ptr) { |
| 51 | GlobalRegion region{TryGetReservedGlobalRegion(ToCacheAddr(host_ptr), size)}; | 51 | GlobalRegion region{TryGetReservedGlobalRegion(ToCacheAddr(host_ptr), size)}; |
| 52 | if (!region) { | 52 | if (!region) { |
diff --git a/src/video_core/renderer_opengl/gl_global_cache.h b/src/video_core/renderer_opengl/gl_global_cache.h index a840491f7..5a21ab66f 100644 --- a/src/video_core/renderer_opengl/gl_global_cache.h +++ b/src/video_core/renderer_opengl/gl_global_cache.h | |||
| @@ -66,7 +66,7 @@ public: | |||
| 66 | 66 | ||
| 67 | private: | 67 | private: |
| 68 | GlobalRegion TryGetReservedGlobalRegion(CacheAddr addr, u32 size) const; | 68 | GlobalRegion TryGetReservedGlobalRegion(CacheAddr addr, u32 size) const; |
| 69 | GlobalRegion GetUncachedGlobalRegion(Tegra::GPUVAddr addr, u32 size, u8* host_ptr); | 69 | GlobalRegion GetUncachedGlobalRegion(GPUVAddr addr, u32 size, u8* host_ptr); |
| 70 | void ReserveGlobalRegion(GlobalRegion region); | 70 | void ReserveGlobalRegion(GlobalRegion region); |
| 71 | 71 | ||
| 72 | std::unordered_map<CacheAddr, GlobalRegion> reserve; | 72 | std::unordered_map<CacheAddr, GlobalRegion> reserve; |
diff --git a/src/video_core/renderer_opengl/gl_primitive_assembler.cpp b/src/video_core/renderer_opengl/gl_primitive_assembler.cpp index 75d816795..2bcbd3da2 100644 --- a/src/video_core/renderer_opengl/gl_primitive_assembler.cpp +++ b/src/video_core/renderer_opengl/gl_primitive_assembler.cpp | |||
| @@ -40,8 +40,7 @@ GLintptr PrimitiveAssembler::MakeQuadArray(u32 first, u32 count) { | |||
| 40 | return index_offset; | 40 | return index_offset; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | GLintptr PrimitiveAssembler::MakeQuadIndexed(Tegra::GPUVAddr gpu_addr, std::size_t index_size, | 43 | GLintptr PrimitiveAssembler::MakeQuadIndexed(GPUVAddr gpu_addr, std::size_t index_size, u32 count) { |
| 44 | u32 count) { | ||
| 45 | const std::size_t map_size{CalculateQuadSize(count)}; | 44 | const std::size_t map_size{CalculateQuadSize(count)}; |
| 46 | auto [dst_pointer, index_offset] = buffer_cache.ReserveMemory(map_size); | 45 | auto [dst_pointer, index_offset] = buffer_cache.ReserveMemory(map_size); |
| 47 | 46 | ||
diff --git a/src/video_core/renderer_opengl/gl_primitive_assembler.h b/src/video_core/renderer_opengl/gl_primitive_assembler.h index a8cb88eb5..0e2e7dc36 100644 --- a/src/video_core/renderer_opengl/gl_primitive_assembler.h +++ b/src/video_core/renderer_opengl/gl_primitive_assembler.h | |||
| @@ -24,7 +24,7 @@ public: | |||
| 24 | 24 | ||
| 25 | GLintptr MakeQuadArray(u32 first, u32 count); | 25 | GLintptr MakeQuadArray(u32 first, u32 count); |
| 26 | 26 | ||
| 27 | GLintptr MakeQuadIndexed(Tegra::GPUVAddr gpu_addr, std::size_t index_size, u32 count); | 27 | GLintptr MakeQuadIndexed(GPUVAddr gpu_addr, std::size_t index_size, u32 count); |
| 28 | 28 | ||
| 29 | private: | 29 | private: |
| 30 | OGLBufferCache& buffer_cache; | 30 | OGLBufferCache& buffer_cache; |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 198c54872..e06dfe43f 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -225,8 +225,8 @@ void RasterizerOpenGL::SetupVertexBuffer(GLuint vao) { | |||
| 225 | if (!vertex_array.IsEnabled()) | 225 | if (!vertex_array.IsEnabled()) |
| 226 | continue; | 226 | continue; |
| 227 | 227 | ||
| 228 | const Tegra::GPUVAddr start = vertex_array.StartAddress(); | 228 | const GPUVAddr start = vertex_array.StartAddress(); |
| 229 | const Tegra::GPUVAddr end = regs.vertex_array_limit[index].LimitAddress(); | 229 | const GPUVAddr end = regs.vertex_array_limit[index].LimitAddress(); |
| 230 | 230 | ||
| 231 | ASSERT(end > start); | 231 | ASSERT(end > start); |
| 232 | const u64 size = end - start + 1; | 232 | const u64 size = end - start + 1; |
| @@ -421,8 +421,8 @@ std::size_t RasterizerOpenGL::CalculateVertexArraysSize() const { | |||
| 421 | if (!regs.vertex_array[index].IsEnabled()) | 421 | if (!regs.vertex_array[index].IsEnabled()) |
| 422 | continue; | 422 | continue; |
| 423 | 423 | ||
| 424 | const Tegra::GPUVAddr start = regs.vertex_array[index].StartAddress(); | 424 | const GPUVAddr start = regs.vertex_array[index].StartAddress(); |
| 425 | const Tegra::GPUVAddr end = regs.vertex_array_limit[index].LimitAddress(); | 425 | const GPUVAddr end = regs.vertex_array_limit[index].LimitAddress(); |
| 426 | 426 | ||
| 427 | ASSERT(end > start); | 427 | ASSERT(end > start); |
| 428 | size += end - start + 1; | 428 | size += end - start + 1; |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 57329cd61..1133fa1f9 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |||
| @@ -55,7 +55,7 @@ static void ApplyTextureDefaults(GLuint texture, u32 max_mip_level) { | |||
| 55 | } | 55 | } |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | void SurfaceParams::InitCacheParameters(Tegra::GPUVAddr gpu_addr_) { | 58 | void SurfaceParams::InitCacheParameters(GPUVAddr gpu_addr_) { |
| 59 | auto& memory_manager{Core::System::GetInstance().GPU().MemoryManager()}; | 59 | auto& memory_manager{Core::System::GetInstance().GPU().MemoryManager()}; |
| 60 | 60 | ||
| 61 | gpu_addr = gpu_addr_; | 61 | gpu_addr = gpu_addr_; |
| @@ -222,7 +222,7 @@ std::size_t SurfaceParams::InnerMemorySize(bool force_gl, bool layer_only, | |||
| 222 | } | 222 | } |
| 223 | 223 | ||
| 224 | /*static*/ SurfaceParams SurfaceParams::CreateForDepthBuffer( | 224 | /*static*/ SurfaceParams SurfaceParams::CreateForDepthBuffer( |
| 225 | u32 zeta_width, u32 zeta_height, Tegra::GPUVAddr zeta_address, Tegra::DepthFormat format, | 225 | u32 zeta_width, u32 zeta_height, GPUVAddr zeta_address, Tegra::DepthFormat format, |
| 226 | u32 block_width, u32 block_height, u32 block_depth, | 226 | u32 block_width, u32 block_height, u32 block_depth, |
| 227 | Tegra::Engines::Maxwell3D::Regs::InvMemoryLayout type) { | 227 | Tegra::Engines::Maxwell3D::Regs::InvMemoryLayout type) { |
| 228 | SurfaceParams params{}; | 228 | SurfaceParams params{}; |
| @@ -980,11 +980,11 @@ void RasterizerCacheOpenGL::FastLayeredCopySurface(const Surface& src_surface, | |||
| 980 | const auto& init_params{src_surface->GetSurfaceParams()}; | 980 | const auto& init_params{src_surface->GetSurfaceParams()}; |
| 981 | const auto& dst_params{dst_surface->GetSurfaceParams()}; | 981 | const auto& dst_params{dst_surface->GetSurfaceParams()}; |
| 982 | auto& memory_manager{Core::System::GetInstance().GPU().MemoryManager()}; | 982 | auto& memory_manager{Core::System::GetInstance().GPU().MemoryManager()}; |
| 983 | Tegra::GPUVAddr address{init_params.gpu_addr}; | 983 | GPUVAddr address{init_params.gpu_addr}; |
| 984 | const std::size_t layer_size{dst_params.LayerMemorySize()}; | 984 | const std::size_t layer_size{dst_params.LayerMemorySize()}; |
| 985 | for (u32 layer = 0; layer < dst_params.depth; layer++) { | 985 | for (u32 layer = 0; layer < dst_params.depth; layer++) { |
| 986 | for (u32 mipmap = 0; mipmap < dst_params.max_mip_level; mipmap++) { | 986 | for (u32 mipmap = 0; mipmap < dst_params.max_mip_level; mipmap++) { |
| 987 | const Tegra::GPUVAddr sub_address{address + dst_params.GetMipmapLevelOffset(mipmap)}; | 987 | const GPUVAddr sub_address{address + dst_params.GetMipmapLevelOffset(mipmap)}; |
| 988 | const Surface& copy{TryGet(memory_manager.GetPointer(sub_address))}; | 988 | const Surface& copy{TryGet(memory_manager.GetPointer(sub_address))}; |
| 989 | if (!copy) { | 989 | if (!copy) { |
| 990 | continue; | 990 | continue; |
| @@ -1244,10 +1244,9 @@ static std::optional<u32> TryFindBestMipMap(std::size_t memory, const SurfacePar | |||
| 1244 | return {}; | 1244 | return {}; |
| 1245 | } | 1245 | } |
| 1246 | 1246 | ||
| 1247 | static std::optional<u32> TryFindBestLayer(Tegra::GPUVAddr addr, const SurfaceParams params, | 1247 | static std::optional<u32> TryFindBestLayer(GPUVAddr addr, const SurfaceParams params, u32 mipmap) { |
| 1248 | u32 mipmap) { | ||
| 1249 | const std::size_t size{params.LayerMemorySize()}; | 1248 | const std::size_t size{params.LayerMemorySize()}; |
| 1250 | Tegra::GPUVAddr start{params.gpu_addr + params.GetMipmapLevelOffset(mipmap)}; | 1249 | GPUVAddr start{params.gpu_addr + params.GetMipmapLevelOffset(mipmap)}; |
| 1251 | for (u32 i = 0; i < params.depth; i++) { | 1250 | for (u32 i = 0; i < params.depth; i++) { |
| 1252 | if (start == addr) { | 1251 | if (start == addr) { |
| 1253 | return {i}; | 1252 | return {i}; |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 9366f47f2..d76bc0ee7 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h | |||
| @@ -210,7 +210,7 @@ struct SurfaceParams { | |||
| 210 | 210 | ||
| 211 | /// Creates SurfaceParams for a depth buffer configuration | 211 | /// Creates SurfaceParams for a depth buffer configuration |
| 212 | static SurfaceParams CreateForDepthBuffer( | 212 | static SurfaceParams CreateForDepthBuffer( |
| 213 | u32 zeta_width, u32 zeta_height, Tegra::GPUVAddr zeta_address, Tegra::DepthFormat format, | 213 | u32 zeta_width, u32 zeta_height, GPUVAddr zeta_address, Tegra::DepthFormat format, |
| 214 | u32 block_width, u32 block_height, u32 block_depth, | 214 | u32 block_width, u32 block_height, u32 block_depth, |
| 215 | Tegra::Engines::Maxwell3D::Regs::InvMemoryLayout type); | 215 | Tegra::Engines::Maxwell3D::Regs::InvMemoryLayout type); |
| 216 | 216 | ||
| @@ -232,7 +232,7 @@ struct SurfaceParams { | |||
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | /// Initializes parameters for caching, should be called after everything has been initialized | 234 | /// Initializes parameters for caching, should be called after everything has been initialized |
| 235 | void InitCacheParameters(Tegra::GPUVAddr gpu_addr); | 235 | void InitCacheParameters(GPUVAddr gpu_addr); |
| 236 | 236 | ||
| 237 | std::string TargetName() const { | 237 | std::string TargetName() const { |
| 238 | switch (target) { | 238 | switch (target) { |
| @@ -297,7 +297,7 @@ struct SurfaceParams { | |||
| 297 | bool srgb_conversion; | 297 | bool srgb_conversion; |
| 298 | // Parameters used for caching | 298 | // Parameters used for caching |
| 299 | u8* host_ptr; | 299 | u8* host_ptr; |
| 300 | Tegra::GPUVAddr gpu_addr; | 300 | GPUVAddr gpu_addr; |
| 301 | std::size_t size_in_bytes; | 301 | std::size_t size_in_bytes; |
| 302 | std::size_t size_in_bytes_gl; | 302 | std::size_t size_in_bytes_gl; |
| 303 | 303 | ||
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 1ed740877..1f8eca6f0 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -32,7 +32,7 @@ struct UnspecializedShader { | |||
| 32 | namespace { | 32 | namespace { |
| 33 | 33 | ||
| 34 | /// Gets the address for the specified shader stage program | 34 | /// Gets the address for the specified shader stage program |
| 35 | Tegra::GPUVAddr GetShaderAddress(Maxwell::ShaderProgram program) { | 35 | GPUVAddr GetShaderAddress(Maxwell::ShaderProgram program) { |
| 36 | const auto& gpu{Core::System::GetInstance().GPU().Maxwell3D()}; | 36 | const auto& gpu{Core::System::GetInstance().GPU().Maxwell3D()}; |
| 37 | const auto& shader_config{gpu.regs.shader_config[static_cast<std::size_t>(program)]}; | 37 | const auto& shader_config{gpu.regs.shader_config[static_cast<std::size_t>(program)]}; |
| 38 | return gpu.regs.code_address.CodeAddress() + shader_config.offset; | 38 | return gpu.regs.code_address.CodeAddress() + shader_config.offset; |
| @@ -486,7 +486,7 @@ Shader ShaderCacheOpenGL::GetStageProgram(Maxwell::ShaderProgram program) { | |||
| 486 | } | 486 | } |
| 487 | 487 | ||
| 488 | auto& memory_manager{Core::System::GetInstance().GPU().MemoryManager()}; | 488 | auto& memory_manager{Core::System::GetInstance().GPU().MemoryManager()}; |
| 489 | const Tegra::GPUVAddr program_addr{GetShaderAddress(program)}; | 489 | const GPUVAddr program_addr{GetShaderAddress(program)}; |
| 490 | 490 | ||
| 491 | // Look up shader in the cache based on address | 491 | // Look up shader in the cache based on address |
| 492 | const auto& host_ptr{memory_manager.GetPointer(program_addr)}; | 492 | const auto& host_ptr{memory_manager.GetPointer(program_addr)}; |
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index 95eab3fec..eac51ecb3 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp | |||
| @@ -39,8 +39,7 @@ VKBufferCache::VKBufferCache(Tegra::MemoryManager& tegra_memory_manager, | |||
| 39 | 39 | ||
| 40 | VKBufferCache::~VKBufferCache() = default; | 40 | VKBufferCache::~VKBufferCache() = default; |
| 41 | 41 | ||
| 42 | u64 VKBufferCache::UploadMemory(Tegra::GPUVAddr gpu_addr, std::size_t size, u64 alignment, | 42 | u64 VKBufferCache::UploadMemory(GPUVAddr gpu_addr, std::size_t size, u64 alignment, bool cache) { |
| 43 | bool cache) { | ||
| 44 | const auto cpu_addr{tegra_memory_manager.GpuToCpuAddress(gpu_addr)}; | 43 | const auto cpu_addr{tegra_memory_manager.GpuToCpuAddress(gpu_addr)}; |
| 45 | ASSERT_MSG(cpu_addr, "Invalid GPU address"); | 44 | ASSERT_MSG(cpu_addr, "Invalid GPU address"); |
| 46 | 45 | ||
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.h b/src/video_core/renderer_vulkan/vk_buffer_cache.h index 8b415744b..08b786aad 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.h +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.h | |||
| @@ -68,8 +68,7 @@ public: | |||
| 68 | 68 | ||
| 69 | /// Uploads data from a guest GPU address. Returns host's buffer offset where it's been | 69 | /// Uploads data from a guest GPU address. Returns host's buffer offset where it's been |
| 70 | /// allocated. | 70 | /// allocated. |
| 71 | u64 UploadMemory(Tegra::GPUVAddr gpu_addr, std::size_t size, u64 alignment = 4, | 71 | u64 UploadMemory(GPUVAddr gpu_addr, std::size_t size, u64 alignment = 4, bool cache = true); |
| 72 | bool cache = true); | ||
| 73 | 72 | ||
| 74 | /// Uploads from a host memory. Returns host's buffer offset where it's been allocated. | 73 | /// Uploads from a host memory. Returns host's buffer offset where it's been allocated. |
| 75 | u64 UploadHostMemory(const u8* raw_pointer, std::size_t size, u64 alignment = 4); | 74 | u64 UploadHostMemory(const u8* raw_pointer, std::size_t size, u64 alignment = 4); |
diff --git a/src/yuzu/debugger/graphics/graphics_surface.cpp b/src/yuzu/debugger/graphics/graphics_surface.cpp index 29f01dfb2..11023ed63 100644 --- a/src/yuzu/debugger/graphics/graphics_surface.cpp +++ b/src/yuzu/debugger/graphics/graphics_surface.cpp | |||
| @@ -261,7 +261,7 @@ void GraphicsSurfaceWidget::OnSurfaceSourceChanged(int new_value) { | |||
| 261 | 261 | ||
| 262 | void GraphicsSurfaceWidget::OnSurfaceAddressChanged(qint64 new_value) { | 262 | void GraphicsSurfaceWidget::OnSurfaceAddressChanged(qint64 new_value) { |
| 263 | if (surface_address != new_value) { | 263 | if (surface_address != new_value) { |
| 264 | surface_address = static_cast<Tegra::GPUVAddr>(new_value); | 264 | surface_address = static_cast<GPUVAddr>(new_value); |
| 265 | 265 | ||
| 266 | surface_source_list->setCurrentIndex(static_cast<int>(Source::Custom)); | 266 | surface_source_list->setCurrentIndex(static_cast<int>(Source::Custom)); |
| 267 | emit Update(); | 267 | emit Update(); |
diff --git a/src/yuzu/debugger/graphics/graphics_surface.h b/src/yuzu/debugger/graphics/graphics_surface.h index 323e39d94..89445b18f 100644 --- a/src/yuzu/debugger/graphics/graphics_surface.h +++ b/src/yuzu/debugger/graphics/graphics_surface.h | |||
| @@ -87,7 +87,7 @@ private: | |||
| 87 | QPushButton* save_surface; | 87 | QPushButton* save_surface; |
| 88 | 88 | ||
| 89 | Source surface_source; | 89 | Source surface_source; |
| 90 | Tegra::GPUVAddr surface_address; | 90 | GPUVAddr surface_address; |
| 91 | unsigned surface_width; | 91 | unsigned surface_width; |
| 92 | unsigned surface_height; | 92 | unsigned surface_height; |
| 93 | Tegra::Texture::TextureFormat surface_format; | 93 | Tegra::Texture::TextureFormat surface_format; |