bunnei
6b333d862b
fermi_2d: Add support for more accurate surface copies.
2018-10-18 22:41:12 -04:00
bunnei
fdd82b754a
Merge pull request #1523 from lioncash/lock
...
svc: Add missing error checks in svcArbitrateLock/svcArbitrateUnlock
2018-10-18 21:50:45 -04:00
bunnei
7f152f2273
Merge pull request #1511 from lioncash/content
...
content_archive: Minor reorganization changes
2018-10-18 21:48:09 -04:00
bunnei
e5d428cf1e
Merge pull request #1521 from ogniK5377/imp-mmu
...
Used better names for mm:u and fixed a bad stub
2018-10-18 21:46:59 -04:00
Lioncash
4b5ae8dbaa
svc: Check for word alignment of addresses within svcArbitrateLock/svcArbitrateUnlock
...
The kernel itself checks whether or not the provided addresses are word
aligned before continuing, so we should be doing the same.
2018-10-18 13:01:29 -04:00
Lioncash
541e9624eb
common: Add function for checking word alignment to alignment.h
...
This will be used in a following change to svcArbitrateLock() and
svcArbitrateUnlock()
2018-10-18 12:58:27 -04:00
Lioncash
d27f4a4928
common: Move Is4KBAligned() to alignment.h
...
Aligning on 4KB pages isn't a Switch-specific thing, so this can be
moved to common so it can be used with other things as well.
2018-10-18 12:57:02 -04:00
Lioncash
f109615be0
core: Remove unnecessary assert in ArmInterface()
...
CpuCore already does this sort of checking, so we can just call that
instead of duplicating the assertions.
2018-10-18 12:07:25 -04:00
bunnei
d4ff4152ad
Merge pull request #1510 from lioncash/xci
...
XCI: Add function for checking the existence of the program NCA
2018-10-18 11:51:47 -04:00
bunnei
6acd8d166a
Merge pull request #1505 from FernandoS27/tex-3d
...
Implemented 3D Textures
2018-10-18 11:50:42 -04:00
David Marcec
98c7a6d622
Used better names for mm:u and fixed bad stub
...
InitializeWithId needs to return an id which is a u32 which should be a non zero value
2018-10-19 01:09:34 +11:00
Lioncash
33830aa65a
svc: Add missing sanitizing checks for MapSharedMemory/UnmapSharedMemory
...
Now that the changes clarifying the address spaces has been merged, we
can wrap the checks that the kernel performs when mapping shared memory
(and other forms of memory) into its own helper function and then use
those within MapSharedMemory and UnmapSharedMemory to complete the
sanitizing checks that are supposed to be done.
2018-10-18 02:01:21 -04:00
Lioncash
452aa30cb7
hid/controller: Remove unused header inclusions
...
swap.h only needs to be present in the header for the type aliases and
definitions, it's not actually needed in the cpp files though. input.h
is just unused entirely in xpad.h
2018-10-17 20:52:45 -04:00
Lioncash
7f52dc1790
hid/controller/npad: Remove unused dump_idx member variable
...
Given it's unused, we may as well toss it.
2018-10-17 20:52:45 -04:00
Lioncash
7eb2328d8e
hid/controller/npad: Remove unnecessary semicolon from the closing brace of LedPattern's constructor
2018-10-17 20:52:45 -04:00
Lioncash
929ed59f1f
hid/controller/npad: Remove #pragma once from the cpp file
...
This is only useful in headers.
2018-10-17 20:52:45 -04:00
Lioncash
aeda743446
hid/controller/npad: Move npad_id_list into the cpp file
...
This is just a lookup table, and since it's private, there's nothing
really stateful about it, so we can just move it into the cpp file.
2018-10-17 20:52:45 -04:00
Lioncash
aeca224890
hid/controller/npad: Remove unnecessary const from void return type
...
This literally does nothing.
2018-10-17 20:52:45 -04:00
Lioncash
46202e984e
hid/controller: Default the destructors of all controller types in the cpp file
...
These classes are non-trivial and are definitely going to be changed in
the future, so we default these to prevent issues with forward
declarations, and to keep the compiler from inlining tear-down code.
2018-10-17 20:52:43 -04:00
Lioncash
119b47f366
controller_base: Default the base class constructor and destructor in the cpp file
...
The destructor doesn't need to be a pure-virtual function.
2018-10-17 20:51:54 -04:00
bunnei
7dee60d7d2
Merge pull request #1444 from ogniK5377/better-hid
...
"Better Hid" Rework Part 1
2018-10-17 20:25:17 -04:00
bunnei
77e2d68df7
Merge pull request #1489 from FernandoS27/fix-tlds
...
shader_decompiler: Fix TLDS
2018-10-17 18:58:38 -04:00
FernandoS27
caaa9914fd
Clang format and other fixes
2018-10-17 18:52:11 -04:00
FernandoS27
cb9fdc7a26
Implement Reinterpret Surface, to accurately blit 3D textures
2018-10-17 18:52:10 -04:00
FernandoS27
dbc34db6ce
Implement GetInRange in the Rasterizer Cache
2018-10-17 18:52:10 -04:00
FernandoS27
fd9e2d0073
Implement 3D Textures
2018-10-17 18:52:08 -04:00
bunnei
f912a82a8e
Merge pull request #1497 from bunnei/flush-framebuffers
...
Implement flushing in the rasterizer cache
2018-10-17 18:40:34 -04:00
bunnei
6e8752881c
Merge pull request #1498 from lioncash/aslr
...
svc: Clarify enum values for AddressSpaceBaseAddr and AddressSpaceSize in svcGetInfo()
2018-10-17 18:31:51 -04:00
bunnei
86dcf2942b
Merge pull request #1496 from FernandoS27/tex-array
...
Implement Arrays on Tex Instruction
2018-10-17 18:30:44 -04:00
bunnei
afe22d8405
Merge pull request #1509 from DarkLordZach/device-save-data
...
savedata_factory: Add DeviceSaveData and fix TemporaryStorage
2018-10-17 18:22:05 -04:00
bunnei
648b55c6b9
gl_rasterizer_cache: Remove unnecessary block_depth=1 on Flush.
2018-10-17 18:20:15 -04:00
bunnei
2a035a1f6f
gl_rasterizer_cache: Remove unnecessary temporary buffer with unswizzle.
2018-10-17 18:19:35 -04:00
David Marcec
8144fa42bd
Using dual joycons as the default controller
...
Reason for the change is to allow both docked and undocked mode to work
2018-10-18 00:11:47 +11:00
bunnei
43b9494a0f
gl_rasterizer_cache: Use AccurateCopySurface for use_accurate_gpu_emulation.
2018-10-16 17:20:49 -04:00
bunnei
ee7c2dbf5a
config: Rename use_accurate_framebuffers -> use_accurate_gpu_emulation.
...
- This will be used as a catch-all for slow-but-accurate GPU emulation paths.
2018-10-16 17:02:29 -04:00
bunnei
91602de7f2
rasterizer_cache: Refactor to support in-order flushing.
2018-10-16 16:51:53 -04:00
Lioncash
871350ae35
content_archive: Simpify assignment of bktr_base_romfs in the constructor
...
std::move doesn't actually dereference the data, so it doesn't matter
whether or not the type is null.
2018-10-16 13:22:31 -04:00
Lioncash
441b5b97bd
content_archive: Make IsValidNCA() an internally linked function
...
This is only ever used within the cpp file, so it can just be an
internal function.
2018-10-16 13:22:31 -04:00
Lioncash
53e77ffbfe
content_archive: Simplify rights ID check
...
This is the same as using std::any_of with an inverted predicate.
2018-10-16 13:22:31 -04:00
Lioncash
d6604fa765
content_archive: Split loading into separate functions
...
The constructor alone is pretty large, the reading code should be split
into its consistuent parts to make it easier to understand it without
having to build a mental model of a 300+ line function.
2018-10-16 13:22:28 -04:00
Lioncash
4783ad54de
content_archive: Pass and take NCASectionHeader instance by reference
...
Each header is 512 bytes in size, which is kind of an excessive amount
to copy all the time when it's possible to avoid doing so.
2018-10-16 12:08:17 -04:00
Lioncash
73e1e929a2
XCI: Add function for checking the existence of the program NCA
...
The only reason the getter existed was to check whether or not the
program NCA was null. Instead, we can just provide a function to query
for the existence of it, instead of exposing it entirely.
2018-10-16 11:36:58 -04:00
bunnei
0e59291310
gl_rasterizer_cache: Refactor to only call GetRegionEnd on surface creation.
2018-10-16 11:31:02 -04:00
bunnei
949d7832fa
gl_rasterizer_cache: Only flush when use_accurate_framebuffers is enabled.
2018-10-16 11:31:02 -04:00
bunnei
5f79ba04bd
gl_rasterizer_cache: Separate guest and host surface size managment.
2018-10-16 11:31:01 -04:00
bunnei
58be4dff79
gl_rasterizer_cache: Rename GetGLBytesPerPixel to GetBytesPerPixel.
...
- This does not really have anything to do with OpenGL.
2018-10-16 11:31:01 -04:00
bunnei
cf7b46c101
gl_rasterizer_cache: Remove unused FlushSurface method.
2018-10-16 11:31:01 -04:00
bunnei
3afdfd7bfa
gl_rasterizer: Implement flushing.
2018-10-16 11:31:01 -04:00
bunnei
b4e29ccb81
gl_rasterizer_cache: Remove usage of Memory::Read/Write functions.
...
- These cannot be used within the cache, as they change cache state.
2018-10-16 11:31:00 -04:00
bunnei
4e9683e9d5
gl_rasterizer_cache: Clamp cached surface size to mapped GPU region size.
2018-10-16 11:31:00 -04:00
bunnei
37575eae65
memory_manager: Add a method for querying the end of a mapped GPU region.
2018-10-16 11:31:00 -04:00
bunnei
0be7e82289
rasterizer_cache: Reintroduce method for flushing.
2018-10-16 11:31:00 -04:00
bunnei
9b929e934b
gl_rasterizer_cache: Reintroduce code for handling swizzle and flush to guest RAM.
2018-10-16 11:30:59 -04:00
bunnei
78f2a6a9e1
Merge pull request #1443 from DarkLordZach/lower-loader-logs-1
...
content_archive/patch_manager: Lower log levels to eliminate some unnecessary logs
2018-10-16 11:26:54 -04:00
David
92d8ad3770
Implement VI ConvertScalingMode ( #1475 )
...
* Implement VI ConvertScalingMode
* Fixed push enum
* Scale mode now uses Nintendo scale mode as an enum as well
2018-10-16 11:25:42 -04:00
bunnei
88b8383da2
Merge pull request #1502 from lioncash/unique
...
core: Convert shared_ptr instances into unique_ptr instances where applicable for System and Cpu
2018-10-16 11:21:42 -04:00
Zach Hilman
9d4e6176eb
savedata_factory: Add TemporaryStorage SaveDataSpaceId
...
Required for TemporaryStorage saves (in addition to SaveDataType)
2018-10-16 10:20:04 -04:00
Zach Hilman
74890cf2da
savedata_factory: Add support for DeviceSaveData
...
Uses the same path as SaveData except with UID 0. Adds a warning if UID is not 0.
2018-10-16 10:19:21 -04:00
Lioncash
39ae73b356
file_sys/registered_cache: Use unique_ptr and regular pointers instead of shared_ptrs where applicable
...
The data retrieved in these cases are ultimately chiefly owned by either
the RegisteredCache instance itself, or the filesystem factories. Both
these should live throughout the use of their contained data. If they
don't, it should be considered an interface/design issue, and using
shared_ptr instances here would mask that, as the data would always be
prolonged after the main owner's lifetime ended.
This makes the lifetime of the data explicit and makes it harder to
accidentally create cyclic references. It also makes the interface
slightly more flexible than the previous API, as a shared_ptr can be
created from a unique_ptr, but not the other way around, so this allows
for that use-case if it ever becomes necessary in some form.
2018-10-16 09:38:52 -04:00
bunnei
548958bcaf
Merge pull request #1473 from lioncash/cmake
...
web_service: Make linkage of web_service-related externals and the library private
2018-10-15 21:33:32 -04:00
bunnei
870c18b078
Merge pull request #1487 from lioncash/maybe-unused
...
yuzu/main: Apply the [[maybe_unused]] attribute to the parameter of SetDiscordEnabled
2018-10-15 21:33:14 -04:00
Lioncash
76fc8b59b2
file_sys/control_metadata: Get rid of magic constants
...
These are just the size of the data being passed in, so we can specify
that via the size() member function.
2018-10-15 20:11:44 -04:00
bunnei
9b21fbd1eb
Merge pull request #1494 from DarkLordZach/aoc-signature-fixes
...
aoc: Fix various bugs in current AOC implementation
2018-10-15 18:34:02 -04:00
bunnei
50e6205c21
Merge pull request #1499 from lioncash/nro
...
nro/nso: Minor error handling changes
2018-10-15 17:48:36 -04:00
bunnei
7665411317
Merge pull request #1500 from DarkLordZach/key-derivation-6.0.0
...
crypto: Various crypto fixes for quickstart guide
2018-10-15 17:48:13 -04:00
Lioncash
bed872ed38
nso: Return an optional address from LoadModule
...
If a malformed NSO is attempted to be loaded, we shouldn't continue
onwards. We should be reporting an error and bailing out.
2018-10-15 17:02:11 -04:00
ReinUsesLisp
936c36a514
shader_bytecode: Add Control Code enum 0xf
...
Control Code 0xf means to unconditionally execute the instruction. This
value is passed to most BRA, EXIT and SYNC instructions (among others)
but this may not always be the case.
2018-10-15 15:36:47 -03:00
ReinUsesLisp
b461342a84
gl_shader_decompiler: Fixup style inconsistencies
2018-10-15 15:35:26 -03:00
ReinUsesLisp
27916764b1
gl_rasterizer: Silence implicit cast warning in glBindBufferRange
2018-10-15 15:26:50 -03:00
Lioncash
5484742fda
core_cpu: Make Cpu scheduler instances unique_ptrs instead of shared_ptrs
2018-10-15 14:15:56 -04:00
Lioncash
59f872a8e0
core: Make the live Cpu instances unique_ptrs instead of shared_ptrs
...
There's no need for shared ownership here, as the only owning class
instance of those Cpu instances is the System class itself. We can also
make the thread_to_cpu map use regular pointers instead of shared_ptrs,
given that the Cpu instances will always outlive the cases where they're
used with that map.
2018-10-15 14:15:56 -04:00
Lioncash
aeadbfa790
core: Make the exclusive monitor a unique_ptr instead of a shared_ptr
...
Like the barrier, this is owned entirely by the System and will always
outlive the encompassing state, so shared ownership semantics aren't
necessary here.
2018-10-15 14:15:50 -04:00
Lioncash
c34efbbd60
core: Make CPUBarrier a unique_ptr instead of a shared_ptr
...
This will always outlive the Cpu instances, since it's destroyed after
we destroy the Cpu instances on shutdown, so there's no need for shared
ownership semantics here.
2018-10-15 09:11:47 -04:00
ReinUsesLisp
6312eec5ef
gl_shader_decompiler: Implement HSET2_R
2018-10-15 02:55:51 -03:00
ReinUsesLisp
4fc8ad67bf
gl_shader_decompiler: Implement HSETP2_R
2018-10-15 02:55:51 -03:00
ReinUsesLisp
3d65aa4caf
gl_shader_decompiler: Implement HFMA2 instructions
2018-10-15 02:55:51 -03:00
ReinUsesLisp
d93cdc2750
gl_shader_decompiler: Implement HADD2_IMM and HMUL2_IMM
2018-10-15 02:07:16 -03:00
ReinUsesLisp
d46e2a6e7a
gl_shader_decompiler: Implement non-immediate HADD2 and HMUL2 instructions
2018-10-15 02:04:31 -03:00
ReinUsesLisp
08d751d882
gl_shader_decompiler: Setup base for half float unpacking and setting
2018-10-15 01:58:30 -03:00
Zach Hilman
720d36ca71
crypto: Various crypto fixes for quickstart guide
2018-10-14 21:57:52 -04:00
Lioncash
bb9cf8a127
nso: Make LoadModule take a VfsFile by const reference
2018-10-14 20:38:19 -04:00
Lioncash
0732786ddc
nro: Make LoadNro take a VfsFile by const reference
...
This function doesn't need to care about ownership semantics, so we can
just pass it a reference to the file itself, rather than a
std::shared_ptr alias.
2018-10-14 20:24:18 -04:00
Lioncash
90f8474fc1
svc: Clarify enum values for AddressSpaceBaseAddr and AddressSpaceSize in svcGetInfo()
...
So, one thing that's puzzled me is why the kernel seemed to *not* use
the direct code address ranges in some cases for some service functions.
For example, in svcMapMemory, the full address space width is compared
against for validity, but for svcMapSharedMemory, it compares against
0xFFE00000, 0xFF8000000, and 0x7FF8000000 as upper bounds, and uses
either 0x200000 or 0x8000000 as the lower-bounds as the beginning of the
compared range. Coincidentally, these exact same values are also used in
svcGetInfo, and also when initializing the user address space, so this
is actually retrieving the ASLR extents, not the extents of the address
space in general.
2018-10-14 20:11:16 -04:00
Zach Hilman
5737441374
aoc: Read DLC base title ID from RegisteredCache
...
Falls back to title ID + 0x1000, which is what HOS does.
2018-10-14 18:58:14 -04:00
bunnei
b3cca34f50
Merge pull request #1486 from lioncash/file
...
key_manager/partition_data_manager: Minor changes
2018-10-14 14:46:47 -04:00
bunnei
3203193a67
Merge pull request #1490 from lioncash/boot
...
yuzu/main: Simplify OnMenuLoadFile()
2018-10-14 14:44:49 -04:00
bunnei
14286f70f0
Merge pull request #1488 from Hexagon12/astc-types
...
video_core: Added ASTC 5x4; 8x5 types
2018-10-14 14:44:24 -04:00
bunnei
0d2ba0a320
Merge pull request #1491 from lioncash/reference
...
filesystem: Make CreateFactories() and InstallInterface() take a VfsFilesystem by reference
2018-10-14 14:42:57 -04:00
bunnei
b82bbfba77
Merge pull request #1480 from FernandoS27/neue-swizzle
...
Introduce 3D Swizzle seamlessly
2018-10-14 14:42:38 -04:00
bunnei
2f8ca32020
Merge pull request #1492 from lioncash/proc
...
svc: Implement svcGetProcessInfo
2018-10-14 14:37:58 -04:00
FernandoS27
1d6559fbd3
Implement Arrays on Tex Instruction
2018-10-14 13:31:02 -04:00
David Marcec
92fae7e1ab
Stop all threads on svcBreak
...
This should help diagnose crashes easier and prevent many users thinking that a game is still running when in fact it's just an audio thread still running(this is typically not killed when svcBreak is hit since the game expects us to do this)
2018-10-14 18:14:51 +11:00
Zach Hilman
7e2096db8a
aoc: Return size in ListAddOnContent
2018-10-13 22:52:54 -04:00
FernandoS27
d880b77698
Fix TLDS
2018-10-13 22:14:25 -04:00
FernandoS27
331ce2942c
Shorten the implementation of 3D swizzle to only 3 functions
2018-10-13 20:58:00 -04:00
Lioncash
1c7a7ed79b
svc: Implement svcGetProcessInfo
...
A fairly basic service function, which only appears to currently support
retrieving the process state. This also alters the ProcessStatus enum to
contain all of the values that a kernel process seems to be able of
reporting with regards to state.
2018-10-13 17:00:43 -04:00
FernandoS27
1ff20d8538
Fix a Crash on Zelda BotW and Splatoon 2, and simplified LoadGLBuffer
2018-10-13 16:11:11 -04:00
FernandoS27
e0ca938b22
Propagate depth and depth_block on modules using decoders
2018-10-13 15:25:18 -04:00
FernandoS27
d4ae43f9c1
Remove old Swizzle algorithms and use 3d Swizzle
2018-10-13 15:25:17 -04:00
FernandoS27
4d959c6bdc
Implement Precise 3D Swizzle
2018-10-13 15:25:16 -04:00