summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2018-01-01 15:40:35 -0500
committerGravatar bunnei2018-01-01 15:40:35 -0500
commit93480b10ef443dbc616a9240fe8f7456315c1940 (patch)
treeca1f8c7f31835e3c895e72e08745789034c2758b /src/core
parentsvc: Stub out svcWaitSynchronization. (diff)
downloadyuzu-93480b10ef443dbc616a9240fe8f7456315c1940.tar.gz
yuzu-93480b10ef443dbc616a9240fe8f7456315c1940.tar.xz
yuzu-93480b10ef443dbc616a9240fe8f7456315c1940.zip
core/video_core: Fix a bunch of u64 -> u32 warnings.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/kernel/memory.cpp4
-rw-r--r--src/core/memory.cpp16
-rw-r--r--src/core/memory.h10
-rw-r--r--src/core/memory_setup.h6
4 files changed, 18 insertions, 18 deletions
diff --git a/src/core/hle/kernel/memory.cpp b/src/core/hle/kernel/memory.cpp
index 95d3a6bf6..d990d0569 100644
--- a/src/core/hle/kernel/memory.cpp
+++ b/src/core/hle/kernel/memory.cpp
@@ -69,8 +69,8 @@ void MemoryInit(u32 mem_type) {
69 // app_mem_malloc does not always match the configured size for memory_region[0]: in case the 69 // app_mem_malloc does not always match the configured size for memory_region[0]: in case the
70 // n3DS type override is in effect it reports the size the game expects, not the real one. 70 // n3DS type override is in effect it reports the size the game expects, not the real one.
71 config_mem.app_mem_alloc = memory_region_sizes[mem_type][0]; 71 config_mem.app_mem_alloc = memory_region_sizes[mem_type][0];
72 config_mem.sys_mem_alloc = memory_regions[1].size; 72 config_mem.sys_mem_alloc = static_cast<u32_le>(memory_regions[1].size);
73 config_mem.base_mem_alloc = memory_regions[2].size; 73 config_mem.base_mem_alloc = static_cast<u32_le>(memory_regions[2].size);
74} 74}
75 75
76void MemoryShutdown() { 76void MemoryShutdown() {
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index 9a5661a99..93ffe9938 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -37,7 +37,7 @@ PageTable* GetCurrentPageTable() {
37 return current_page_table; 37 return current_page_table;
38} 38}
39 39
40static void MapPages(PageTable& page_table, VAddr base, u32 size, u8* memory, PageType type) { 40static void MapPages(PageTable& page_table, VAddr base, u64 size, u8* memory, PageType type) {
41 LOG_DEBUG(HW_Memory, "Mapping %p onto %08X-%08X", memory, base * PAGE_SIZE, 41 LOG_DEBUG(HW_Memory, "Mapping %p onto %08X-%08X", memory, base * PAGE_SIZE,
42 (base + size) * PAGE_SIZE); 42 (base + size) * PAGE_SIZE);
43 43
@@ -58,13 +58,13 @@ static void MapPages(PageTable& page_table, VAddr base, u32 size, u8* memory, Pa
58 } 58 }
59} 59}
60 60
61void MapMemoryRegion(PageTable& page_table, VAddr base, u32 size, u8* target) { 61void MapMemoryRegion(PageTable& page_table, VAddr base, u64 size, u8* target) {
62 ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: %08X", size); 62 ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: %08X", size);
63 ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: %08X", base); 63 ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: %08X", base);
64 MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, target, PageType::Memory); 64 MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, target, PageType::Memory);
65} 65}
66 66
67void MapIoRegion(PageTable& page_table, VAddr base, u32 size, MMIORegionPointer mmio_handler) { 67void MapIoRegion(PageTable& page_table, VAddr base, u64 size, MMIORegionPointer mmio_handler) {
68 ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: %08X", size); 68 ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: %08X", size);
69 ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: %08X", base); 69 ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: %08X", base);
70 MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, nullptr, PageType::Special); 70 MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, nullptr, PageType::Special);
@@ -72,7 +72,7 @@ void MapIoRegion(PageTable& page_table, VAddr base, u32 size, MMIORegionPointer
72 page_table.special_regions.emplace_back(SpecialRegion{base, size, mmio_handler}); 72 page_table.special_regions.emplace_back(SpecialRegion{base, size, mmio_handler});
73} 73}
74 74
75void UnmapRegion(PageTable& page_table, VAddr base, u32 size) { 75void UnmapRegion(PageTable& page_table, VAddr base, u64 size) {
76 ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: %08X", size); 76 ASSERT_MSG((size & PAGE_MASK) == 0, "non-page aligned size: %08X", size);
77 ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: %08X", base); 77 ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: %08X", base);
78 MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, nullptr, PageType::Unmapped); 78 MapPages(page_table, base / PAGE_SIZE, size / PAGE_SIZE, nullptr, PageType::Unmapped);
@@ -334,7 +334,7 @@ u8* GetPhysicalPointer(PAddr address) {
334 return target_pointer; 334 return target_pointer;
335} 335}
336 336
337void RasterizerMarkRegionCached(PAddr start, u32 size, int count_delta) { 337void RasterizerMarkRegionCached(PAddr start, u64 size, int count_delta) {
338 if (start == 0) { 338 if (start == 0) {
339 return; 339 return;
340 } 340 }
@@ -413,13 +413,13 @@ void RasterizerMarkRegionCached(PAddr start, u32 size, int count_delta) {
413 } 413 }
414} 414}
415 415
416void RasterizerFlushRegion(PAddr start, u32 size) { 416void RasterizerFlushRegion(PAddr start, u64 size) {
417 if (VideoCore::g_renderer != nullptr) { 417 if (VideoCore::g_renderer != nullptr) {
418 VideoCore::g_renderer->Rasterizer()->FlushRegion(start, size); 418 VideoCore::g_renderer->Rasterizer()->FlushRegion(start, size);
419 } 419 }
420} 420}
421 421
422void RasterizerFlushAndInvalidateRegion(PAddr start, u32 size) { 422void RasterizerFlushAndInvalidateRegion(PAddr start, u64 size) {
423 // Since pages are unmapped on shutdown after video core is shutdown, the renderer may be 423 // Since pages are unmapped on shutdown after video core is shutdown, the renderer may be
424 // null here 424 // null here
425 if (VideoCore::g_renderer != nullptr) { 425 if (VideoCore::g_renderer != nullptr) {
@@ -427,7 +427,7 @@ void RasterizerFlushAndInvalidateRegion(PAddr start, u32 size) {
427 } 427 }
428} 428}
429 429
430void RasterizerFlushVirtualRegion(VAddr start, u32 size, FlushMode mode) { 430void RasterizerFlushVirtualRegion(VAddr start, u64 size, FlushMode mode) {
431 // Since pages are unmapped on shutdown after video core is shutdown, the renderer may be 431 // Since pages are unmapped on shutdown after video core is shutdown, the renderer may be
432 // null here 432 // null here
433 if (VideoCore::g_renderer != nullptr) { 433 if (VideoCore::g_renderer != nullptr) {
diff --git a/src/core/memory.h b/src/core/memory.h
index 71ba487fc..91bd4d889 100644
--- a/src/core/memory.h
+++ b/src/core/memory.h
@@ -45,7 +45,7 @@ enum class PageType {
45 45
46struct SpecialRegion { 46struct SpecialRegion {
47 VAddr base; 47 VAddr base;
48 u32 size; 48 u64 size;
49 MMIORegionPointer handler; 49 MMIORegionPointer handler;
50}; 50};
51 51
@@ -247,17 +247,17 @@ u8* GetPhysicalPointer(PAddr address);
247 * Adds the supplied value to the rasterizer resource cache counter of each 247 * Adds the supplied value to the rasterizer resource cache counter of each
248 * page touching the region. 248 * page touching the region.
249 */ 249 */
250void RasterizerMarkRegionCached(PAddr start, u32 size, int count_delta); 250void RasterizerMarkRegionCached(PAddr start, u64 size, int count_delta);
251 251
252/** 252/**
253 * Flushes any externally cached rasterizer resources touching the given region. 253 * Flushes any externally cached rasterizer resources touching the given region.
254 */ 254 */
255void RasterizerFlushRegion(PAddr start, u32 size); 255void RasterizerFlushRegion(PAddr start, u64 size);
256 256
257/** 257/**
258 * Flushes and invalidates any externally cached rasterizer resources touching the given region. 258 * Flushes and invalidates any externally cached rasterizer resources touching the given region.
259 */ 259 */
260void RasterizerFlushAndInvalidateRegion(PAddr start, u32 size); 260void RasterizerFlushAndInvalidateRegion(PAddr start, u64 size);
261 261
262enum class FlushMode { 262enum class FlushMode {
263 /// Write back modified surfaces to RAM 263 /// Write back modified surfaces to RAM
@@ -270,6 +270,6 @@ enum class FlushMode {
270 * Flushes and invalidates any externally cached rasterizer resources touching the given virtual 270 * Flushes and invalidates any externally cached rasterizer resources touching the given virtual
271 * address region. 271 * address region.
272 */ 272 */
273void RasterizerFlushVirtualRegion(VAddr start, u32 size, FlushMode mode); 273void RasterizerFlushVirtualRegion(VAddr start, u64 size, FlushMode mode);
274 274
275} // namespace Memory 275} // namespace Memory
diff --git a/src/core/memory_setup.h b/src/core/memory_setup.h
index c58baa50b..ff4dcc936 100644
--- a/src/core/memory_setup.h
+++ b/src/core/memory_setup.h
@@ -17,7 +17,7 @@ namespace Memory {
17 * @param size The amount of bytes to map. Must be page-aligned. 17 * @param size The amount of bytes to map. Must be page-aligned.
18 * @param target Buffer with the memory backing the mapping. Must be of length at least `size`. 18 * @param target Buffer with the memory backing the mapping. Must be of length at least `size`.
19 */ 19 */
20void MapMemoryRegion(PageTable& page_table, VAddr base, u32 size, u8* target); 20void MapMemoryRegion(PageTable& page_table, VAddr base, u64 size, u8* target);
21 21
22/** 22/**
23 * Maps a region of the emulated process address space as a IO region. 23 * Maps a region of the emulated process address space as a IO region.
@@ -26,7 +26,7 @@ void MapMemoryRegion(PageTable& page_table, VAddr base, u32 size, u8* target);
26 * @param size The amount of bytes to map. Must be page-aligned. 26 * @param size The amount of bytes to map. Must be page-aligned.
27 * @param mmio_handler The handler that backs the mapping. 27 * @param mmio_handler The handler that backs the mapping.
28 */ 28 */
29void MapIoRegion(PageTable& page_table, VAddr base, u32 size, MMIORegionPointer mmio_handler); 29void MapIoRegion(PageTable& page_table, VAddr base, u64 size, MMIORegionPointer mmio_handler);
30 30
31void UnmapRegion(PageTable& page_table, VAddr base, u32 size); 31void UnmapRegion(PageTable& page_table, VAddr base, u64 size);
32} 32}