Commit Graph

6665 Commits (3476f5b4d38d31d6f17a335311a2fa814be8bf25)

Author SHA1 Message Date
Lioncash ff5024ee2a hle_ipc: Make WriteToOutgoingCommandBuffer()'s reference parameter const
This function doesn't modify anything within the reference Thread
instance.
7 years ago
bunnei 5c908c0373
Merge pull request #988 from lioncash/color
common/color: Minor cleanup
7 years ago
bunnei c333bfc193
Merge pull request #977 from bunnei/bgr565
gl_rasterizer_cached: Implement RenderTargetFormat::B5G6R5_UNORM.
7 years ago
Lioncash e831b80d69 gl_rasterizer_cache: Invert conditional in LoadGLBuffer()
It's generally easier to follow code using conditionals that operate in
terms of the true case followed by the false case (no chance of
overlooking the exclamation mark).
7 years ago
Lioncash 434f352eb3 gl_rasterizer_cache: Use std::vector::assign in LoadGLBuffer() for the non-tiled case
resize() causes the vector to expand and zero out the added members to
the vector, however we can avoid this zeroing by using assign().

Given we have the pointer to the data we want to copy, we can calculate
the end pointer and directly copy the range of data without the
need to perform the resize() beforehand.
7 years ago
bunnei 5b1b758326
Merge pull request #987 from lioncash/vec
vector_math: Use variable template version of is_signed in Vec classes
7 years ago
bunnei dfc3eed0cb maxwell_to_gl: Implement VertexAttribute::Size::Size_16_16_16_16.
- Used by Super Mario Odyssey (in game).
7 years ago
bunnei 06d0b96ca9 maxwell_to_gl: Implement PrimitiveTopology::Points.
- Used by Super Mario Odyssey (in game).
7 years ago
bunnei 4283019aa0 gl_shader_decompiler: Declare predicates on use.
- Used by Super Mario Odyssey (when going in game).
7 years ago
bunnei efe6b473c5 maxwell_3d: Ignore macros that have not been uploaded yet.
- Used by Super Mario Odyssey (in game).
7 years ago
Lioncash 557c466994 gl_rasterizer_cache: Make pointer const in LoadGLBuffer()
This is only ever read from, so we can make the data it's pointing to
const.
7 years ago
bunnei 25ba4d1b68
Merge pull request #982 from bunnei/stub-unk-63
gl_shader_decompiler: Stub input attribute Unknown_63.
7 years ago
Zach Hilman 668458525e vfs: Fix documentation 7 years ago
bunnei 2f4f4f147f
Merge pull request #986 from mailwl/acc-loadimage
Service/Account: stub LoadImage function
7 years ago
Zach Hilman 94cf327e77 vfs: Fix typo in VfsFilesystem docs 7 years ago
Zach Hilman 2b6128fe0b file_util: Use enum instead of bool for specifing path behavior 7 years ago
Zach Hilman dad2ae1ee0 loader: Remove unused IdentifyFile overload 7 years ago
Zach Hilman 656e97df16 vfs: Use RealVfsFilesystem for fs-operations in RealVfsDirectory 7 years ago
Zach Hilman 52a2e42cb9 file_sys: Add missing include in savedata_factory 7 years ago
Zach Hilman 4b471f0554 core: Port core to VfsFilesystem for file access 7 years ago
Zach Hilman aaa8fdea52 vfs: Add unreachable assert to file permissions converter 7 years ago
Zach Hilman 2de2ec25d6 vfs: Add RealVfsFilesystem implementation 7 years ago
Zach Hilman 3f82dad1e4 file_util: Add platform-specific slash option to SanitizePath 7 years ago
Zach Hilman 3bf488ce52 vfs: Add VfsFilesystem interface and default implementation 7 years ago
Zach Hilman b36dee364e filesystem: Remove unnecessary if conditions 7 years ago
bunnei ddec200290 gl_rasterizer: Do not render when no render target is configured.
- Used by Super Mario Odyssey.
7 years ago
bunnei cf917a5e93
Merge pull request #976 from bunnei/shader-imm
gl_shader_decompiler: Let OpenGL interpret floats.
7 years ago
bunnei 9ceceb212f
Merge pull request #981 from bunnei/cbuf-corrupt
maxwell_3d: Use correct const buffer size and check bounds.
7 years ago
bunnei 9f48454ea9
Merge pull request #978 from bunnei/fixioctl
nvhost_gpu: Don't over copy IoctlSubmitGpfifo.
7 years ago
Lioncash 7353cfc781 fsp_srv: Use std::string_view's copy() function instead of strncpy()
Given elements inserted into a vector are zeroed out, we can just copy
MAX_LEN - 1 elements and the data will already be properly null
terminated.
7 years ago
Lioncash 4afb05d0cc fsp_srv: Emplace entries first when building index instead of emplacing last
The current way were doing it would require copying a 768 character
buffer (part of the Entry struct) to the new element in the vector.
Given it's a plain array, std::move won't eliminate that.

