Commit Graph

89 Commits

Author SHA1 Message Date
Lioncash
517c1a14be renderer_base: Make Rasterizer() return the rasterizer by reference
All calling code assumes that the rasterizer will be in a valid state,
which is a totally fine assumption. The only way the rasterizer wouldn't
be is if initialization is done incorrectly or fails, which is checked
against in System::Init().
2018-08-04 02:36:58 -04:00
Lioncash
ec1683de24 video_core: Eliminate the g_renderer global variable
We move the initialization of the renderer to the core class, while
keeping the creation of it and any other specifics in video_core. This
way we can ensure that the renderer is initialized and doesn't give
unfettered access to the renderer. This also makes dependencies on types
more explicit.

For example, the GPU class doesn't need to depend on the
existence of a renderer, it only needs to care about whether or not it
has a rasterizer, but since it was accessing the global variable, it was
also making the renderer a part of its dependency chain. By adjusting
the interface, we can get rid of this dependency.
2018-08-04 02:36:57 -04:00
Lioncash
e418946cc8 memory: Remove unused GetSpecialHandlers() function
This is just unused code, so we may as well get rid of it.
2018-08-03 14:20:50 -04:00
Lioncash
8c59ac62e0 core/memory: Get rid of 3DS leftovers
Removes leftover code from citra that isn't needed.
2018-08-03 11:22:47 -04:00
bunnei
d1e52e2b4e Merge pull request #690 from lioncash/move
core/memory, core/hle/kernel: Use std::move where applicable
2018-07-18 20:55:55 -07:00
Lioncash
83620616b9 core/memory: Remove unused function GetSpecialHandlers() and an unused variable in ZeroBlock() 2018-07-18 19:55:46 -04:00
Lioncash
3bac924c46 core/memory, core/hle/kernel: Use std::move where applicable
Avoids pointless copies
2018-07-18 19:34:31 -04:00
James Rowe
489e98954c Update clang format 2018-07-02 21:45:47 -04:00
James Rowe
847a518200 Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
Michael Scire
4eea5e2907 Kernel/Arbiters: Fix casts, cleanup comments/magic numbers 2018-06-22 00:47:59 -06:00
bunnei
c5e0d82b9c core: Implement multicore support. 2018-05-10 19:34:46 -04:00
Lioncash
dbd0182410 general: Make formatting of logged hex values more straightforward
This makes the formatting expectations more obvious (e.g. any zero padding specified
is padding that's entirely dedicated to the value being printed, not any pretty-printing
that also gets tacked on).
2018-05-02 09:49:36 -04:00
Lioncash
39f224d92b general: Convert assertion macros over to be fmt-compatible 2018-04-27 10:04:02 -04:00
bunnei
0bd82a2e80 Merge pull request #387 from Subv/maxwell_2d
GPU: Partially implemented the 2D surface copy engine
2018-04-25 20:40:17 -04:00
Subv
9ff3dd3c07 Memory: Added a missing shortcut for Memory::CopyBlock for the current process. 2018-04-25 11:55:30 -05:00
Lioncash
d6897a6d28 core/memory: Amend address widths in asserts
Addresses are 64-bit, these formatting specifiers are simply holdovers from citra. Adjust them to be the correct width.
2018-04-25 12:17:26 -04:00
Lioncash
57a9b05fc6 core/memory: Move logging macros over to new fmt-capable ones
While we're at it, correct addresses to print all 64 bits where applicable, which were holdovers from citra.
2018-04-25 12:16:33 -04:00
bunnei
616a16fa46 gl_rasterizer_cache: Update to be based on GPU addresses, not CPU addresses. 2018-04-24 22:31:45 -04:00
bunnei
3e28cb9b06 memory: Fix cast for ReadBlock/WriteBlock/ZeroBlock/CopyBlock. 2018-03-26 21:17:01 -04:00
bunnei
2faa69a903 memory: Add RasterizerMarkRegionCached code and cleanup. 2018-03-26 21:16:57 -04:00
bunnei
da43725f1a Merge pull request #265 from bunnei/tegra-progress-2
Tegra progress 2
2018-03-23 23:30:48 -04:00
bunnei
99101a9e63 memory: Fix typo in RasterizerFlushVirtualRegion. 2018-03-23 15:46:21 -04:00
bunnei
d9900b0513 memory: RasterizerFlushVirtualRegion should also check process image region. 2018-03-23 15:10:02 -04:00
bunnei
245d7b4355 rasterizer: Flush and invalidate regions should be 64-bit. 2018-03-23 15:01:45 -04:00
bunnei
5fb8e6bcdf memory: Port RasterizerFlushVirtualRegion from Citra. 2018-03-22 22:56:41 -04:00
N00byKing
90e61a680d Remove more N3DS References 2018-03-22 21:25:06 +01:00
bunnei
b95c68cc67 core: Move process creation out of global state. 2018-03-14 18:42:19 -04:00
MerryMage
9d6a60ccf5 memory: LOG_ERROR when falling off end of page table 2018-02-21 21:39:07 +00:00
Lioncash
97d7275928 memory: Silence formatting sepecifier warnings 2018-02-14 01:54:54 -05:00
MerryMage
ceb3d0a5f2 memory: Replace all memory hooking with Special regions 2018-01-27 15:16:39 +00:00
Rozlette
39cfea14d0 memory: Return false for large VAddr in IsValidVirtualAddress 2018-01-20 14:56:15 -06:00
James Rowe
244f7dc4d5 Remove gpu debugger and get yuzu qt to compile 2018-01-12 19:11:04 -07:00
MerryMage
2fd6ff0dba fix macos build 2018-01-08 19:20:10 -05:00
bunnei
9fe6878c42 core/video_core: Fix a bunch of u64 -> u32 warnings. 2018-01-01 15:40:35 -05:00
bunnei
f18bb75026 memory: Print addresses as 64-bit. 2017-10-18 21:29:23 -04:00
bunnei
45b7723c75 Merge remote-tracking branch 'upstream/master' into nx
# Conflicts:
#	src/core/CMakeLists.txt
#	src/core/arm/dynarmic/arm_dynarmic.cpp
#	src/core/arm/dyncom/arm_dyncom.cpp
#	src/core/hle/kernel/process.cpp
#	src/core/hle/kernel/thread.cpp
#	src/core/hle/kernel/thread.h
#	src/core/hle/kernel/vm_manager.cpp
#	src/core/loader/3dsx.cpp
#	src/core/loader/elf.cpp
#	src/core/loader/ncch.cpp
#	src/core/memory.cpp
#	src/core/memory.h
#	src/core/memory_setup.h
2017-10-09 23:56:20 -04:00
Subv
451b64f968 Memory: Make WriteBlock take a Process parameter on which to operate 2017-10-01 14:18:36 -05:00
Subv
05d1a1171d Memory: Make ReadBlock take a Process parameter on which to operate 2017-10-01 14:18:36 -05:00
bunnei
6b93de6be9 memory: Log with 64-bit values. 2017-09-30 14:28:54 -04:00
bunnei
652ea40eea core: Various changes to support 64-bit addressing. 2017-09-30 14:28:54 -04:00
Huw Pascoe
40a7357877 Fixed type conversion ambiguity 2017-09-30 09:34:35 +01:00
bunnei
79268bf37d Merge pull request #2961 from Subv/load_titles
Loaders: Don't automatically set the current process every time we load an application.
2017-09-29 14:58:42 -04:00
James Rowe
1917c7eca7 Merge pull request #2954 from Subv/cache_unmapped_mem
Memory/RasterizerCache: Ignore unmapped memory regions when caching physical regions
2017-09-26 16:55:47 -06:00
Subv
ebdce7bbe7 Memory: Allow IsValidVirtualAddress to be called with a specific process parameter.
There is still an overload of IsValidVirtualAddress that only takes the VAddr and will default to the current process.
2017-09-26 17:27:44 -05:00
Subv
0b46ccfcf0 Memory/RasterizerCache: Ignore unmapped memory regions when caching physical regions.
Not all physical regions need to be mapped into the address space of every process, for example, system modules do not have a VRAM mapping.

This fixes a crash when loading applets and system modules.
2017-09-25 19:37:45 -05:00
MerryMage
fd651bd4d6 ARM_Interface: Implement PageTableChanged 2017-09-24 23:08:25 +01:00
MerryMage
3e851387cf memory: Remove GetCurrentPageTablePointers 2017-09-24 22:43:28 +01:00
MerryMage
82f6386ab3 memory: Add GetCurrentPageTable/SetCurrentPageTable
Don't expose Memory::current_page_table as a global.
2017-09-24 22:42:42 +01:00
B3n30
dc1db9d321 Merge pull request #2842 from Subv/switchable_page_table
Kernel/Memory: Give each process its own page table and allow switching the current page table upon reschedule
2017-09-15 22:41:45 +02:00
Subv
b27892dacb Kernel/Memory: Make IsValidPhysicalAddress not go through the current process' virtual memory mapping. 2017-09-15 14:26:18 -05:00