Instead, we can emplace an instance directly into the destination buffer
and then fill it out, avoiding the need to perform any unnecessary
copies.

Given this is done in a loop, we can request the destination to allocate
all of the necessary memory ahead of time, avoiding the need to
potentially keep reallocating over and over on every few insertions into
the vector.
7 years ago
bunnei cc2526dd51
Merge pull request #985 from bunnei/rt-r11g11b10
gpu: Add R11G11B10_FLOAT to RenderTargetBytesPerPixel.
7 years ago
bunnei 096b04f1a4
Merge pull request #979 from bunnei/vtx88
maxwell_to_gl: Implement VertexAttribute::Size::Size_8_8.
7 years ago
bunnei 756e1e6f9b
Merge pull request #975 from bunnei/am-stub
am: Stub SetScreenShotImageOrientation.
7 years ago
Lioncash 6e90f0bf6a common/logging: Add missing service log categories
These weren't added when the services were introduced.
7 years ago
bunnei 599c011f40
Merge pull request #980 from bunnei/fix-logs
renderer_opengl: Use trace log in a few places.
7 years ago
Lioncash 5a9c00ea04 common/color: Remove unnecessary const qualifiers on return types
These are just superfluous and not necessesary
7 years ago
Lioncash 76197a4be9 common/color: Get rid of undefined behavior
Gets rid of type punning via reinterpret_cast within functions. Instead,
we use memcpy to transfer the contents across types.
7 years ago
Lioncash cc9d7bbf01 vector_math: Use variable template version of is_signed in Vec classes
Same behavior, less code
7 years ago
bunnei d224eb7c39
Merge pull request #966 from lioncash/modernize
common: Convert type traits templates over to variable template versions where applicable
7 years ago
bunnei fd9da4232b
Merge pull request #850 from DarkLordZach/icon-meta
Add Icons and Metadata Support
7 years ago
bunnei 507e6ae100
Merge pull request #968 from lioncash/vec
vector_math: Minor cleanups
7 years ago
bunnei 448264e719
Merge pull request #958 from lioncash/nv-global
nvdrv: Get rid of global std::weak_ptr
7 years ago
mailwl c0d44d3b2a Service/Account: stub LoadImage function 7 years ago
bunnei f156a45c01
Merge pull request #972 from lioncash/catch
externals: Update catch to 2.3.0
7 years ago
bunnei 6a5d032809
Merge pull request #965 from lioncash/unused-files
hle: Remove unused romfs.cpp/.h
7 years ago
bunnei 4941e3d412
Merge pull request #974 from lioncash/acc
acc: Add missing function table entries for GetUserCount
7 years ago
bunnei 7bf422d58c gpu: Add R11G11B10_FLOAT to RenderTargetBytesPerPixel.
- Used by Super Mario Odyssey.
7 years ago
mailwl 3c498189b6 hid: fix IsSixAxisSensorAtRest() response 7 years ago
bunnei 7f0d0a93f7 gl_shader_decompiler: Stub input attribute Unknown_63. 7 years ago
bunnei 57982df105 maxwell_3d: Use correct const buffer size and check bounds.
- Fixes mem corruption with Super Mario Odyssey and Pokkén Tournament DX.
7 years ago
bunnei 8c6338b6f9 renderer_opengl: Use trace log in a few places. 7 years ago
bunnei c120ed7d18 maxwell_to_gl: Implement VertexAttribute::Size::Size_8_8. 7 years ago
bunnei 0f834e2284 nvhost_gpu: Don't over copy IoctlSubmitGpfifo. 7 years ago
bunnei aaf8d9ac2f gl_rasterizer_cached: Implement RenderTargetFormat::B5G6R5_UNORM.
- Used by Super Mario Odyssey.
7 years ago
bunnei e542356d0c gl_shader_decompiler: Let OpenGL interpret floats.
- Accuracy is lost in translation to string, e.g. with NaN.
- Needed for Super Mario Odyssey.
7 years ago
bunnei b7fb9f2071 am: Stub SetScreenShotImageOrientation.
- Used by Super Mario Odyssey.
7 years ago
Lioncash 934a2b9604 acc: Add missing function table entries for GetUserCount
Given this is stubbed within the common module in
5ac7b84, it should be added to the other relevant tables as well.
7 years ago
bunnei 2bc296801a
acc: Stub GetUserCount. (#973)
- Used by Pokken Tournament DX.
7 years ago
bunnei 80cfd88e4e
Merge pull request #967 from lioncash/sign
file_util: Avoid sign-conversions in WriteArray() and ReadArray()
7 years ago
Lioncash d378d98e26 nvdrv: Get rid of global std::weak_ptr
Rather than use global state, we can simply pass the instance into the
NVFlinger instance directly.
7 years ago
Lioncash 766c1a2d50 vector_math: Remove unimplemented function prototypes 7 years ago
Lioncash 5c323d96e0 vector_math: Make functions constexpr where applicable 7 years ago
Lioncash 4e3bc37791 vector_math: Convert typedefs to type aliases 7 years ago
Lioncash a7d6efc520 common: Convert type traits templates over to variable template versions where applicable
Uses the C++17 inline variable variants
7 years ago
Lioncash cd1a96f389 hle: Remove unused romfs.cpp/.h
These files are no longer used, so we can get rid of them.
7 years ago
Lioncash 62b0b83fd8 externals: Update catch to 2.3.0
Updates the library from 2.2.3 to 2.3.0
7 years ago
bunnei 4fa3511a63
Merge pull request #964 from Hexagon12/lower-logs
Lowered down the logging for command processor methods
7 years ago
Hexagon12 7139f05fc5 Fixed the sRGB pixel format (#963)
* Changed the sRGB pixel format return

* Add a message about SRGBA -> RGBA conversion
7 years ago
Zach Hilman 1abfd4166e configure_gamelist: Use explicit QVariant constructor 7 years ago
bunnei b9829a05be
Merge pull request #920 from DarkLordZach/titlekey
content_archive: Add support for titlekey cryptography
7 years ago
bunnei 7ed8565978
Merge pull request #957 from lioncash/event
nvflinger: Correct typo in name of composition event
7 years ago
bunnei 6576bc8927
Merge pull request #954 from lioncash/hid
services/hid: Add ActivateNpadWithRevision() to the hid function info array
7 years ago
bunnei 2d57cbaec1
Merge pull request #960 from lioncash/apm
service/apm: Add the apm:sys service
7 years ago
bunnei 3242e7c164
Merge pull request #950 from lioncash/hotkey
qt/hotkey: Get rid of global hotkey map instance
7 years ago
bunnei 573a66c23d
Merge pull request #955 from lioncash/view
nvflinger: Use std::string_view in OpenDisplay()
7 years ago
bunnei 97c6f984dc
Merge pull request #953 from lioncash/time
service/time: Amend command IDs of ToPosixTime() and ToPosixTimeWithMyRule()
7 years ago
bunnei 07595987ac
Merge pull request #959 from KAMiKAZOW/cubeb-compilation
Make building cubeb optional
7 years ago
bunnei b09c4f45c7
Merge pull request #956 from lioncash/nv
nvdrv: Get rid of indirect inclusions
7 years ago
Lioncash 0735a0c8a1 file_util: Avoid sign-conversions in WriteArray() and ReadArray()
Prevents compiler warnings.
7 years ago
Hexagon12 bc6d91a103 Lowered down the logging for methods 7 years ago
bunnei c392650e21
Merge pull request #952 from lioncash/usb
service: Add usb services
7 years ago
bunnei 8f73f41824
Merge pull request #949 from lioncash/priv
client_port: Make all data members private
7 years ago
Zach Hilman 3e81c09094 loader: Fix scope error in DeconstructedRomDirectory 7 years ago
Lioncash 12ab5a0547 service/apm: Add the apm:sys service
Adds the basic skeleton of the apm:sys service based off the information
on Switch Brew.
7 years ago
Lioncash d3f64785d1 nvflinger: Correct typo in name of composition event 7 years ago
Lioncash 300ab211e8 nvdrv: Make Ioctl()'s definition match its prototype
The only reason this wasn't a compilation error is because we use
little-endian systems.
7 years ago
Lioncash fa8017295b nvdrv: Get rid of indirect inclusions 7 years ago
Lioncash e40b0cf437 nvflinger: Get rid of indirect inclusions 7 years ago
Lioncash 7e49881b7f nvflinger: Use std::string_view in OpenDisplay()
We don't need to use a std::string here, given all that's done is
comparing the character sequence against another. This allows passing
regular const char* without needing to heap allocate.
7 years ago
KAMiKAZOW 0f5c4615ae
Make building cubeb optional 7 years ago
Lioncash 890e543304 services/hid: Add ActivateNpadWithRevision() to the hid function info array
Updated based off the information on Switch Brew.
7 years ago
Lioncash 20c976ff2a service/time: Amend command IDs of ToPosixTime() and ToPosixTimeWithMyRule()
Updates the ID of these based off the information on Switch Brew.
7 years ago
Lioncash 45bc449ff9 service: Add usb services
Adds basic skeleton for the usb services based off the information provided by Switch Brew.
7 years ago
Lioncash c8f6754417 qt/hotkey: Get rid of global hotkey map instance
Instead, we make a proper registry class and house it within the main
window, then pass it to whatever needs access to the loaded hotkeys.

This way, we avoid a global variable, and don't need to initialize a
std::map instance before the program can do anything.
7 years ago
Zach Hilman 91cfe70301 loader: Add icon and title support to XCI 7 years ago
Zach Hilman 5927cf0e17 Use const where applicable 7 years ago
Zach Hilman 9e88f03e75 Avoid parsing RomFS to directory in NCA 7 years ago
Lioncash da2f00ab7d client_port: Make all data members private
These members don't need to be entirely exposed, we can instead expose
an API to operate on them without directly needing to mutate them

We can also guard against overflow/API misuse this way as well, given
active_sessions is an unsigned value.
7 years ago
bunnei 826b1394e8
Merge pull request #931 from DarkLordZach/nca-as-drd
loader: Make AppLoader_NCA rely on directory loading code
7 years ago
bunnei 0c3c91e41c
Merge pull request #947 from lioncash/encoding
game_list: Use QString::fromStdString() where applicable instead of c_str()
7 years ago
Hedges e2b74f6354 GDBStub works with both Unicorn and Dynarmic now (#941)
* GDBStub works with both Unicorn and Dynarmic now

* Tidy up
7 years ago
bunnei e218d79cc2
Merge pull request #943 from lioncash/decl
game_list: Join declarations and assignments in onTextChanged()
7 years ago
bunnei 75df8a3969
Merge pull request #946 from lioncash/compress
qt/main: Collapse if statement in UpdateRecentFiles()
7 years ago
bunnei 645d35ac32
Merge pull request #944 from lioncash/menu
qt: Don't show error dialog when canceling the Load Folder dialog
7 years ago
bunnei 168958f8e2
Merge pull request #942 from lioncash/default
qt: Minor cleanup-related changes
7 years ago
bunnei f179e87864
Merge pull request #940 from lioncash/private
kernel/event: Make data members private
7 years ago
bunnei cf82358ee6
Merge pull request #936 from bunnei/avoid-copies
gl_rasterizer_cache: Avoid superfluous surface copies.
7 years ago
bunnei 83ef37ca37
Merge pull request #934 from lioncash/chrono
core_timing: Make GetGlobalTimeUs() return std::chrono::microseconds
7 years ago
Lioncash 96b6ad11c1 qt/main: Avoid sign conversions in UpdateRecentFiles()
This was intermixing signed and unsigned values when they could all just
be signed.
7 years ago
Lioncash 10d693b9c2 game_list: Remove unnecessary conversion to std::string in ValidateEntry()
We can just use the file interfaces that Qt provides to prevent needing
to convert to std::string.
7 years ago
Lioncash a5ac53dd4c game_list: Use QString::fromStdString() where applicable instead of c_str()
The codec used by Qt for const char* and std::string don't necessarily
have to be the same depending on locale. Therefore, we should be using
the correct functions to do the conversions.
7 years ago
Lioncash 251e92513a game_list: Join declarations and assignments in onTextChanged()
There's no need to keep these separate from one another.
7 years ago
Lioncash cf983888cc qt/main: Collapse if statement in UpdateRecentFiles()
Given the function accepts a boolean, we don't need to use an if
statement here and repeat ourselves.
7 years ago
Lioncash 2b2dc00bfd qt/main: Better file-existence checking within OnMenuRecentFile() and UpdateUITheme()
In OnMenuRecentFile() we don't need to construct a QFileInfo instance
just to check if a file exists, we can just use the static member
function to do that (which Qt's documentation also notes as quicker than
constructing an instance).

In UpdateUITheme(), we just want to try and open the file and check the
success of that operation. Technically speaking, between the existence
check and the open call, the file can be deleted or moved, but still
appear to succeed in code. i.e.

1. Existence check -> Returns true
2. File is moved/deleted
3. Open is called, the return value of which isn't checked
4. Nonsense behavior

This way we combine the existence check and the open into one.
7 years ago
Lioncash d33f641912 qt: Don't show error dialog when canceling the Load Folder dialog
Previously, when canceling out of the Load Folder dialog, a user would
get an error dialog about the selected folder not containing a main
file, however, by canceling out of the dialog, no selection was actually
made.
7 years ago
Lioncash 9764b4ec0e qt/game_list_p: Remove redundant base class constructor invocations
These occur automatically without the need to call them. While we're at
it, also std::move the QString instance into its member variable.
7 years ago
Lioncash 7846295a8f qt: Add missing override specifiers where applicable 7 years ago
Lioncash 00a68c5eea qt: Default destructors where applicable
Makes code consistent with our style of defaulting special member
functions where applicable.
7 years ago
Lioncash 2feb1a8ba6 kernel/event: Make data members private
Instead we can simply provide accessors to the required data instead of
giving external read/write access to the variables directly.
7 years ago
bunnei 1ac45342dd
Merge pull request #933 from lioncash/memory
memory: Correct prototype of ZeroBlock
7 years ago
mailwl 2ea0f0fd16 Service/Audio: audout_a.cpp: remove pragma once 7 years ago
bunnei 904d7eaa94 maxwell_3d: Remove outdated assert. 7 years ago
bunnei 57eb936200 gl_rasterizer_cache: Avoid superfluous surface copies. 7 years ago
bunnei 0b80bbeb95
Merge pull request #932 from lioncash/func
core_timing: Use transparent functors where applicable
7 years ago
bunnei f1b93d63d1
Merge pull request #929 from lioncash/addr
gdbstub: Minor changes
7 years ago
bunnei 03b7ebbc08
Merge pull request #930 from lioncash/thread
address_arbiter: Return by value from GetThreadsWaitingOnAddress()
7 years ago
bunnei bb21c2198a
Merge pull request #925 from bunnei/audren
Implement audren audio output
7 years ago
Lioncash 6c56754322 perf_stats: Correct literal used for MAX_LAG_TIME_US
ms is shorthand for milliseconds, not microseconds, and given there's no
comment indicating that this was intentional, it probably wasn't.
7 years ago
Lioncash a0c3a46aa9 core_timing: Make GetGlobalTimeUs() return std::chrono::microseconds
Enforces the time unit being returned and also allows using the standard
time utilities to manipulate it.
7 years ago
Lioncash 2a7a2b739b memory: Make prototype parameter names match their definitions
Keeps the code consistent.
7 years ago
Lioncash 4aa31b0618 memory: Correct prototype of ZeroBlock
Previously, the prototype wasn't matching the definition, which has a
Processor parameter before the destination address.
7 years ago
Lioncash 2fc5c783ed memory: Remove unnecessary const qualifiers in prototypes
These aren't necessary, as value-wise const only matters in the
definition.
7 years ago
Lioncash 6edd828101 core_timing: Convert typedef into a type alias
Makes the alias a little more readable from left-to-right.
7 years ago
Lioncash d9815b523b core_timing: Use transparent functors where applicable
Gets rid of the need to hardcode the type in multiple places. This will
now be deduced automatically, based off the elements in the container
being provided to the algorithm.
7 years ago
Zach Hilman 7f9430f7ae loader: Make AppLoader_NCA rely on directory loading code
Eliminates duplicate code shared between their Load methods, after all the only difference is how the romfs is handled.
7 years ago
bunnei c8e5c74092
Merge pull request #927 from bunnei/fix-texs
gl_shader_decompiler: Fix TEXS mask and dest.
7 years ago
Lioncash 00f7e584ce gdbstub: Use type alias for breakpoint maps
Rather than having to type out the full std::map type signature, we can
just use a straightforward alias. While we're at it, rename
GetBreakpointList to GetBreakpointMap, which makes the name more
accurate. We can also get rid of unnecessary u64 static_casts, since
VAddr is an alias for a u64.
7 years ago
Lioncash 89c076b4b1 gdbstub: Move all file-static variables into the GDBStub namespace
Keeps everything under the same namespace. While we're at it, enclose
them all within an inner anonymous namespace.
7 years ago
bunnei c0af42d6eb
Merge pull request #912 from lioncash/global-var
video_core: Eliminate the g_renderer global variable
7 years ago
Lioncash 7a77d0a71e address_arbiter: Return by value from GetThreadsWaitingOnAddress()
In all cases the vector being supplied is empty, so we can just return
by value in these instances.
7 years ago
Lioncash ca96f8db4e gdbstub: Replace PAddr alias with VAddr
In all cases, a virtual address is being passed in, not a physical one.
7 years ago
bunnei fd715e54a1 gl_shader_decompiler: Fix TEXS mask and dest. 7 years ago
bunnei ce46fb27ca
Merge pull request #926 from ogniK5377/vertex-attrib-format
gl_rasterizer: Fix glVertexAttribFormat for integers
7 years ago
bunnei b46df98e93 audio_core: Implement audren_u audio playback. 7 years ago
David Marcec b96010bfa9 added braces for conditions 7 years ago
David Marcec 6d1e30e041 fix the attrib format for ints 7 years ago
bunnei a0a605df06
Merge pull request #924 from lioncash/arp
service: Add arp services
7 years ago
bunnei cd96c04339
Merge pull request #921 from lioncash/view
core/crypto: Minor changes
7 years ago
bunnei 1dee8ceda1 audio_core: Use s16 where possible for audio samples. 7 years ago