Commit Graph

8219 Commits

Author SHA1 Message Date
David Marcec fe3ea08968 Added WrapMode MirrorOnceClampToEdge
Used by splatoon 2
2018-08-19 02:26:50 +10:00
Subv c42b8cbdd0 Shaders: Implemented a stack for the SSY/SYNC instructions.
The SSY instruction pushes an address into the stack, and the SYNC instruction pops it. The current stack depth is 20, we should figure out if this is enough or not.
2018-08-18 10:48:12 -05:00
Subv a175f7ba29 Shaders: Corrected the 'abs' and 'neg' bit usage in the float arithmetic instructions.
We should definitely audit our shader generator for more errors like this.
2018-08-18 10:22:42 -05:00
David Marcec ab3b9d7aa5 Added predcondition GreaterThanWithNan 2018-08-18 17:49:59 +10:00
bunnei 80714d89d6 Merge pull request #1096 from bunnei/supported-blits
gl_rasterizer_cache: Remove asserts for supported blits.
2018-08-17 22:41:53 -04:00
bunnei b4e380e0d7 Merge pull request #1097 from bunnei/gl-critical
renderer_opengl: Treat OpenGL errors as critical.
2018-08-17 10:39:13 -04:00
greggameplayer c19eaa2787 Implement SetIdleTimeDetectionExtension & GetIdleTimeDetectionExtension (#1059)
* Used by Mario Tennis Aces
2018-08-17 00:23:08 -04:00
bunnei 4e76dbd751 Merge pull request #1090 from lioncash/ctor-assign
core: Delete System copy/move constructors and assignment operators
2018-08-17 00:19:55 -04:00
bunnei a5c2b155de Merge pull request #1091 from lioncash/warning
qt/main: Get rid of compilation warnings
2018-08-17 00:19:05 -04:00
bunnei da0d5239c1 Merge pull request #1093 from greggameplayer/GetDefaultDisplayResolutionChangeEvent
Implement GetDefaultDisplayResolutionChangeEvent
2018-08-17 00:18:35 -04:00
bunnei 9705148ea2 gl_rasterizer_cache: Remove asserts for supported blits. 2018-08-17 00:10:08 -04:00
bunnei aeea1e9108 renderer_opengl: Treat OpenGL errors as critical. 2018-08-17 00:09:27 -04:00
bunnei 5912824519 Merge pull request #1019 from Subv/vertex_divisor
Rasterizer: Manually implemented instanced rendering.
2018-08-17 00:07:06 -04:00
bunnei 79fc21a85e Merge pull request #1087 from MerryMage/dynarmic
dynarmic: Update to 550d662
2018-08-16 18:07:11 -04:00
bunnei 33a9e673d2 Merge pull request #1084 from bunnei/depth
gl_rasterizer_cache: Treat Depth formats differently from DepthStencil.
2018-08-16 18:06:51 -04:00
greggameplayer edccdedd16 correct coding style 2018-08-16 23:46:06 +02:00
greggameplayer 4c94d500df Implement GetDefaultDisplayResolutionChangeEvent
Require by Toki Tori and Toki Tori 2+
2018-08-16 23:25:54 +02:00
bunnei 9d4958752e Merge pull request #1085 from lioncash/namespace
common: Namespace hex_util.h/.cpp
2018-08-16 11:54:42 -04:00
Lioncash 5b87516373 qt/main: Unindent code in OnMenuInstallToNAND()
We can change this into an early-return if the filename is empty.
There's no need to include all of the code within the if statement.
2018-08-16 10:37:58 -04:00
Lioncash c28ea940a1 qt/main: Make installation dialog text within OnMenuInstallToNAND() translatable
This is user-facing text, so it should be marked as translatable by Qt.
2018-08-16 10:36:42 -04:00
Lioncash 4423e138ea qt/main: Get rid of compilation warnings
Gets rid of truncation warnings about conversion to int. While we're at
it, we can also de-hardcode the buffer size being used.
2018-08-16 10:28:06 -04:00
Lioncash 3afcede204 core: Delete System copy/move constructors and assignment operators
Prevents potentially making copies or doing silly things by accident
with the System instance, particularly given our current core is
designed (unfortunately) around one instantiable instance.

This will prevent the accidental case of:

auto instance = System::Instance();

being compiled without warning when it's supposed to be:

auto& instance = System::Instance();
2018-08-16 10:21:14 -04:00
MerryMage 84cc4aaa4f dynarmic: Update to 550d662
550d662 load_store_exclusive: Define s == t state to be Constraint_NONE
0b69381 A64/translate: Allow for unpredictable behaviour to be defined
6d236d4 system: Implement MRS CNTFRQ_EL0
6cbb6fb A32/testenv: Add missing headers
6729328 externals: Update xbyak to v5.67
1812bd2 Squashed 'externals/xbyak/' changes from 2794cde7..671fc805
9a95802 externals: Document subtrees
714a840 A64: Implement SQ{ADD, SUB}, and UQ{ADD, SUB}'s vector variants
8cab459 A64: Implement UQADD/UQSUB's scalar variants
18a8151 ir: Add opcodes for unsigned saturating add and subtract
a5660ee x64/reg_alloc: Use type alias for array returned by GetArgumentInfo()
29489b5 ir/value: Use type alias CoprocessorInfo for std::array<u8, 8>
e23ba26 status_register_access: Add support for bits 0 and 1 of mask to MSR
55190bd fuzz_with_unicorn: Split utility functions into fuzz_util
23b049d A32/translate/load_store: Correct detection of writeback
7ec9f15 A32/translate: Add TranslateSingleInstruction
efeecb4 A32/ir_emitter: Bug fix: IREmitter::ExceptionRaised using incorrect opcode
08d1d19 A32/decoders: Split instruction list into include file
2d929cc tests: Refactor unicorn_emu to allow for A32 unicorn
f672368 microinstruction: Improve assert messages
7ebff50 emit_x64_vector: EmitVectorNarrow16: AVX512 implementation
edce230 emit_x64_vector: EmitVectorNarrow32: prefer pblendw to loading constant
2018-08-16 10:12:20 +01:00
bunnei 8964eebeb1 Merge pull request #1075 from lioncash/include
loader/{nca, xci}: Remove unnecessary includes and unused member variables
2018-08-16 00:04:25 -04:00
Lioncash 890507ecf1 common: Namespace hex_util.h/.cpp
It's in the common code, so it should be under the Common namespace like
everything else.
2018-08-15 23:24:00 -04:00
bunnei 960f4ecce2 Merge pull request #1005 from DarkLordZach/registered-fmt
file_sys: Add support for registration format
2018-08-15 23:11:58 -04:00
bunnei 9b74ac4e98 gl_rasterizer_cache: Treat Depth formats differently from DepthStencil. 2018-08-15 21:24:04 -04:00
bunnei d08f54b77d Merge pull request #1078 from lioncash/message
lm: Handle threads and modules within the logger
2018-08-15 18:53:47 -04:00
bunnei 73e0f3f1ce Merge pull request #1079 from lioncash/fmt
loader: Make ResultStatus directly compatible with fmt
2018-08-15 18:25:57 -04:00
bunnei 0bd47dfb22 Merge pull request #1051 from B3n30/UnscheduleEventThreadsafe
Core::CoreTiming: add UnscheduleEventThreadsafe
2018-08-15 18:25:30 -04:00
bunnei b4cc42e615 Merge pull request #1080 from lioncash/ret
sm/controller: Correct return value of QueryPointerBufferSize
2018-08-15 18:25:05 -04:00
bunnei 33b0b4dda9 Merge pull request #1083 from Subv/conv_neg
Shaders: Implemented I2F_C and F2I_C, along with the negation bits of the conversion instructions.
2018-08-15 18:24:47 -04:00
bunnei 1462cfecae Merge pull request #1081 from lioncash/convert
kernel/server_session: Add IsSession() member function
2018-08-15 13:02:25 -04:00
Subv 64cb9fc8b0 Shader/Conversion: Implemented the negate bit in F2F and I2I instructions. 2018-08-15 09:27:43 -05:00
Subv 237848d417 Shader/I2F: Implemented the negate I2F_C instruction variant. 2018-08-15 09:25:02 -05:00
Subv 61be8e0be3 Shader/F2I: Implemented the negate bit in the I2F instruction 2018-08-15 09:18:55 -05:00
Subv cb60077c0c Shader/F2I: Implemented the F2I_C instruction variant. 2018-08-15 09:16:35 -05:00
Subv e0c412ae9b Shader/F2I: Implemented the negate bit in the F2I instruction. 2018-08-15 09:15:55 -05:00
bunnei a617634394 Merge pull request #1077 from bunnei/rgba16u
gl_rasterizer_cache: Add RGBA16U to PixelFormatFromTextureFormat.
2018-08-15 09:25:15 -04:00
Lioncash c5986c7bf7 kernel/server_session: Add IsSession() member function
Allows querying the inverse of IsDomain() to make things more readable.
This will likely also be usable in the event of implementing
ConvertDomainToSession().
2018-08-15 06:50:50 -04:00
Lioncash d9f92aa9b0 sm/controller: Correct return value of QueryPointerBufferSize
This should be returning a u16 according to Switch Brew.
2018-08-15 06:16:10 -04:00
Lioncash aaed702790 loader: Make ResultStatus directly compatible with fmt
We can make the enum class type compatible with fmt by providing an
overload of operator<<.

While we're at it, perform proper bounds checking. If something exceeds
the array, it should be a hard fail, because it's, without a doubt, a
programmer error in this case.
2018-08-15 05:52:37 -04:00
Lioncash 4b18920435 loader/nca: Remove unnecessary includes and member variables 2018-08-15 01:41:40 -04:00
Lioncash f5b5d53cde loader/xci: Remove unnecessary includes and member variables
Many of these aren't necessary and will cause this file to be required
to be recompiled whenever any changes to those files are made, which
lengthens compile times for no reason.

This also removes an unused metadata variable from AppLoader_XCI
2018-08-15 01:41:35 -04:00
Lioncash 6784110323 lm: Use LOG_DEBUG for printing out trace logs
Using LOG_TRACE here isn't a good idea because LOG_TRACE is only enabled
when yuzu is compiled in debug mode. Debug mode is also quite slow, and
so we're potentially throwing away logging messages that can provide
value when trying to boot games.
2018-08-15 01:07:41 -04:00
Lioncash 1da6859863 lm: Handle threads and modules within the logger
The thread field serves to indicate which thread a log is related to and
provides the length of the thread's name, so we can print that out,
ditto for modules.

Now we can know what threads are potentially spawning off logging
messages (for example Lydie & Suelle bounces between MainThread and
LoadingThread when initializing the game).
2018-08-15 01:05:50 -04:00
bunnei 5135d2a415 gl_rasterizer_cache: Cleanup some PixelFormat names and logging. 2018-08-14 23:31:45 -04:00
Subv 1162a49920 Rasterizer: Implemented instanced rendering.
We keep track of the current instance and update an uniform in the shaders to let them know which instance they are.

Instanced vertex arrays are not yet implemented.
2018-08-14 22:25:07 -05:00
bunnei 359480e0dc gl_rasterizer_cache: Add RGBA16U to PixelFormatFromTextureFormat.
- Used by Breath of the Wild.
2018-08-14 23:18:34 -04:00
bunnei e8fe32f9d5 Merge pull request #1069 from bunnei/vtx-sz
maxwell_to_gl: Properly handle UnsignedInt/SignedInt sizes.
2018-08-14 23:14:44 -04:00
bunnei b5c3d5e9f2 Merge pull request #1070 from bunnei/cbuf-sz
gl_rasterizer: Fix upload size for constant buffers.
2018-08-14 23:14:24 -04:00
bunnei 64aa1ad9cd Merge pull request #1071 from bunnei/fix-ldc
gl_shader_decompiler: Several fixes for indirect constant buffer loads.
2018-08-14 23:14:09 -04:00
bunnei d36398658b Merge pull request #1068 from bunnei/g8r8s
gl_rasterizer_cache: Implement G8R8S format.
2018-08-14 23:13:43 -04:00
bunnei 26a456e76f Merge pull request #1067 from lioncash/init
emu_window: Ensure WindowConfig members are always initialized
2018-08-14 22:43:32 -04:00
bunnei 369967e5f8 Merge pull request #1073 from lioncash/3ds
loader: Remove address mapping remnants from citra
2018-08-14 22:43:04 -04:00
bunnei 1b97563c85 Merge pull request #1072 from lioncash/svc
kernel/svc: Log svcBreak parameters
2018-08-14 22:42:44 -04:00
bunnei 25dec97e4b Merge pull request #1063 from lioncash/inline
common/xbyak_abi: Mark defined functions in header as inline
2018-08-14 22:40:23 -04:00
greggameplayer e4e15aa6c5 Implement Z16_UNORM in PixelFormatFromTextureFormat function
Require by Zelda Breath Of The Wild
2018-08-15 04:14:15 +02:00
bunnei 0606860e3e Merge pull request #1054 from zhaowenlan1779/misc-fixup
common/misc: use windows.h
2018-08-14 21:47:28 -04:00
bunnei 3f1ec6b9c9 Merge pull request #1056 from lioncash/mm
mm_u: Move interface class into the cpp file
2018-08-14 21:47:07 -04:00
Lioncash ea9c1deb5e loader: Remove address mapping remnants from citra
These mappings are leftovers from citra and don't apply to the Switch.
2018-08-14 21:37:03 -04:00
Lioncash 9f6aa5cda8 kernel/svc: Log svcBreak parameters
Given if we hit here all is lost, we should probably be logging the
break reason code and associated information to distinguish between the
causes.
2018-08-14 20:54:05 -04:00
bunnei 8b86f91e1a gl_shader_decompiler: Several fixes for indirect constant buffer loads. 2018-08-14 20:47:50 -04:00
bunnei e6b29a30db gl_rasterizer: Fix upload size for constant buffers. 2018-08-14 20:44:19 -04:00
bunnei debc3f9176 maxwell_to_gl: Properly handle UnsignedInt/SignedInt sizes. 2018-08-14 20:43:02 -04:00
bunnei f5ec085815 gl_rasterizer_cache: Implement G8R8S format.
- Used by Super Mario Odyssey.
2018-08-14 20:41:49 -04:00
Lioncash 893faf13d7 emu_window: Ensure WindowConfig members are always initialized
Previously we weren't always initializing all members of the struct.
Prevents potentially wonky behavior from occurring.
2018-08-14 19:36:43 -04:00
Lioncash 5ad776105c common/telemetry: Migrate core-independent info gathering to common
Previously core itself was the library containing the code to gather
common information (build info, CPU info, and OS info), however all of
this isn't core-dependent and can be moved to the common code and use
the common interfaces. We can then just call those functions from the
core instead.

This will allow replacing our CPU detection with Xbyak's which has
better detection facilities than ours. It also keeps more
architecture-dependent code in common instead of core.
2018-08-14 18:57:46 -04:00
Lioncash c0f2f8a840 common/xbyak_abi: Mark defined functions in header as inline
Avoids potential One Definition Rule violations when these are used in
the future.
2018-08-14 18:29:56 -04:00
Lioncash 9b5b9205a5 common/xbyak: Use nested namespace specifiers where applicable 2018-08-14 18:27:27 -04:00
Lioncash f3992cd43b common: Remove unused old breakpoint source files
These currently aren't used and contain commented out source code that
corresponds to Dolphin's JIT. Given our CPU code is organized quite
differently, we shouldn't be keeping this around (at the moment it just
adds to compile times marginally).
2018-08-14 18:14:01 -04:00
bunnei ea8e6b9356 Merge pull request #1055 from lioncash/init
audout_u: Correct IAudioOut initializer list order
2018-08-14 08:03:33 -04:00
bunnei 4931d9c7d1 Merge pull request #1058 from greggameplayer/BC7U_Fix
Fix BC7U
2018-08-14 08:03:07 -04:00
bunnei f09b3224e8 Merge pull request #1050 from bunnei/rgba16-unorm
renderer_opengl: Implement RenderTargetFormat::RGBA16_UNORM.
2018-08-14 08:02:50 -04:00
Lioncash e6a87798b9 logging/backend: Use const reference to refer to log filter
The filter is returned via const reference, so this was making a
pointless copy of the entire filter every time a message was being
pushed into the logger instance.
2018-08-13 21:44:55 -04:00
greggameplayer dd3e4a2b75 Fix BC7U 2018-08-14 02:36:00 +02:00
Mat M 9791de74fe Merge pull request #1046 from ogniK5377/missing-channels
Added missing channel devices
2018-08-13 19:36:26 -04:00
Lioncash fca92a1d36 mm_u: Forward all old variants of functions to the new ones
Ensures both variants go through the same interface, and while we're at
it, add Finalize to provide the inverse of Initialize for consistency.
2018-08-13 18:59:10 -04:00
Lioncash cf247dc630 mm_u: Move implementation class into the cpp file
Now if changes are ever made to the behavior of the class, it doesn't
involve rebuilding everything that includes the mm_u header.
2018-08-13 18:59:07 -04:00
Lioncash 053cab51ce audout_u: Correct IAudioOut initializer list order
Orders elements in the precise order they'll be initialized.
2018-08-13 18:23:59 -04:00
bunnei 9b9cf62587 renderer_opengl: Implement RenderTargetFormat::RGBA16_UNORM.
- Used by Breath of the Wild.
2018-08-13 18:20:07 -04:00
Zhu PengFei bba0f809c8 common/misc: use windows.h
linux-mingw does not really like this.
2018-08-14 04:28:24 +08:00
bunnei 3cdfb2d11f Merge pull request #1052 from ogniK5377/xeno
Implement RG32UI and R32UI
2018-08-13 12:31:39 -04:00
bunnei 4f12aba993 Merge pull request #1033 from MerryMage/interp
audio_core: Interpolate
2018-08-13 12:19:59 -04:00
bunnei d25f804019 Merge pull request #1053 from MerryMage/rm-IsExecuting
arm_dynarmic: Remove IsExecuting check from PrepareReschedule
2018-08-13 12:18:51 -04:00
Mat M 1e6ef49f3b Merge pull request #1049 from bunnei/vtx-size-8
maxwell_to_gl: Implement VertexAttribute::Size::Size_8.
2018-08-13 11:51:21 -04:00
MerryMage 092d385d53 arm_dynarmic: Remove IsExecuting check from PrepareReschedule
No longer required. HaltExecution is a no-op if it is not currently executing.
2018-08-13 13:59:01 +01:00
David Marcec 5c1a4ab132 Implement RG32UI and R32UI
Needed for xenoblade
2018-08-13 22:55:16 +10:00
B3n30 8d6b45cd43 Core::CoreTiming: add UnscheduleEventThreadsafe 2018-08-13 13:56:41 +02:00
MerryMage 26aa4ae7a8 audio_renderer: samples_remaining counts frames, not samples 2018-08-13 11:26:50 +01:00
MerryMage 0525998743 audio_core: Interpolate 2018-08-13 11:26:50 +01:00
MerryMage fea4df74c2 audio_core: Implement low-pass filter 2018-08-13 11:26:50 +01:00
bunnei 34cba027e7 Merge pull request #1032 from lioncash/sanitize
vfs: Use sanitized paths within MoveFile() and MoveDirectory()
2018-08-13 01:43:35 -04:00
bunnei faf3494968 Merge pull request #1031 from lioncash/verbosity
card_image: Simplify return statement of GetSubdirectories()
2018-08-13 01:42:07 -04:00
bunnei d2634506a9 Merge pull request #1048 from lioncash/atomic
kernel/object: Tighten object against data races
2018-08-13 01:41:23 -04:00
bunnei 71faea40a6 maxwell_to_gl: Implement VertexAttribute::Size::Size_8.
- Used by Breath of the Wild.
2018-08-13 01:34:21 -04:00
Lioncash 3485963fec kernel/object: Tighten object against data races
Despite being covered by a global mutex, we should still ensure that the
class handles its reference counts properly. This avoids potential
shenanigans when it comes to data races.

Given this is the root object that drives quite a bit of the kernel
object hierarchy, ensuring we always have the correct behavior (and no
races) is a good thing.
2018-08-13 00:16:40 -04:00
bunnei 1d2fdc5a0d renderer_opengl: Implement RenderTargetFormat::RGBA16_UINT.
- Used by Breath of the Wild.
2018-08-13 00:06:22 -04:00
bunnei f9c5041caa Merge pull request #1045 from bunnei/rg8-unorm
renderer_opengl: Implement RenderTargetFormat::RG8_UNORM.
2018-08-13 00:05:25 -04:00
David Marcec dc6dcaf416 Registered missing channel devices 2018-08-13 14:03:50 +10:00
David Marcec 10e054e941 Added missing channel devices 2018-08-13 14:00:27 +10:00
bunnei dcd05b3e87 maxwell_to_gl: Implement PrimitiveTopology::LineStrip.
- Used by Breath of the Wild.
2018-08-12 23:09:32 -04:00
bunnei ad6b0268eb renderer_opengl: Implement RenderTargetFormat::RG8_UNORM.
- Used by Breath of the Wild.
2018-08-12 23:08:50 -04:00
bunnei a1aacf27d7 Merge pull request #1043 from Subv/timing
Use an approximated amortized amount of ticks when advancing timing.
2018-08-12 22:31:55 -04:00
bunnei 586fcf2742 Merge pull request #1036 from lioncash/thread
scheduler: Make HaveReadyThreads() a const member function
2018-08-12 22:13:14 -04:00
bunnei ef0065ee51 Merge pull request #1042 from Subv/races
Fixed a bunch of race conditions when running in multicore mode.
2018-08-12 22:05:48 -04:00
bunnei d9a4224dba Merge pull request #1041 from Subv/duplicated_mutex
Kernel/Mutex: Don't duplicate threads in the mutex waiter list.
2018-08-12 22:02:03 -04:00
bunnei da26e7673b Merge pull request #1040 from bunnei/xmad
gl_shader_decompiler: Implement XMAD instruction.
2018-08-12 21:56:40 -04:00
Subv 21fa6cb72c CPU/Timing: Use an approximated amortized amount of ticks when advancing timing.
We divide the number of ticks to add by the number of cores (4) to obtain a more or less rough estimate of the actual number of ticks added. This assumes that all 4 cores are doing similar work. Previously we were adding ~4 times the number of ticks, thus making the games think that time was going way too fast.

This lets us bypass certain hangs in some games like Breath of the Wild.

We should modify our CoreTiming to support multiple cores (both running in a single thread, and in multiple host threads).
2018-08-12 20:41:28 -05:00
Subv a063b51094 Kernel/SVC: Don't reschedule the current core when creating a new thread.
The current core may have nothing to do with the core where the new thread was scheduled to run. In case it's the same core, then the following PrepareReshedule call will take care of that.
2018-08-12 20:38:37 -05:00
Subv 42d6bbcb7c Core/HLE: Make the 'reschedule_pending' flag atomic.
Another thread may write to this variable while the core in question is in the middle of checking for a reschedule request.
2018-08-12 18:41:12 -05:00
Subv c51eb8b679 CPU/HLE: Lock the HLE mutex before performing a reschedule.
Another thread might be in the middle of an SVC, thus altering the state of the schedulers.
2018-08-12 18:41:11 -05:00
Subv 5fe52770ea Kernel/Threads: Lock the HLE mutex when executing the wakeup callback.
Another thread might be in the middle of a reschedule, thus altering the state of the schedulers.
2018-08-12 18:41:11 -05:00
Subv cbf854666d Kernel/Thread: Always use the threadsafe option when scheduling wakeups.
WakeAfterDelay might be called from any host thread, so err on the side of caution and use the thread-safe CoreTiming::ScheduleEventThreadsafe.

Note that CoreTiming is still far from thread-safe, there may be more things we have to work on for it to be up to par with what we want.
2018-08-12 18:40:56 -05:00
bunnei 03ac254de6 gl_shader_decompiler: Implement XMAD instruction. 2018-08-12 18:30:24 -04:00
Subv 8f493f43e7 Kernel/Mutex: Don't duplicate threads in the mutex waiter list.
Exit from AddMutexWaiter early if the thread is already waiting for a mutex owned by the owner thread.

This accounts for the possibility of a thread that is waiting on a condition variable being awakened twice in a row.

Also added more validation asserts.

This should fix one of the random crashes in Breath Of The Wild.
2018-08-12 16:35:27 -05:00
Lioncash cdeac9103f vfs: Make VfsFilesystem constructor explicit
Makes it consistent with the other VFS interfaces and prevents implicit
construction.
2018-08-12 16:55:40 -04:00
Lioncash 80ac82c9c5 vfs: Make type hierarchy objects classes instead of structs
struct should be used when the data type is very simple or otherwise has
no invariants associated with it. Given these are used to form a
hierarchy, class should be used instead.
2018-08-12 16:55:40 -04:00
bunnei edeb37b18d Merge pull request #1025 from ogniK5377/bad-cast
Fixed invalid cast in loader
2018-08-12 16:22:35 -04:00
bunnei 5af06e90cc Merge pull request #1038 from MerryMage/lock-cubeb
cubeb_sink: Protect queue with a mutex
2018-08-12 16:22:11 -04:00
Zach Hilman 3781654c6d registration: Various style and documentation improvements
Fix logic in RealVfsFilesystem Create methods
Remove magic numbers
Fix regex errors
2018-08-12 15:55:44 -04:00
MerryMage c9923e03bb cubeb_sink: Protect queue with a mutex 2018-08-12 20:41:46 +01:00
bunnei cc798cfb15 Merge pull request #1035 from ogniK5377/audio-dev-revision-info
GetAudioDeviceServiceWithRevisionInfo (Used by Bloodstained: Curse of the Moon)
2018-08-12 14:56:11 -04:00
bunnei f6746158e3 Merge pull request #1028 from ogniK5377/aoa
Added GetAudioRendererSampleRate, GetAudioRendererSampleCount & GetAudioRendererMixBufferCount
2018-08-12 13:33:08 -04:00
bunnei 53b9e9ce72 Merge pull request #1034 from lioncash/hid
hid: Stub DisconnectNpad()
2018-08-12 13:15:56 -04:00
Lioncash 6082427cbd scheduler: Make HaveReadyThreads() a const member function
This function doesn't modify instance state, so the const qualifier can
be added to it.
2018-08-12 12:55:58 -04:00
Lioncash 95ff8e6aac thread_queue_list: Make contains() and get_first() const member functions
These don't directly modify the contained data.
2018-08-12 12:54:14 -04:00
Lioncash 9a76374859 thread_queue_list: Convert typedef to a type alias 2018-08-12 12:47:11 -04:00
Markus Wick d6703d607b gl_rasterizer: Use a shared helper to upload from CPU memory. 2018-08-12 16:10:26 +02:00
Markus Wick 2d2027cd52 gl_state: Don't track constant buffer mappings. 2018-08-12 16:10:26 +02:00
Markus Wick a59891f497 gl_rasterizer: Use the stream buffer for constant buffers. 2018-08-12 16:10:26 +02:00
Markus Wick b4f88b06b5 gl_rasterizer: Use the streaming buffer itself for the constant buffer.
Don't emut copies, especially not for data, which is used once. They just end in a huge GPU overhead.
2018-08-12 15:48:59 +02:00
Markus Wick ca4e2c22d4 gl_rasterizer: Use a helper for aligning the buffer. 2018-08-12 15:47:35 +02:00
Markus Wick 73b40c2bd4 Update the stream_buffer helper from Citra.
Please see https://github.com/citra-emu/citra/pull/3666 for more details.
2018-08-12 15:47:35 +02:00
David Marcec b5f7e35139 GetAudioDeviceServiceWithRevisionInfo
As we're not handling any anything about the revision data for GetAudioDeviceServiceWithRevisionInfo, it's currently marked as stubbed. However for games this shouldn't affect the result. Proper revision info would be more for homebrew.
2018-08-12 22:47:39 +10:00
Lioncash ab4821d4b3 hid: disable clang-format around tables
Prevents clang-format from butchering them.
2018-08-12 05:57:33 -04:00
Lioncash 4ca059c59a hid: Stub DisconnectNpad()
This is required by ARMS.
2018-08-12 05:56:28 -04:00
Lioncash 7803b153d8 vfs: Use sanitized paths within MoveFile() and MoveDirectory()
Previously these were being unused (or partially unused). While we're at
it, use better naming to make it visibly obvious which variant of the
path is being used.
2018-08-12 04:05:01 -04:00
Lioncash 91c673cac7 card_image: Use type aliases to shorten definitions
We have the aliases, so we may as well use 'em.
2018-08-12 03:57:16 -04:00
Lioncash d323d72fd5 card_image: Simplify return statement of GetSubdirectories()
We don't need to write out the construction long-form, we can just let
the language itself work it out off the return type.
2018-08-12 03:53:20 -04:00
bunnei 7f1a8483e9 gl_shader_decompiler: Fix SetOutputAttributeToRegister empty check. 2018-08-12 02:22:42 -04:00
David Marcec 7d49bcdb1b Pushed the requested sample rate instead of our fixed sample rate 2018-08-12 14:58:36 +10:00
David Marcec bba02ec641 made ResultStatus a u16 2018-08-12 14:56:22 +10:00
David Marcec f3ef58207e Added GetAudioRendererSampleRate, GetAudioRendererSampleCount & GetAudioRendererMixBufferCount
GetAudioRendererSampleRate is set as a "STUB" as a game could check if the sample rate it sent and the sample rate it wants don't match. Just a thought of something which could happen so keeping it as stub for the mean time
2018-08-12 14:46:12 +10:00
bunnei e579be5fe2 Merge pull request #1026 from ogniK5377/retro-city-rampage
Stub UpdateUserPresence
2018-08-12 00:25:57 -04:00
bunnei 7031b3b762 gl_shader_decompiler: Fix GLSL compiler error with KIL instruction. 2018-08-12 00:06:48 -04:00
David Marcec fd0319efd5 Stub UpdateUserPresence
Needed for Retro City Rampage to go in game
2018-08-12 14:00:44 +10:00
David Marcec c08adc0db0 Fixed invalid cast in loader
GetMessageForResultStatus takes a u16, not a size_t.
2018-08-12 13:31:15 +10:00
Zach Hilman 8c33f20792 registration: Add support for force overwrite of installed 2018-08-11 23:01:42 -04:00
Zach Hilman 9bae8b24ae game_list: Split game list scans to multiple functions
Avoids unnecessary rebuilds of control data on every layer of recursion in AddFstEntriesToGameList
2018-08-11 22:50:48 -04:00
Zach Hilman fdb155ca09 vfs_real: Add CreateFullPath to Create* operations 2018-08-11 22:50:48 -04:00
Zach Hilman b16c3dc725 control_metadata: Remove unnecessary reference to base file 2018-08-11 22:50:48 -04:00
Zach Hilman 0c55578a65 romfs: Remove cyclic shared_ptr leak in romfs code 2018-08-11 22:50:48 -04:00
Zach Hilman 83db3b452a registration: Update documentation and style 2018-08-11 22:50:48 -04:00
Zach Hilman 50ff8ec364 nca_metadata: Remove unnecessary reference to base file 2018-08-11 22:50:48 -04:00
Zach Hilman 2a0b80bb67 bis_factory: Create NAND dirs if they don't exist 2018-08-11 22:50:48 -04:00
Zach Hilman 54fd907b2b qt: Use custom RawCopy with progress bar for installs 2018-08-11 22:50:48 -04:00
Zach Hilman f92fbf012d registration: Take RawCopy function as parameter
Instead of defaulting to VfsRawCopy
2018-08-11 22:50:48 -04:00
Zach Hilman 8f96b88d0b game_list: Populate control data from installed NAND 2018-08-11 22:50:48 -04:00
Zach Hilman 405d520d1d registered_cache: Fix missing reading from yuzu_meta 2018-08-11 22:50:48 -04:00
Zach Hilman b0531d6ea0 file_sys: Comply to style guidelines 2018-08-11 22:50:48 -04:00
Zach Hilman e9c7294bb9 qt: Add 'Install to NAND' option to menu
Prompts for title type on NCA files.
2018-08-11 22:50:48 -04:00
Zach Hilman 53ca6f8846 game_list: Modify game list to scan installed titles 2018-08-11 22:50:48 -04:00
Zach Hilman 2d3617c723 file_sys: Add RegisteredCache
Manages NAND NCA get and install.
2018-08-11 22:50:48 -04:00
Zach Hilman 7fdfa63ce3 file_sys: Add support for parsing NCA metadata (CNMT) 2018-08-11 22:50:48 -04:00
Zach Hilman f903b556d8 card_image: Add accessor for all NCAs in XCI 2018-08-11 22:50:48 -04:00
Zach Hilman 562e66e5d2 vfs_real: Add CreateFullPath to CreateFile
Fixes bugs with calling CreateFile when the immediate directory does not exist.
2018-08-11 22:50:48 -04:00
Zach Hilman e891974118 filesystem: Add Open and Register functions for BISFactory 2018-08-11 22:50:48 -04:00
Zach Hilman f60bb85805 bis_factory: Add partial implementation of BISFactory
Creates and stores RegisteredCaches for user and system NAND, as creation of a RegisteredCache is expensive.
2018-08-11 22:50:48 -04:00
Zach Hilman 2d881fd587 loader: Join 0* files in directory if filename is 00
i.e. Load the concatenated 00+01 if 01 exists as well. Needed for split NAND NCAs.
2018-08-11 22:50:48 -04:00
Zach Hilman 5810088549 loader: Recognize filename '00' as NCA
Needed to avoid mismatch filetype warnings on split NAND NCAs
2018-08-11 22:50:08 -04:00
Zach Hilman b963629132 vfs: Add ConcatenatedVfsFile 2018-08-11 22:50:08 -04:00
Zach Hilman f2c489b940 crypto: Remove hex utilities from key_manager
Move to hex_util.h in common
2018-08-11 22:50:08 -04:00
Zach Hilman 54ef430e85 file_util: Add getter for NAND registration directory 2018-08-11 22:50:08 -04:00
Zach Hilman 7193c994b7 common: Move hex string processing to separate file 2018-08-11 22:50:08 -04:00
bunnei 6a396d2129 Merge pull request #1022 from bunnei/fix-splat
Several Friend service fixes
2018-08-11 22:42:45 -04:00
bunnei db6b59b1a6 Merge pull request #1020 from lioncash/namespace
core: Namespace EmuWindow
2018-08-11 22:40:08 -04:00
bunnei 947d80c8ce Merge pull request #1021 from lioncash/warn
gl_rasterizer: Silence implicit truncation warning in SetupShaders()
2018-08-11 22:39:46 -04:00
bunnei f807476d29 Merge pull request #1024 from Subv/blend_gl
GPU/Maxwell3D: Implemented an alternative set of blend factors.
2018-08-11 22:39:02 -04:00
bunnei 7478448af7 Merge pull request #1023 from Subv/invalid_attribs
RasterizerGL: Ignore invalid/unset vertex attributes.
2018-08-11 22:18:40 -04:00
Subv 45ee826309 GPU/Maxwell3D: Implemented an alternative set of blend factors.
These are used by nouveau and some games like SMO.
2018-08-11 20:57:16 -05:00
greggameplayer 974a959892 Implement R8_UINT RenderTargetFormat & PixelFormat (#1014)
- Used by Go Vacation
2018-08-11 21:44:42 -04:00
Subv 8582c5bb3e RasterizerGL: Ignore invalid/unset vertex attributes.
This should make the es2gears example not crash anymore.
2018-08-11 20:36:40 -05:00
bunnei 94a58af2a2 friend: Stub DeclareCloseOnlinePlaySession.
- Used by Splatoon 2.
2018-08-11 21:34:14 -04:00
bunnei 3c1015b576 friend: Fix CreateFriendService to return an IFriendService interface. 2018-08-11 21:29:58 -04:00
bunnei 3d00bc6ad7 server_session: Provide more useful information and don't crash on bad IPC request. 2018-08-11 21:15:24 -04:00
Lioncash 9aead11e72 gl_rasterizer: Silence implicit truncation warning in SetupShaders()
Previously this would warn of truncating a std::size_t to a u32. This is
safe because we'll obviously never have more than UINT32_MAX amount of
uniform buffers.
2018-08-11 20:32:03 -04:00
Lioncash 53e86e35eb core: Namespace EmuWindow
Gets the class out of the global namespace.
2018-08-11 20:20:21 -04:00
bunnei 20f29b2528 Merge pull request #1010 from bunnei/unk-vert-attrib-shader
gl_shader_decompiler: Improve handling of unknown input/output attributes.
2018-08-11 19:56:28 -04:00
bunnei 38a6ba02aa Merge pull request #1009 from bunnei/rg8-rgba8-snorm
Implement render target formats RGBA8_SNORM and RG8_SNORM.
2018-08-11 19:55:41 -04:00
bunnei 5fd0744a63 gl_shader_decompiler: Improve handling of unknown input/output attributes. 2018-08-11 19:26:45 -04:00
bunnei db008ea9ac Merge pull request #970 from DarkLordZach/loader-errors
loader: Add more descriptive errors
2018-08-11 19:25:30 -04:00
bunnei 5cd97896bf Merge pull request #1018 from Subv/ssy_sync
GPU/Shader: Implemented SSY and SYNC as a set_target/jump pair.
2018-08-11 19:10:02 -04:00
bunnei 8cb27339a2 gl_rasterizer: Implement render target format RG8_SNORM.
- Used by Super Mario Odyssey.
2018-08-11 19:06:42 -04:00
bunnei e8a695064b gl_rasterizer: Implement render target format RGBA8_SNORM.
- Used by Super Mario Odyssey.
2018-08-11 18:59:14 -04:00
Subv 5d543d88b9 GPU/Shader: Don't predicate instructions that don't have a predicate field (SSY). 2018-08-11 16:00:14 -05:00
Subv 995c819038 GPU/Shaders: Implemented SSY and SYNC as a way to modify control flow during shader execution.
SSY sets the target label to jump to when the SYNC instruction is executed.
2018-08-11 15:55:11 -05:00
bunnei 83274a5a47 Merge pull request #1016 from lioncash/video
video_core: Get rid of global variable g_toggle_framelimit_enabled
2018-08-11 14:10:55 -04:00
bunnei 3a13659486 Merge pull request #1003 from lioncash/var
video_core: Use variable template variants of type_traits interfaces where applicable
2018-08-11 14:08:12 -04:00
greggameplayer 3aa4040888 Implement R16S & R16UI & R16I RenderTargetFormats & PixelFormats and more (R16_UNORM needed by Fate Extella) (#848)
* Implement R16S & R16UI & R16I RenderTargetFormats & PixelFormats


Do a separate function in order to get Bytes Per Pixel of DepthFormat


Apply the new function in gpu.h


delete unneeded white space

* correct merging error
2018-08-11 14:01:50 -04:00
David Marcec 4f4b4f94c0 Better UUID randomness 2018-08-12 02:31:43 +10:00
David Marcec 2ecf188584 Removed un-needed count from ListOpenUsers and ListAllUsers 2018-08-12 02:11:04 +10:00
David Marcec c4263ac188 Added better explanations in the profile manager 2018-08-12 01:51:31 +10:00
David Marcec 92c2ee35ca Code cleanup for profile manager 2018-08-12 01:34:22 +10:00
David Marcec 20bd30f40c Removed const from ProfileBase Invalidate 2018-08-12 00:41:17 +10:00
David Marcec 870c42561e fixed invalid uuid bool operator 2018-08-11 21:29:10 +10:00
David Marcec 1a591d1087 Added GetOpenUserCount 2018-08-11 20:45:06 +10:00
David Marcec 6331edd14c Removed all for loops from the profile manager 2018-08-11 20:15:59 +10:00
David Marcec f690fbb921 Added missing ListAllUsers count 2018-08-11 20:06:06 +10:00
David Marcec c951617732 If statement style change 2018-08-11 18:46:42 +10:00
David Marcec 0af4b65406 Second round of account changes 2018-08-11 18:26:13 +10:00
David Marcec 41aa6154ce First round of account changes 2018-08-11 16:47:33 +10:00
David Marcec 56aa6b1c14 Refactored profile manager sharing 2018-08-11 13:17:06 +10:00
David Marcec 013b999f86 Merge remote-tracking branch 'origin/master' into better-account 2018-08-11 10:35:47 +10:00
David Marcec a1d7d82872 Added IsUserRegistrationRequestPermitted 2018-08-11 10:33:11 +10:00
Lioncash 38049444da video_core; Get rid of global g_toggle_framelimit_enabled variable
Instead, we make a struct for renderer settings and allow the renderer
to update all of these settings, getting rid of the need for
global-scoped variables.

This also uncovered a few indirect inclusions for certain headers, which
this commit also fixes.
2018-08-10 19:00:09 -04:00
Lioncash 0170c296f2 renderer_base: Remove unused kFramebuffer enumeration
This is entirely unused and can be removed.
2018-08-10 18:31:13 -04:00
Lioncash 6e352a55d5 video_core: Remove unused Renderer enumeration
Currently we only have an OpenGL renderer, so this is unused in code
(and occupies the Renderer identifier in the VideoCore namespace).
2018-08-10 18:27:40 -04:00
Lioncash bc6245290b qt/game_list: Resolve truncation warning within GameListItemPath's constructor
Silences a warning about truncating from size_t to u32
2018-08-10 18:19:44 -04:00
Lioncash 89aed5c0a2 gt/game_list: Use std::array in GameListItemPath's data() function
We don't need to use a heap-allocated std::vector here, given we
explicitly know the bounds.
2018-08-10 18:19:40 -04:00
Lioncash 1eaa022169 qt/game_list: Remove redundant base class constructor from initializer list
This is called automatically anyways.
2018-08-10 18:17:39 -04:00
bunnei e210c31bb9 maxwell_to_gl: Implement VertexAttribute::Size::Size_8_8.
- Used by Super Mario Odyssey.
2018-08-10 12:47:00 -04:00
bunnei 9502d85a2d maxwell_to_gl: Implement VertexAttribute::Size::Size_32_32_32.
- Used by Super Mario Odyssey.
2018-08-10 12:46:49 -04:00
bunnei f87b1c73f4 Merge pull request #1004 from lioncash/unused
gl_rasterizer_cache: Remove unused viewport parameter of GetFramebufferSurfaces()
2018-08-10 12:13:32 -04:00
bunnei ca79bac393 Merge pull request #1008 from yuzu-emu/revert-697-disable-depth-cull
Revert "gl_state: Temporarily disable culling and depth test."
2018-08-10 12:13:09 -04:00
bunnei 32be28cc04 Revert "gl_state: Temporarily disable culling and depth test." 2018-08-10 10:39:46 -04:00
Zach Hilman 9946a70305 game_list: Reorder error checks
clang-format fix
2018-08-09 21:37:35 -04:00
Zach Hilman da921ac3f3 loader: Add more descriptive errors
Full list of new errors and descriptions in core/loader/loader.h
2018-08-09 21:06:59 -04:00
Lioncash 37d4b37ec4 gl_rasterizer_cache: Remove unused viewport parameter of GetFramebufferSurfaces() 2018-08-09 20:55:41 -04:00
Lioncash b206ee3957 video_core: Use variable template variants of type_traits interfaces where applicable 2018-08-09 20:45:48 -04:00
bunnei 1a9b133715 textures: Refactor out for Texture/Depth FormatFromPixelFormat. 2018-08-09 20:36:03 -04:00
bunnei e6dfe2f2ce Merge pull request #995 from bunnei/gl-buff-bounds
gl_rasterizer_cache: Add bounds checking for gl_buffer copies.
2018-08-09 20:23:30 -04:00
bunnei d8d75f37c6 Merge pull request #997 from lioncash/const-func
core: Make function reference parameters const where applicable
2018-08-09 19:30:51 -04:00
bunnei 78503bab9d Merge pull request #989 from lioncash/log
common/logging: Add missing service log categories
2018-08-09 19:30:14 -04:00
bunnei 922cd52f4b Merge pull request #990 from lioncash/entry
fsp_srv: Emplace entries first when building index instead of emplacing last
2018-08-09 19:29:36 -04:00
bunnei 1887739a29 Merge pull request #1001 from lioncash/reserve
gl_shader_decompiler: Reserve element memory beforehand in BuildRegisterList()
2018-08-09 19:27:35 -04:00
bunnei ba6e31c624 Merge pull request #897 from DarkLordZach/vfs-accuracy-2
vfs: Add VfsFilesystem and fix RealVfs* implementations
2018-08-09 19:22:06 -04:00
bunnei 9509b68082 gl_rasterizer_cache: Add bounds checking for gl_buffer copies. 2018-08-09 19:20:17 -04:00
bunnei 24d1b4653a Merge pull request #991 from bunnei/ignore-mac
maxwell_3d: Ignore macros that have not been uploaded yet.
2018-08-09 19:16:28 -04:00
Khangaroo 0dc1f660e5 Implement SNORM for BC5/DXN2 (#998)
* Implement BC5/DXN2 (#996)

- Used by Kirby Star Allies.

* Implement BC5/DXN2 SNORM

UNORM for Kirby Star Allies
SNORM for Super Mario Odyssey
2018-08-09 19:15:32 -04:00
Lioncash f52fb79b19 gl_shader_decompiler: Reserve element memory beforehand in BuildRegisterList()
Avoids potentially perfoming multiple reallocations when we know the
total amount of memory we need beforehand.
2018-08-09 17:29:11 -04:00
Lioncash 0280e22679 gl_rasterizer_cache: Avoid iterator invalidation issues within InvalidateRegion()
A range-based for loop can't be used when the container being iterated
is also being erased from.
2018-08-09 15:30:20 -04:00
bunnei c984e79040 Merge pull request #992 from bunnei/declr-pred
gl_shader_decompiler: Declare predicates on use.
2018-08-09 14:36:52 -04:00
bunnei 346767d393 Merge pull request #994 from lioncash/const
gl_rasterizer_cache: Use std::vector::assign vs resize() then copy for the non-tiled case
2018-08-09 14:36:06 -04:00
bunnei af45d92e4b Merge pull request #993 from bunnei/smo-vtx-pts
Implement VertexAttribute::Size::Size_16_16_16_16 and PrimitiveTopology::Points.
2018-08-09 13:28:14 -04:00
bunnei 64fb5846e7 Merge pull request #984 from bunnei/rt-none
gl_rasterizer: Do not render when no render target is configured.
2018-08-09 13:12:28 -04:00
Khangaroo b534e67f64 Implement BC5/DXN2 (#996)
- Used by Kirby Star Allies.
2018-08-09 12:57:13 -04:00
Lioncash ff9e0e9727 buffer_queue: Make reference parameter of SetPreallocatedBuffer const
This is simply copied by value, so there's no need to make it a
modifiable reference.

While we're at it, make the names of the parameters match its
definition.
2018-08-09 03:08:14 -04:00
Lioncash b9ec5ec5b4 hle_ipc: Make WriteToOutgoingCommandBuffer()'s reference parameter const
This function doesn't modify anything within the reference Thread
instance.
2018-08-09 02:51:38 -04:00
bunnei c1fd5ddba8 Merge pull request #988 from lioncash/color
common/color: Minor cleanup
2018-08-09 00:37:32 -04:00
bunnei 67a17d36f0 Merge pull request #977 from bunnei/bgr565
gl_rasterizer_cached: Implement RenderTargetFormat::B5G6R5_UNORM.
2018-08-08 23:43:04 -04:00
Lioncash 544265b613 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).
2018-08-08 23:34:57 -04:00
Lioncash 824e3ae7f8 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.
2018-08-08 23:34:58 -04:00
David Marcec 0f5cedb003 Don't add user if the uuid already exists 2018-08-09 13:30:58 +10:00
bunnei 3983e0da89 Merge pull request #987 from lioncash/vec
vector_math: Use variable template version of is_signed in Vec classes
2018-08-08 23:30:40 -04:00
bunnei b0b7437b9f maxwell_to_gl: Implement VertexAttribute::Size::Size_16_16_16_16.
- Used by Super Mario Odyssey (in game).
2018-08-08 23:28:17 -04:00
bunnei 29198d26ec maxwell_to_gl: Implement PrimitiveTopology::Points.
- Used by Super Mario Odyssey (in game).
2018-08-08 23:28:00 -04:00
bunnei 13dec2d87b gl_shader_decompiler: Declare predicates on use.
- Used by Super Mario Odyssey (when going in game).
2018-08-08 23:26:31 -04:00
bunnei cfb59dbe1b maxwell_3d: Ignore macros that have not been uploaded yet.
- Used by Super Mario Odyssey (in game).
2018-08-08 23:25:37 -04:00
Lioncash 4be471509c 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.
2018-08-08 23:14:57 -04:00
bunnei 1e4e0b653a Merge pull request #982 from bunnei/stub-unk-63
gl_shader_decompiler: Stub input attribute Unknown_63.
2018-08-08 22:28:18 -04:00
Zach Hilman e883f6faa8 vfs: Fix documentation 2018-08-08 21:45:04 -04:00
bunnei 2145a127bb Merge pull request #986 from mailwl/acc-loadimage
Service/Account: stub LoadImage function
2018-08-08 21:21:06 -04:00
Zach Hilman 1e2232797a vfs: Fix typo in VfsFilesystem docs 2018-08-08 21:18:45 -04:00
Zach Hilman b43d01f09b file_util: Use enum instead of bool for specifing path behavior 2018-08-08 21:18:45 -04:00
Zach Hilman 55190386b4 loader: Remove unused IdentifyFile overload 2018-08-08 21:18:45 -04:00
Zach Hilman a92960a5d6 vfs: Use RealVfsFilesystem for fs-operations in RealVfsDirectory 2018-08-08 21:18:45 -04:00
Zach Hilman d4ca68f3c5 file_sys: Add missing include in savedata_factory 2018-08-08 21:18:45 -04:00
Zach Hilman 4cbef33915 core: Port core to VfsFilesystem for file access 2018-08-08 21:18:45 -04:00
Zach Hilman 4f44293e63 vfs: Add unreachable assert to file permissions converter 2018-08-08 21:18:45 -04:00
Zach Hilman 6b97b22716 vfs: Add RealVfsFilesystem implementation 2018-08-08 21:18:45 -04:00
Zach Hilman 944f8b80d8 file_util: Add platform-specific slash option to SanitizePath 2018-08-08 21:18:45 -04:00
Zach Hilman 325a55bb1e vfs: Add VfsFilesystem interface and default implementation 2018-08-08 21:18:45 -04:00
Zach Hilman 653257de93 filesystem: Remove unnecessary if conditions 2018-08-08 21:18:45 -04:00
bunnei 6978915f4e gl_rasterizer: Do not render when no render target is configured.
- Used by Super Mario Odyssey.
2018-08-08 19:29:45 -04:00
bunnei e56c6add05 Merge pull request #976 from bunnei/shader-imm
gl_shader_decompiler: Let OpenGL interpret floats.
2018-08-08 19:17:01 -04:00
bunnei 98ac2fa5c3 Merge pull request #981 from bunnei/cbuf-corrupt
maxwell_3d: Use correct const buffer size and check bounds.
2018-08-08 19:16:34 -04:00
bunnei ba10208eb2 Merge pull request #978 from bunnei/fixioctl
nvhost_gpu: Don't over copy IoctlSubmitGpfifo.
2018-08-08 19:16:14 -04:00
Lioncash 4cfe9fad75 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.
2018-08-08 18:51:52 -04:00
Lioncash a1320c53af 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.
2018-08-08 18:51:41 -04:00
bunnei 28e3b98c6b Merge pull request #985 from bunnei/rt-r11g11b10
gpu: Add R11G11B10_FLOAT to RenderTargetBytesPerPixel.
2018-08-08 18:21:34 -04:00
bunnei 47a25d7cd7 Merge pull request #979 from bunnei/vtx88
maxwell_to_gl: Implement VertexAttribute::Size::Size_8_8.
2018-08-08 18:18:50 -04:00
bunnei 9e94b8f830 Merge pull request #975 from bunnei/am-stub
am: Stub SetScreenShotImageOrientation.
2018-08-08 16:46:45 -04:00
Lioncash 5415ccb7da common/logging: Add missing service log categories
These weren't added when the services were introduced.
2018-08-08 16:46:28 -04:00
bunnei 123518a321 Merge pull request #980 from bunnei/fix-logs
renderer_opengl: Use trace log in a few places.
2018-08-08 16:45:42 -04:00
Lioncash 18cd5b3930 common/color: Remove unnecessary const qualifiers on return types
These are just superfluous and not necessesary
2018-08-08 16:17:41 -04:00
Lioncash 2fe76428c5 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.
2018-08-08 16:14:37 -04:00
Lioncash e3444cb2a6 vector_math: Use variable template version of is_signed in Vec classes
Same behavior, less code
2018-08-08 15:53:42 -04:00
bunnei 5ae5657421 Merge pull request #966 from lioncash/modernize
common: Convert type traits templates over to variable template versions where applicable
2018-08-08 15:28:34 -04:00
bunnei 0eeda98acf Merge pull request #850 from DarkLordZach/icon-meta
Add Icons and Metadata Support
2018-08-08 12:27:19 -04:00
bunnei a26923ef44 Merge pull request #968 from lioncash/vec
vector_math: Minor cleanups
2018-08-08 12:00:13 -04:00
bunnei e74d6dd0d1 Merge pull request #958 from lioncash/nv-global
nvdrv: Get rid of global std::weak_ptr
2018-08-08 11:58:45 -04:00
David Marcec 52f6050b88 Open first user added 2018-08-09 01:37:55 +10:00
David Marcec 43324c4188 Inital pass of account backend implementation
This commit verified working on puyo
2018-08-09 01:09:12 +10:00
David Marcec c908d31bbf GetProfileBase and GetProfileBaseAndData added 2018-08-08 23:41:12 +10:00
David Marcec 1aad022de2 began initial implementation of "ProfileManager" 2018-08-08 22:26:42 +10:00
mailwl 89cc070fcf Service/Account: stub LoadImage function 2018-08-08 14:42:54 +03:00
David Marcec d83491769e Switched uuids from u128 to new UUID struct 2018-08-08 21:09:45 +10:00
bunnei 2a28031596 Merge pull request #972 from lioncash/catch
externals: Update catch to 2.3.0
2018-08-08 03:00:57 -04:00
bunnei fd89c5a7d4 Merge pull request #965 from lioncash/unused-files
hle: Remove unused romfs.cpp/.h
2018-08-08 03:00:38 -04:00
bunnei 3485776e57 Merge pull request #974 from lioncash/acc
acc: Add missing function table entries for GetUserCount
2018-08-08 02:56:00 -04:00
bunnei 1e66ac1103 gpu: Add R11G11B10_FLOAT to RenderTargetBytesPerPixel.
- Used by Super Mario Odyssey.
2018-08-08 02:42:14 -04:00
mailwl 219c0dabe1 hid: fix IsSixAxisSensorAtRest() response 2018-08-08 09:36:23 +03:00
bunnei 37e2165d82 gl_shader_decompiler: Stub input attribute Unknown_63. 2018-08-08 02:35:59 -04:00
bunnei 89b9893d28 maxwell_3d: Use correct const buffer size and check bounds.
- Fixes mem corruption with Super Mario Odyssey and Pokkén Tournament DX.
2018-08-08 02:10:25 -04:00
bunnei a23331808d renderer_opengl: Use trace log in a few places. 2018-08-08 01:53:23 -04:00
bunnei be0642cb94 maxwell_to_gl: Implement VertexAttribute::Size::Size_8_8. 2018-08-08 01:50:53 -04:00
bunnei e0f48e4daf nvhost_gpu: Don't over copy IoctlSubmitGpfifo. 2018-08-08 01:49:47 -04:00
bunnei 5381a038ca gl_rasterizer_cached: Implement RenderTargetFormat::B5G6R5_UNORM.
- Used by Super Mario Odyssey.
2018-08-08 01:48:27 -04:00
bunnei 3ee2d948a2 gl_shader_decompiler: Let OpenGL interpret floats.
- Accuracy is lost in translation to string, e.g. with NaN.
- Needed for Super Mario Odyssey.
2018-08-08 01:45:23 -04:00
bunnei 5851753d2a am: Stub SetScreenShotImageOrientation.
- Used by Super Mario Odyssey.
2018-08-08 00:41:35 -04:00
Lioncash 3266d0989f 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.
2018-08-07 22:50:45 -04:00
bunnei a0c94e433d acc: Stub GetUserCount. (#973)
- Used by Pokken Tournament DX.
2018-08-07 22:39:12 -04:00
bunnei cda973349a Merge pull request #967 from lioncash/sign
file_util: Avoid sign-conversions in WriteArray() and ReadArray()
2018-08-07 22:37:00 -04:00
Lioncash e8824d065b nvdrv: Get rid of global std::weak_ptr
Rather than use global state, we can simply pass the instance into the
NVFlinger instance directly.
2018-08-07 21:53:05 -04:00
Lioncash 9e90145916 vector_math: Remove unimplemented function prototypes 2018-08-07 21:33:48 -04:00
Lioncash 3868198de6 vector_math: Make functions constexpr where applicable 2018-08-07 21:32:05 -04:00
Lioncash 1393309653 vector_math: Convert typedefs to type aliases 2018-08-07 21:15:10 -04:00
Lioncash 6b1e9244c0 common: Convert type traits templates over to variable template versions where applicable
Uses the C++17 inline variable variants
2018-08-07 19:34:47 -04:00
Lioncash fdde0c66db hle: Remove unused romfs.cpp/.h
These files are no longer used, so we can get rid of them.
2018-08-07 19:34:12 -04:00
Lioncash a7798e834a externals: Update catch to 2.3.0
Updates the library from 2.2.3 to 2.3.0
2018-08-07 19:26:13 -04:00
bunnei 06254058b4 Merge pull request #964 from Hexagon12/lower-logs
Lowered down the logging for command processor methods
2018-08-07 19:00:19 -04:00
Hexagon12 81fdfc4192 Fixed the sRGB pixel format (#963)
* Changed the sRGB pixel format return

* Add a message about SRGBA -> RGBA conversion
2018-08-07 18:59:50 -04:00
Zach Hilman 0ddf082be2 configure_gamelist: Use explicit QVariant constructor 2018-08-07 17:10:10 -04:00
bunnei a12c19e1c3 Merge pull request #920 from DarkLordZach/titlekey
content_archive: Add support for titlekey cryptography
2018-08-07 17:01:25 -04:00
bunnei cd41c647f1 Merge pull request #957 from lioncash/event
nvflinger: Correct typo in name of composition event
2018-08-07 15:56:51 -04:00
bunnei a777f14e18 Merge pull request #954 from lioncash/hid
services/hid: Add ActivateNpadWithRevision() to the hid function info array
2018-08-07 15:56:34 -04:00
bunnei d93f3bd129 Merge pull request #960 from lioncash/apm
service/apm: Add the apm:sys service
2018-08-07 14:57:12 -04:00
bunnei 412032e69d Merge pull request #950 from lioncash/hotkey
qt/hotkey: Get rid of global hotkey map instance
2018-08-07 14:45:45 -04:00
bunnei 2493d8b5c1 Merge pull request #955 from lioncash/view
nvflinger: Use std::string_view in OpenDisplay()
2018-08-07 14:26:51 -04:00
bunnei a87a2b8737 Merge pull request #953 from lioncash/time
service/time: Amend command IDs of ToPosixTime() and ToPosixTimeWithMyRule()
2018-08-07 14:25:52 -04:00
bunnei 94e979a6be Merge pull request #959 from KAMiKAZOW/cubeb-compilation
Make building cubeb optional
2018-08-07 14:25:17 -04:00
bunnei 785aececf3 Merge pull request #956 from lioncash/nv
nvdrv: Get rid of indirect inclusions
2018-08-07 14:23:32 -04:00
Lioncash 30c608d046 file_util: Avoid sign-conversions in WriteArray() and ReadArray()
Prevents compiler warnings.
2018-08-07 13:51:37 -04:00
Hexagon12 d87674e755 Lowered down the logging for methods 2018-08-07 19:51:40 +03:00
bunnei 17c102b576 Merge pull request #952 from lioncash/usb
service: Add usb services
2018-08-07 11:27:49 -04:00
bunnei 90ebf1828c Merge pull request #949 from lioncash/priv
client_port: Make all data members private
2018-08-07 11:20:26 -04:00
Zach Hilman 9aa2bfc60c loader: Fix scope error in DeconstructedRomDirectory 2018-08-07 10:37:38 -04:00
Lioncash a3f5289038 service/apm: Add the apm:sys service
Adds the basic skeleton of the apm:sys service based off the information
on Switch Brew.
2018-08-07 10:05:26 -04:00
Lioncash 64e8d3fd3d nvflinger: Correct typo in name of composition event 2018-08-07 09:03:52 -04:00
Lioncash e1625fdbec nvdrv: Make Ioctl()'s definition match its prototype
The only reason this wasn't a compilation error is because we use
little-endian systems.
2018-08-07 08:57:11 -04:00
Lioncash 5bdcce6955 nvdrv: Get rid of indirect inclusions 2018-08-07 08:54:50 -04:00
Lioncash fd0111572b nvflinger: Get rid of indirect inclusions 2018-08-07 08:32:05 -04:00
Lioncash a907041218 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.
2018-08-07 08:32:06 -04:00
KAMiKAZOW fef6c33e77 Make building cubeb optional 2018-08-07 13:21:56 +02:00
Lioncash 20f059acef services/hid: Add ActivateNpadWithRevision() to the hid function info array
Updated based off the information on Switch Brew.
2018-08-07 03:23:20 -04:00
Lioncash 0c0bdb7d9e service/time: Amend command IDs of ToPosixTime() and ToPosixTimeWithMyRule()
Updates the ID of these based off the information on Switch Brew.
2018-08-07 03:18:07 -04:00
Lioncash 705c5b6166 service: Add usb services
Adds basic skeleton for the usb services based off the information provided by Switch Brew.
2018-08-07 03:14:03 -04:00
Lioncash ee8808c6a7 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.
2018-08-07 02:28:17 -04:00
Zach Hilman d53b3a13b3 loader: Add icon and title support to XCI 2018-08-06 23:13:42 -04:00
Zach Hilman 469f7cefe4 Use const where applicable 2018-08-06 23:06:33 -04:00
Zach Hilman f89988272e Avoid parsing RomFS to directory in NCA 2018-08-06 23:06:33 -04:00
Lioncash 5fcac98ec8 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.
2018-08-06 23:05:17 -04:00
bunnei 44f76e2cfd Merge pull request #931 from DarkLordZach/nca-as-drd
loader: Make AppLoader_NCA rely on directory loading code
2018-08-06 22:02:41 -04:00
bunnei caf5d8d15a Merge pull request #947 from lioncash/encoding
game_list: Use QString::fromStdString() where applicable instead of c_str()
2018-08-06 22:02:01 -04:00
Hedges 3e421bb6fb GDBStub works with both Unicorn and Dynarmic now (#941)
* GDBStub works with both Unicorn and Dynarmic now

* Tidy up
2018-08-06 22:01:24 -04:00
bunnei 0f23a124f7 Merge pull request #943 from lioncash/decl
game_list: Join declarations and assignments in onTextChanged()
2018-08-06 22:00:49 -04:00
bunnei a6ad14902c Merge pull request #946 from lioncash/compress
qt/main: Collapse if statement in UpdateRecentFiles()
2018-08-06 21:34:20 -04:00
bunnei 48e19379cb Merge pull request #944 from lioncash/menu
qt: Don't show error dialog when canceling the Load Folder dialog
2018-08-06 21:33:23 -04:00
bunnei 2e734eeb0c Merge pull request #942 from lioncash/default
qt: Minor cleanup-related changes
2018-08-06 21:32:25 -04:00
bunnei 39e6698f2c Merge pull request #940 from lioncash/private
kernel/event: Make data members private
2018-08-06 21:31:25 -04:00
bunnei 7dafc8b634 Merge pull request #936 from bunnei/avoid-copies
gl_rasterizer_cache: Avoid superfluous surface copies.
2018-08-06 21:29:29 -04:00
bunnei 51c6d09680 Merge pull request #934 from lioncash/chrono
core_timing: Make GetGlobalTimeUs() return std::chrono::microseconds
2018-08-06 18:03:05 -04:00
Lioncash 4de0824ad2 qt/main: Avoid sign conversions in UpdateRecentFiles()
This was intermixing signed and unsigned values when they could all just
be signed.
2018-08-06 15:42:44 -04:00
Lioncash 35f1943b0f 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.
2018-08-06 15:06:29 -04:00
Lioncash 2d3b313879 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.
2018-08-06 15:06:30 -04:00
Lioncash c41c5028db game_list: Join declarations and assignments in onTextChanged()
There's no need to keep these separate from one another.
2018-08-06 14:35:40 -04:00
Lioncash 9790f8c9ff 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.
2018-08-06 14:32:28 -04:00
Lioncash 0c6d371dd0 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.
2018-08-06 14:17:13 -04:00
Lioncash ab6bc68bc1 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.
2018-08-06 14:02:34 -04:00
Lioncash 56cde60393 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.
2018-08-06 13:42:12 -04:00
Lioncash a648516863 qt: Add missing override specifiers where applicable 2018-08-06 13:29:14 -04:00
Lioncash 5de7c31baa qt: Default destructors where applicable
Makes code consistent with our style of defaulting special member
functions where applicable.
2018-08-06 13:27:08 -04:00
Lioncash 11eadbccc9 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.
2018-08-06 12:53:02 -04:00
bunnei bca27da66b Merge pull request #933 from lioncash/memory
memory: Correct prototype of ZeroBlock
2018-08-06 12:34:57 -04:00
mailwl d77ba2a4df Service/Audio: audout_a.cpp: remove pragma once 2018-08-06 12:29:27 +03:00
bunnei 881573c77a maxwell_3d: Remove outdated assert. 2018-08-05 23:57:19 -04:00
bunnei 2bb2f176b1 gl_rasterizer_cache: Avoid superfluous surface copies. 2018-08-05 23:40:03 -04:00
bunnei cdb4cd4254 Merge pull request #932 from lioncash/func
core_timing: Use transparent functors where applicable
2018-08-05 23:37:53 -04:00
bunnei 42aae6b040 Merge pull request #929 from lioncash/addr
gdbstub: Minor changes
2018-08-05 23:36:26 -04:00
bunnei cb37285626 Merge pull request #930 from lioncash/thread
address_arbiter: Return by value from GetThreadsWaitingOnAddress()
2018-08-05 23:35:59 -04:00
bunnei bccec4825d Merge pull request #925 from bunnei/audren
Implement audren audio output
2018-08-05 23:35:22 -04:00
Lioncash 610c7e7685 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.
2018-08-05 22:12:58 -04:00
Lioncash c34ee8cf08 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.
2018-08-05 22:07:30 -04:00
Lioncash ab21a210b1 memory: Make prototype parameter names match their definitions
Keeps the code consistent.
2018-08-05 21:39:09 -04:00
Lioncash 856edeb95d memory: Correct prototype of ZeroBlock
Previously, the prototype wasn't matching the definition, which has a
Processor parameter before the destination address.
2018-08-05 21:39:06 -04:00
Lioncash 572bff0143 memory: Remove unnecessary const qualifiers in prototypes
These aren't necessary, as value-wise const only matters in the
definition.
2018-08-05 21:38:22 -04:00
Lioncash 82ab069b22 core_timing: Convert typedef into a type alias
Makes the alias a little more readable from left-to-right.
2018-08-05 21:27:14 -04:00
Lioncash c03f854546 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.
2018-08-05 21:19:24 -04:00
Zach Hilman 8d948e4f17 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.
2018-08-05 18:28:15 -04:00
bunnei ee30143bf3 Merge pull request #927 from bunnei/fix-texs
gl_shader_decompiler: Fix TEXS mask and dest.
2018-08-05 16:42:21 -04:00
Lioncash a3e0a2d3b3 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.
2018-08-05 16:41:22 -04:00
Lioncash 6602a1b319 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.
2018-08-05 16:41:18 -04:00
bunnei 5160c0c975 Merge pull request #912 from lioncash/global-var
video_core: Eliminate the g_renderer global variable
2018-08-05 16:37:39 -04:00
Lioncash 65c0fe0d39 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.
2018-08-05 16:29:17 -04:00
Lioncash 88023a481d gdbstub: Replace PAddr alias with VAddr
In all cases, a virtual address is being passed in, not a physical one.
2018-08-05 15:56:01 -04:00
bunnei 4215d08d37 gl_shader_decompiler: Fix TEXS mask and dest. 2018-08-05 01:47:09 -04:00
bunnei 14d7adf99a Merge pull request #926 from ogniK5377/vertex-attrib-format
gl_rasterizer: Fix glVertexAttribFormat for integers
2018-08-05 01:38:54 -04:00
bunnei 5904aa20ce audio_core: Implement audren_u audio playback. 2018-08-04 21:54:30 -04:00
David Marcec 112a0b8d6d added braces for conditions 2018-08-05 11:36:55 +10:00
David Marcec 45078c8b24 fix the attrib format for ints 2018-08-05 11:29:21 +10:00
bunnei c33e13366f Merge pull request #924 from lioncash/arp
service: Add arp services
2018-08-04 21:20:26 -04:00
bunnei c4d7092d4b Merge pull request #921 from lioncash/view
core/crypto: Minor changes
2018-08-04 21:17:10 -04:00
bunnei 600e4bbeac audio_core: Use s16 where possible for audio samples. 2018-08-04 18:22:58 -04:00
bunnei 7688b83a1c audio_core: Port codec code from Citra for ADPCM decoding. 2018-08-04 18:22:58 -04:00
Lioncash ed0e62fe9e service: Add arp services
Adds the basic skeleton of the arp services based off the information
provided by Switch Brew.
2018-08-04 18:01:12 -04:00
Lioncash 2ce618c2c8 service: Remove redundant #pragma once directives
These don't do anything within .cpp files (we don't include cpp files,
so...)
2018-08-04 17:39:08 -04:00
Lioncash c8617a1465 aes_util: Add static assertion to Transcode() and XTSTranscode() to ensure well-defined behavior
These functions should only be given trivially-copyable types.
2018-08-04 17:30:52 -04:00
Lioncash f0a2d4da2b aes_util: Make CalculateNintendoTweak() an internally linked function
This function doesn't directly depend on class state, so it can be
hidden entirely from the interface in the cpp file.
2018-08-04 17:30:48 -04:00
Lioncash 1fb5027501 aes_util: Make Transcode() a const member function
This doesn't modify member state, so it can be made const.
2018-08-04 16:49:42 -04:00
Lioncash 8b86a89dd5 core/crypto: Remove unnecessary includes 2018-08-04 16:44:07 -04:00
Lioncash d74342ad3f key_manager: Use regular std::string instead of std::string_view
The benefit of std::string_view comes from the idea of avoiding copies
(essentially acting as a non-owning view), however if we're just going
to copy into a local variable immediately, there's not much benefit
gained here.
2018-08-04 16:37:30 -04:00
bunnei 950de5fd73 cubeb_sink: Support variable sample_rate and num_channels. 2018-08-04 15:30:10 -04:00
Zach Hilman 3150538b3f content_archive: Add support for titlekey cryptography 2018-08-04 14:57:21 -04:00
bunnei 97647e60f2 audio_core: Sinks need unique names as well. 2018-08-04 14:34:12 -04:00
bunnei 7186882bfe audio_core: Streams need unique names for CoreTiming. 2018-08-04 14:34:12 -04:00
bunnei 4c42134b09 Merge pull request #849 from DarkLordZach/xci
XCI and Encrypted NCA Support
2018-08-04 14:33:11 -04:00
bunnei a43ae368d3 Merge pull request #919 from lioncash/sign
gl_shader_manager: Amend sign differences in an assertion comparison in SetShaderUniformBlockBinding()
2018-08-04 14:29:59 -04:00
Lioncash 32901799b5 gl_shader_manager: Invert conditional in SetShaderUniformBlockBinding()
This lets us indent the majority of the code and places the error case
first.
2018-08-04 02:57:11 -04:00
Lioncash c043a5c930 gl_shader_manager: Amend sign differences in an assertion comparison in SetShaderUniformBlockBinding()
Ensures both operands have the same sign in the comparison.

While we're at it, we can get rid of the redundant casting of ub_size to
an int. This type will always be trivial and alias a built-in type (not
doing so would break backwards compatibility at a standard level).
2018-08-04 02:55:03 -04:00
Lioncash 69bbe31ca8 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 49dc22f84e 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
bunnei bf006dd1d4 Merge pull request #911 from lioncash/prototype
video_core: Remove unimplemented Start() function prototype
2018-08-04 02:18:38 -04:00
bunnei a8755cb738 Merge pull request #913 from lioncash/unused-func
memory: Remove unused GetSpecialHandlers() function
2018-08-04 02:17:44 -04:00
bunnei 017fa55c0a Merge pull request #914 from lioncash/codeset
kernel/process: Use accessors instead of class members for referencing segment array
2018-08-04 02:17:25 -04:00
bunnei 26a9093726 Merge pull request #917 from lioncash/crash
kernel/thread: Fix potential crashes introduced in 3bcf090d
2018-08-04 01:19:01 -04:00
Lioncash 6f3a3ed8c5 kernel/thread: Fix potential crashes introduced in 3bcf090d37
This amends cases where crashes can occur that were missed due to the
odd way the previous code was set up (using 3DS memory regions that
don't exist).
2018-08-03 23:49:10 -04:00
bunnei 46db65403f Merge pull request #910 from lioncash/unused
gl_shader_decompiler: Remove unused variable in GenerateDeclarations()
2018-08-03 15:54:11 -04:00
Lioncash 73e1be4350 kernel/process: Use std::array where applicable 2018-08-03 14:46:30 -04:00
Lioncash 73f162a5b0 kernel/process: Use accessors instead of class members for referencing segment array
Using member variables for referencing the segments array increases the
size of the class in memory for little benefit. The same behavior can be
achieved through the use of accessors that just return the relevant
segment.
2018-08-03 14:45:45 -04:00
Lioncash 0e92e67e06 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
bunnei 67b4326d93 Merge pull request #908 from lioncash/memory
core/memory: Get rid of 3DS leftovers
2018-08-03 14:07:49 -04:00
Lioncash 02cdd82efc video_core: Remove unimplemented Start() function prototype
Given this has no definition, we can just remove it entirely.
2018-08-03 12:48:14 -04:00
Lioncash c155adb42a gl_shader_decompiler: Remove unused variable in GenerateDeclarations()
This variable was being incremented, but we were never actually using
it.
2018-08-03 12:18:31 -04:00
Lioncash 300a4e3d79 gl_shader_manager: Make ProgramManager's GetCurrentProgramStage() a const member function
This function doesn't modify class state, so it can be made const.
2018-08-03 12:08:17 -04:00
Lioncash 3bcf090d37 core/memory: Get rid of 3DS leftovers
Removes leftover code from citra that isn't needed.
2018-08-03 11:22:47 -04:00
David 4a4641a134 Added ability to change username & language code in the settings ui. Added IProfile::Get and SET::GetLanguageCode for libnx tests (#851) 2018-08-03 11:02:55 -04:00
bunnei 1028560b4c Merge pull request #895 from lioncash/sink
sink_details: std::move std::function instances
2018-08-03 11:00:56 -04:00
bunnei 485a6770e9 Merge pull request #898 from lioncash/mig
service: Add migration services
2018-08-03 11:00:27 -04:00
bunnei ff296707b1 Merge pull request #900 from lioncash/init
math_util: Always initialize members of Rectangle
2018-08-03 11:00:10 -04:00
bunnei 299975e4a8 Merge pull request #892 from lioncash/global
video_core: Make global EmuWindow instance part of the base renderer …
2018-08-03 00:31:32 -04:00
bunnei 20b6c79859 Merge pull request #894 from lioncash/object
kernel: Move object class to its own source files
2018-08-03 00:28:43 -04:00
bunnei 9f560b2c57 Merge pull request #904 from lioncash/static
kernel/thread: Minor changes
2018-08-03 00:19:29 -04:00
bunnei b6930f7a1e Merge pull request #906 from lioncash/override
input_common: minor changes
2018-08-03 00:18:52 -04:00
bunnei ca12628324 Merge pull request #907 from lioncash/slot
yuzu: Use Qt 5 signal/slots where applicable
2018-08-03 00:17:55 -04:00
bunnei 3ce7cf5e42 Merge pull request #905 from lioncash/vma
kernel/vm_manager: Minor changes
2018-08-02 23:18:03 -04:00
bunnei f720eee031 Merge pull request #903 from lioncash/copy
vfs_vector: Minor changes
2018-08-02 23:01:19 -04:00
bunnei 309b596a21 Merge pull request #901 from lioncash/ref
gl_shader_manager: Take ShaderSetup instances by const reference in UseProgrammableVertexShader() and UseProgrammableFragmentShader()
2018-08-02 23:00:56 -04:00
Lioncash f90c667a44 yuzu: Use Qt 5 signal/slots where applicable
Makes the signal/slot connections type-safe instead of string-based.
2018-08-02 22:18:33 -04:00
Lioncash fc2d6869bf input_common: Use std::move where applicable
Avoids unnecessary atomic reference count increments and decrements
2018-08-02 21:51:11 -04:00
Lioncash d682d53bb2 input_common: Add missing override specifiers 2018-08-02 21:44:25 -04:00
bunnei 403cb09019 Merge pull request #899 from lioncash/unused
hw: Remove unused files
2018-08-02 14:58:01 -04:00
bunnei b57d279b57 Merge pull request #902 from lioncash/array
gl_state: Make texture_units a std::array
2018-08-02 14:57:42 -04:00
bunnei 4a087fed32 Merge pull request #891 from lioncash/ns
service/ns: Add missing ns services
2018-08-02 14:57:24 -04:00
greggameplayer 6abb522f98 Implement RGB32F PixelFormat (#886) (used by Go Vacation) 2018-08-02 14:56:38 -04:00
bunnei fc6356f5c2 Merge pull request #893 from lioncash/psc
service: Add the psc services
2018-08-02 14:53:55 -04:00
Lioncash bf632d8e1e kernel/vm_manager: Convert loop into std::any_of() 2018-08-02 12:46:15 -04:00
Lioncash ec7319a5de kernel/vm_manager: Use const where applicable
Makes our immutable state explicit.
2018-08-02 12:21:46 -04:00
Lioncash 26e2e7b657 kernel/vm_manager: Use the VAddr type alias in CarveVMA()
These two variables correspond to address ranges.
2018-08-02 12:15:50 -04:00
Lioncash fa173d1874 kernel/thread: Make GetFreeThreadLocalSlot()'s loop indices size_t
Avoids using a u32 to compare against a range of size_t, which can be a
source of warnings. While we're at it, compress a std::tie into a
structured binding.
2018-08-02 12:01:25 -04:00
Lioncash 12afa56830 kernel/thread: Make GetFreeThreadLocalSlot() reference parameter a const reference
This function only reads the data being referenced, it doesn't modify
it, so we can turn the reference into a const reference.
2018-08-02 11:56:11 -04:00
Lioncash 16c5f5fe1b kernel/thread: Make GetFreeThreadLocalSlot() internally linked
This function isn't used outside of this translation unit, so we can
make it internally linked.
2018-08-02 11:54:23 -04:00
Lioncash 5b317d1b80 vfs_vector: Remove unused variable in FindAndRemoveVectorElement()
This wasn't being used for anything, so it can be removed.
2018-08-02 11:40:24 -04:00
Lioncash 0bb1b9c168 vfs_vector: Avoid unnecessary copies where applicable
The lambda elements should be taken by const reference here, and we can
move the virtual directory passed to ReplaceFileWithSubdirectory()
2018-08-02 11:37:39 -04:00
Lioncash 68150d3d79 gl_state: Make texture_units a std::array
Gets rid of the use of a raw C array.
2018-08-02 11:19:58 -04:00
Lioncash 807d0cf4f2 gl_shader_manager: Take ShaderSetup instances by const reference in UseProgrammableVertexShader() and UseProgrammableFragmentShader()
Avoids performing unnecessary copies of 65560 byte sized ShaderSetup
instances, considering it's only used as part of lookup and not
modified.

Given the parameters were already const, it's likely taking these
parameters by reference was intended but the ampersand was forgotten.
2018-08-02 11:09:46 -04:00
Lioncash 9f5ba9df95 math_util: Always initialize members of Rectangle
Prevents potentially using the members uninitialized.
2018-08-02 10:47:34 -04:00
Lioncash db3603df94 hw: Remove unused files
None of these files are used in any meaningful way. They're just
leftovers from citra. Also has the benefit of getting rid of an unused
global variable.
2018-08-02 10:23:10 -04:00
Lioncash 6ac24e4e5a service: Add migration services
Adds the basic skeleton for the mig:usr service based off information
provided by Switch Brew.
2018-08-02 10:09:45 -04:00
Lioncash 07a3c8a2a5 audio_out: Use Buffer::Tag alias in GetTagsAndReleaseBuffers()'s prototype
This makes the Buffer::Tag usage consistent with the Stream class's
prototype of GetTagsAndReleaseBuffers().
2018-08-02 05:18:32 -04:00
Lioncash 881380bc97 sink_details: Deduplicate long std::function repetition
We can just use type aliases to avoid needing to write the same long
type twice
2018-08-01 23:56:02 -04:00
Lioncash 5061e89fd1 sink_details: std::move std::function instances
Given std::function is allowed to potentially allocate, these should be
std::move'd to prevent potential reallocation (should that ever happen).
2018-08-01 23:50:48 -04:00
Lioncash 38c2af9330 kernel: Move object class to its own source files
General moving to keep kernel object types separate from the direct
kernel code. Also essentially a preliminary cleanup before eliminating
global kernel state in the kernel code.
2018-08-01 23:34:42 -04:00
Lioncash f29d848665 logging/log: Remove incorrect description in PCV doc comment
PCV isn't the parental control service.
2018-08-01 23:31:31 -04:00
Lioncash 4d9067936c service: Add psc services
Adds the basic skeleton for the psc services based off the information
provided by Switch Brew.
2018-08-01 23:31:27 -04:00
Lioncash 153a00ebc0 video_core: Make global EmuWindow instance part of the base renderer class
Makes the global a member of the RendererBase class. We also change this
to be a reference. Passing any form of null pointer to these functions
is incorrect entirely, especially given the code itself assumes that the
pointer would always be in a valid state.

This also makes it easier to follow the lifecycle of instances being
used, as we explicitly interact the renderer with the rasterizer, rather
than it just operating on a global pointer.
2018-08-01 21:40:30 -04:00
bunnei 12cbf9b562 Merge pull request #888 from lioncash/caps
service: Add capture services
2018-08-01 21:34:28 -04:00
bunnei f05a56e537 Merge pull request #890 from lioncash/logger
lm: Amend name of ILogger
2018-08-01 21:33:11 -04:00
bunnei 8d2a4d0cc0 Merge pull request #889 from lioncash/fsp
service/filesystem: Add fsp:ldr and fsp:pr services
2018-08-01 21:32:54 -04:00
Lioncash a155fe49dd service/ns: Add missing ns services
Implements the basic skeleton of ns:am2, ns:ec, ns:rid, ns:rt, ns:su,
ns:vm, and ns:web based off the information provided by Switch Brew and
SwIPC.
2018-08-01 18:02:18 -04:00
Lioncash 732fe76a41 lm: Amend name of ILogger
Previously this was being registered with the name "Logger". While we're
at it, also change the name of the class to match it.
2018-08-01 17:08:44 -04:00
Lioncash 1d3dfe7e22 service/filesystem: Add fsp:ldr and fsp:pr services
Adds the basic skeleton for the remaining fsp services based off
information provided by Switch Brew.
2018-08-01 17:01:29 -04:00
Lioncash a267a3cc08 service: Add capture services
Adds the basic skeleton for the capture services based off information
provided by Switch Brew.
2018-08-01 16:45:51 -04:00
Lioncash 2635578300 service: Add bpc and pcv services
Adds the basic skeleton for the remaining pcv-related services based off
information on Switch Brew.
2018-08-01 16:13:04 -04:00
Unknown 6b77105b3d Implement R32_FLOAT RenderTargetFormat 2018-08-01 15:31:42 +02:00
bunnei 500da48f7c Merge pull request #882 from lioncash/unused
kernel/thread: Remove unimplemented function prototype
2018-07-31 22:25:49 -07:00
Zach Hilman 5b9d48ba43 Add missing parameter to files.push_back() 2018-08-01 00:16:54 -04:00
Zach Hilman 9a3f7d702f Fix merge conflicts with opus and update docs 2018-08-01 00:16:54 -04:00
Zach Hilman 9b710a5901 Use more descriptive error codes and messages 2018-08-01 00:16:54 -04:00
Zach Hilman 1f83886c21 Use static const instead of const static 2018-08-01 00:16:54 -04:00
Zach Hilman f93e75f496 Use ErrorEncrypted where applicable and fix no keys crash 2018-08-01 00:16:54 -04:00
Zach Hilman 568ce6304c Add missing includes and use const where applicable 2018-08-01 00:16:54 -04:00
Zach Hilman feb6b2b4a8 Allow key loading from %YUZU_DIR%/keys in addition to ~/.switch 2018-08-01 00:16:54 -04:00
Zach Hilman e7ae26a563 Use SHGetKnownFolderPath instead of SHGetFolderPathA 2018-08-01 00:16:54 -04:00
Zach Hilman 272ca87298 Make XCI comply to review and style guidelines 2018-08-01 00:16:54 -04:00
Zach Hilman 03467b64e3 Extract mbedtls to cpp file 2018-08-01 00:16:54 -04:00
Zach Hilman 0c75b8d6b2 Add missing string.h include 2018-08-01 00:16:54 -04:00
Zach Hilman bba2d504f0 Update mbedtls and fix compile error 2018-08-01 00:16:54 -04:00
Zach Hilman b10c0d291f Remove files that are not used 2018-08-01 00:16:54 -04:00
bunnei c3279b3a75 Merge pull request #871 from bunnei/audio-config
audio_core: Add configuration settings.
2018-07-31 21:04:26 -07:00
Lioncash 682836d539 kernel/thread: Remove unimplemented function prototype
Given there's no implementation, we may as well remove the code
entirely.
2018-07-31 23:21:38 -04:00
bunnei b9d19ca36e Merge pull request #877 from lioncash/remove
kernel: Remove unused object_address_table.cpp/.h
2018-07-31 20:11:39 -07:00
bunnei 56ff09b880 Merge pull request #880 from lioncash/audio
service/audio: Add missing services
2018-07-31 20:11:04 -07:00
bunnei 14d9b2d6d3 audio_core: Add configuration settings. 2018-07-31 22:38:42 -04:00
bunnei f9fec85f81 Merge pull request #876 from lioncash/include
kernel: Remove unnecessary includes
2018-07-31 19:16:05 -07:00
Lioncash c3deab1f6e service/audio: Add missing services
Adds the missing audctl service, as well as the :a and :d services for
audin, audout, audrec, and audren.
2018-07-31 21:58:30 -04:00
bunnei 817f66ae8c Merge pull request #879 from lioncash/audio
audout_u: Remove std::move in OpenAudioOutImpl()
2018-07-31 16:49:56 -07:00
bunnei 304b76490d Merge pull request #864 from FearlessTobi/port-3973
Port #3973 from Citra: "Remove polymorphism issue"
2018-07-31 09:34:23 -07:00
bunnei a19afb37b2 Merge pull request #869 from Subv/ubsan
Corrected a few error cases detected by asan/ubsan
2018-07-31 09:24:13 -07:00
bunnei cd86d3bd7a Merge pull request #875 from lioncash/fgm
service: Add fgm services
2018-07-31 09:23:17 -07:00
bunnei 80a726d090 Merge pull request #874 from lioncash/am
service/am: Add missing am services
2018-07-31 09:22:56 -07:00
Lioncash ea4e7b7fc5 kernel: Remove unused object_address_table.cpp/.h
These source files were entirely unused throughout the rest of the
codebase. This also has the benefit of getting rid of a global variable
as well.
2018-07-31 11:03:08 -04:00
Lioncash a87d3a4c42 audout_u: Remove std::move in OpenAudioOutImpl()
Previously the code was using the values from params further below after
it was std::moved. Thankfully, given AudoutParams is a trivially
copyable struct, the values would have simply been copied in this
instance and not invalidated to garbage values.
2018-07-31 10:24:38 -04:00
Lioncash 3d2d454c36 kernel: Remove unnecessary includes
Removes unnecessary direct dependencies in some headers and also gets
rid of indirect dependencies that were being relied on to be included.
2018-07-31 10:15:17 -04:00
bunnei 3537a41aaf Merge pull request #870 from lioncash/init
arm_dynarmic: Correct initializer list order
2018-07-31 07:12:54 -07:00
Lioncash 00ce1994f3 service/am: Add missing am services
Adds the basic skeleton for missing am services idle:sys, omm, and spsm
based off the information provided by Switch Brew.
2018-07-31 08:02:20 -04:00
Lioncash bdeda001bc service: Add fgm services
Adds the basic skeleton for the fgm services based off the information
provided by Switch Brew.
2018-07-31 08:01:19 -04:00
Lioncash f90376d170 arm_dynarmic: Make SetTlsAddress() prototype and definition consistent
Makes the definition use the same type aliases as in its prototype.
2018-07-31 07:58:26 -04:00
Lioncash 2cd4a2bbd8 arm_dynarmic: Remove unnecessary qualifying of ThreadContext
Given the ARM_Dynarmic class inherits from ARM_Interface, we don't need
to qualify here.
2018-07-31 07:56:59 -04:00
Lioncash 00542bc1a4 arm_dynarmic: Correct initializer list order
Amends the initializer list to be in the same order that each variable
would be initialized in. We also do this to ensure we don't use a bogus
uninitialized instance of the exclusive monitor within MakeJit()

We can also remove the jit member from the initializer list as this is
initialized by PageTableChanged()
2018-07-31 07:54:58 -04:00
Lioncash e136d94655 service: Add the pcie service
Adds the basic skeleton of the pcie service based off information on
Switch Brew.
2018-07-31 06:40:21 -04:00
bunnei 18dd56c38d Merge pull request #855 from bunnei/cubeb
Audio output backend based on cubeb
2018-07-30 20:29:17 -07:00
bunnei 0ba0cdbed9 audio_core: Implement Sink and SinkStream interfaces with cubeb. 2018-07-30 21:45:24 -04:00
bunnei f1f3a65391 audio_core: Add interfaces for Sink and SinkStream. 2018-07-30 21:45:24 -04:00
Subv 3aebf087c1 MacroInterpreter: Avoid left shifting negative values.
The branch target is signed, so multiply by 4 instead of left shifting by 2
2018-07-30 20:38:24 -05:00
Subv 253cd9b5b9 nvhost_gpu: Added checks to ensure we don't read past the end of the entries when handling a GPU command list. 2018-07-30 20:09:13 -05:00
Subv 48df583947 nvhost_ctrl_gpu: Only read the input parameters if they are actually there.
Passing nullptr to memcpy is undefined behavior.
2018-07-30 20:08:36 -05:00
Tobias 1e25018638 Port #3758 from Citra (#852): Add missing std::string import in text_formatter 2018-07-30 16:03:47 -07:00
bunnei 02472448da audio_core: Misc. improvements to stream/buffer/audio_out. 2018-07-30 18:58:40 -04:00
bunnei fe039386fc audio_core: Move to audout_u impl.
- This is necessary so streams are created on the same thread.
2018-07-30 18:44:16 -04:00
David 42f8eef8b3 Implemented various hwopus functions (#853) 2018-07-30 15:42:20 -07:00
bunnei a211ad4699 Merge pull request #861 from FearlessTobi/port-3972
Port #3972 from Citra: "common/timer: use std::chrono, avoid platform-dependent code"
2018-07-30 14:13:56 -07:00
bunnei addd8e6823 Merge pull request #862 from FearlessTobi/port-3997
Port #3997 from Citra: "common/string_utils: replace boost::transform with std counterpart"
2018-07-30 14:13:34 -07:00
bunnei 30c7c89554 Merge pull request #859 from FearlessTobi/port-3837
Port #3837 from Citra: "citra-qt: Add build date in about dialog"
2018-07-30 10:11:43 -07:00
Tobias d60c5fdb23 Port #3769 from Citra: "Update Dark theme to latest version" 2018-07-30 10:11:17 -07:00
bunnei c9de0247f9 Merge pull request #858 from lioncash/cast
partition_filesystem: Remove dynamic_cast in PrintDebugInfo()
2018-07-30 10:09:36 -07:00
bunnei 98a3798599 Merge pull request #860 from FearlessTobi/port-3911
Port #3911 from Citra: "citra-qt: optimize settings application"
2018-07-30 10:08:55 -07:00
bunnei fbbb2113b8 Merge pull request #863 from FearlessTobi/port-3913
Port #3913 from Citra: "citra_qt: Remove obsolete application attribute"
2018-07-30 10:08:05 -07:00
bunnei 0d156a752f Merge pull request #865 from FearlessTobi/port-3732
Port #3732 from Citra: "common: Fix compilation on ARM"
2018-07-30 10:07:45 -07:00
bunnei 2c20994b7e Merge pull request #857 from lioncash/wlan
service: Add wlan services
2018-07-30 10:06:52 -07:00
bunnei 31b1608230 Merge pull request #856 from lioncash/btm
service: Add btm services
2018-07-30 10:06:34 -07:00
Hexagon12 0c5691e8b4 Add some HID commands (#843)
* Added some HID commands

* Addressed comments
2018-07-30 10:06:21 -07:00
Cameron Cawley edf024592e Port #3732 from Citra: "common: Fix compilation on ARM" 2018-07-29 15:51:31 +02:00
B3n30 d480730a4c remove polymorphism issue 2018-07-29 15:24:41 +02:00
fearlessTobi 41f0c63993 Port #3913 from Citra: "citra_qt: Remove obsolete application attribute" 2018-07-29 15:13:08 +02:00
zhupengfei 4cabe17f0b common/string_utils: replace boost::transform with std counterpart
Note: according to cppreference it is necessary to convert char to unsigned char when using std::tolower and std::toupper, otherwise the behaviour would be undefined.
2018-07-29 15:05:43 +02:00
zhupengfei 7311baa65c Port #3972 from Citra: "common/timer: use std::chrono, avoid platform-dependent code" 2018-07-29 14:58:30 +02:00
fearlessTobi 6d2e4b74c2 Port #3911 from Citra: "Optimize settings application" 2018-07-29 14:37:18 +02:00
fearlessTobi 133950dbdf Port #3837 from Citra: "Add build date in about dialog" 2018-07-29 14:27:19 +02:00
Lioncash 2fb4f00bf7 partition_filesystem: Remove dynamic_cast in PrintDebugInfo()
We shouldn't be upcasting our file instances. Given a
PartitionFilesystem is currently designed to accept any arbitrary
VfsFile instances, casting to a more specific type than that is just bad
design, and shows an interface design issue.
2018-07-29 06:16:59 -04:00
Lioncash cbefbc3c60 service: Add wlan services
Adds the basic skeleton for the wlan services based off the information
on Switch Brew.
2018-07-28 21:54:55 -04:00
Lioncash 2c2461f0e1 service/btm: Add basic implementation of GetCoreImpl()
Based off information on SwIPC and Switch Brew.
2018-07-28 21:09:07 -04:00
Lioncash 82ef74be0b service: Add btm services
Adds the skeleton for the btm services based off the information on
Switch Brew.
2018-07-28 21:09:07 -04:00
bunnei 42aa40e14a Merge pull request #847 from lioncash/ncm
service: Add ncm services
2018-07-28 10:46:09 -07:00
bunnei b4fb69227b Merge pull request #846 from lioncash/mii
service: Add mii services
2018-07-28 10:45:31 -07:00
bunnei 0dcbd0a54a Merge pull request #842 from bunnei/audio-core
Initial implementation of Audio Core
2018-07-27 20:25:32 -07:00
bunnei 3d978dfa4d audout: Implement IAudioOut interface with AudioCore. 2018-07-27 22:55:39 -04:00
bunnei 2097b6c72e core: Add AudioCore to global state. 2018-07-27 22:33:37 -04:00
bunnei fa8e381b3e audio_core: Add initial code for keeping track of audout state. 2018-07-27 22:33:31 -04:00
Zach Hilman 2e4c791f79 RomFS Extraction 2018-07-27 18:14:03 -04:00
Lioncash db0eb8968d service: Add ncm services
Adds the basic skeleton for the ncm services based off information on
Switch Brew.
2018-07-27 17:38:30 -04:00
bunnei 8f135398fe Merge pull request #845 from lioncash/nfc
service: Add nfc services
2018-07-27 14:29:27 -07:00
bunnei f93ad9b68b Merge pull request #839 from FearlessTobi/actually-port-3594
Port #3594 from Citra: "citra_qt: Add Continue/Pause & Toggle Speed Limit hotkeys"
2018-07-27 13:06:56 -07:00
bunnei fc78709e87 Merge pull request #844 from lioncash/lbl
service: Add the lbl service
2018-07-27 13:06:11 -07:00
bunnei 5cdd88eeb5 Merge pull request #841 from lioncash/btdrv
service: Add the btdrv service
2018-07-27 13:05:36 -07:00
Lioncash 3d1b71b0a8 service: Add mii services
Adds the skeleton for the mii services based off information provided by
Switch Brew
2018-07-27 16:01:29 -04:00
Lioncash 55d1bcc26b service/nfc: Implement Create[x]Interface functions
These simply return the respective interface.
2018-07-27 15:12:08 -04:00
Lioncash 171f57b364 service: Add nfc services
Adds the skeleton of the nfc service based off the information provided
on Switch Brew.
2018-07-27 14:50:24 -04:00
Lioncash 995ca4edd0 service/lbl: Implement EnableVrMode, DisableVrMode and GetVrMode
Implements these functions according to the information available on
Switch Brew.
2018-07-27 14:20:42 -04:00
Lioncash 3f4c2ceab2 service: Add the lbl service
Adds the skeleton of the lbl service based off the information provided
by Switch Brew.
2018-07-27 14:20:07 -04:00
bunnei 859eac7a1f Merge pull request #837 from lioncash/priv
kernel/timer: Make data members private where applicable
2018-07-27 07:18:50 -07:00
Lioncash 9a6bc1e8c9 service: Add the btdrv service
Adds the skeleton for the btdrv service based off the information provided by Switch Brew
2018-07-26 18:06:17 -04:00
Lioncash b3e0f46ee6 service/hid: Add the hidbus, hid:dbg, hid:sys, and hid:tmp services 2018-07-26 15:05:42 -04:00
Lioncash 3d37adc01f service/hid: Add the xcd:sys service 2018-07-26 15:05:42 -04:00
Lioncash 8724896db5 service/hid: Add irs services 2018-07-26 15:05:24 -04:00
bunnei 008dae3ee4 Merge pull request #836 from FearlessTobi/port-3594
Port #3665 from Citra: "frontend: Log Citra version"
2018-07-26 12:04:30 -07:00
bunnei e042f5b900 Merge pull request #835 from FearlessTobi/port-minor-prs
Port #3641 and #3702 from Citra (Small changes to default_ini and gitignore)
2018-07-26 12:03:56 -07:00
bunnei bb50b8c7f1 Merge pull request #834 from lioncash/grc
service: Add the grc:c service
2018-07-26 12:03:30 -07:00
bunnei fd33008c57 Merge pull request #832 from lioncash/nim
service: Add the nim services
2018-07-26 12:02:29 -07:00
bunnei 7e7d2a8460 Merge pull request #831 from lioncash/ldn
service: Add ldn services
2018-07-26 11:52:42 -07:00
bunnei be3d1d704d Merge pull request #830 from lioncash/socket
service/sockets: Add missing socket services
2018-07-26 11:51:11 -07:00
bunnei e13c2efcd2 Merge pull request #808 from lioncash/mem-dedup
video_core/memory_manager: Avoid repeated unnecessary page slot lookups
2018-07-26 11:50:27 -07:00
fearlessTobi 5946bf7728 Port #3594 from Citra 2018-07-26 16:09:52 +02:00
Lioncash ad74c3c324 service: Add the grc:c service
Adds the basic skeleton for the grc:c service based off the information
provided by Switch Brew.
2018-07-26 09:53:58 -04:00
Subv b994374b5c GPU: Allow using R16F as a render target format. 2018-07-26 08:52:21 -05:00
Lioncash 9f7550d027 kernel/timer: Make data members private where applicable
Instead, we can just expose functions that return the queryable state
instead of letting anything modify it.
2018-07-26 09:51:44 -04:00
fearlessTobi d037602d5c Port #3665 from Citra 2018-07-26 15:51:14 +02:00
fearlessTobi 6335002f55 Port #3641 from Citra 2018-07-26 15:35:10 +02:00
Lioncash 1c50f01de8 service: Add the nim services
Adds the skeleton for the nim services based off information from Switch
Brew.
2018-07-26 02:47:06 -04:00
Lioncash 6116b53dfb service: Add ldn services
Adds ldn services based off information provided by Switch Brew.
2018-07-26 01:48:06 -04:00
bunnei 825e272dcf Merge pull request #827 from lioncash/log
service/lm: Minor changes
2018-07-25 22:30:43 -07:00
bunnei e6a59eccc3 Merge pull request #825 from greggameplayer/R16_G16
Implement R16_G16
2018-07-25 22:30:25 -07:00
Lioncash 961ee4e3ea service/sockets: Add ethc:c and ethc:i services 2018-07-26 01:07:21 -04:00
Lioncash 8827701e2a service/sockets: Add missing bsdcfg socket service 2018-07-26 01:00:15 -04:00
Sebastian Valle 3fd5ff4be6 Merge pull request #828 from lioncash/ldr
service: Add ldr services
2018-07-25 23:44:13 -05:00
Sebastian Valle f9f1c10e29 Merge pull request #826 from lioncash/erpt
service: Add erpt and eupld services
2018-07-25 23:43:47 -05:00
Sebastian Valle 5177141f28 Merge pull request #823 from lioncash/nifm
service/nifm: Deduplicate interface code
2018-07-25 23:43:03 -05:00
Lioncash fe262212e1 service: Add ldr services
Adds the skeleton for the ldr-related services based off the information
provided on Switch Brew.
2018-07-25 23:11:03 -04:00
Lioncash 6570f0cd5c lm: Move LM's class declaration into the cpp file
This isn't used directly outside of this translation unit, so we can
hide it from external use.
2018-07-25 22:40:16 -04:00
Lioncash 24db60566b lm: Amend names of Initialize() in Logger and Initialize() in LM
Amends these to match the information on Switch Brew.
2018-07-25 22:39:39 -04:00
Lioncash a35847e520 lm: Add missing function entry to Logger's function table 2018-07-25 22:26:32 -04:00
Lioncash cb8bf2372d service: Add eupld services
Adds the skeleton for the eupld services based off information on Switch
Brew.
2018-07-25 22:13:43 -04:00
Lioncash bbdc41e153 service: Add the erpt services
Adds the basic skeleton of the erpt service based off information on
Switch Brew.
2018-07-25 22:13:39 -04:00
bunnei 9e7df683ff Merge pull request #824 from lioncash/nvdrv
service/nvdrv: Minor changes
2018-07-25 19:02:08 -07:00
bunnei e3a31dea62 Merge pull request #822 from lioncash/pm
service: Add pm services
2018-07-25 19:01:28 -07:00
Unknown aad2bf10a8 Implement R16_G16
correct trailing white spaces


Delete tabs


correct placement
Add RG16F & RG16UI & RG16I & RG16S PixelFormats
Return correct data according to changes done previously
correct PixelFormat declaration
correct coding style error
correct coding style error part 2
correct RG16S Declaration error
correct alignment
2018-07-26 02:01:29 +02:00
Mat M 5a61a83988 Merge pull request #820 from lioncash/es
service: Add the es service
2018-07-25 18:51:59 -04:00
Mat M 4e117c21d3 Merge pull request #821 from lioncash/wait
wait_tree: Add missing switch case for WaitTreeThread::GetText()
2018-07-25 18:45:01 -04:00
bunnei 87e0a45124 Merge pull request #819 from Subv/srgb
GPU: Use the right texture format for sRGBA framebuffers.
2018-07-25 14:47:26 -07:00
Lioncash 7e87e94e33 service/nvdrv: Take std::string in Open() by const reference
Avoids copies from being made, since the string is only ever used for
lookup, the data is never transfered anywhere.

Ideally, we'd use a std::string_view here, but devices is a
std::unordered_map, not a std::map, so we can't use heterogenous lookup
here.
2018-07-25 17:37:43 -04:00
Lioncash 858c831282 service/nvdrv: Use std::move where applicable
Avoids unnecessary reference count increments and decrements.

In one case, we don't need to make a shared_ptr copy at all,
just to call a member function.
2018-07-25 17:31:08 -04:00
Lioncash 71f9a85a01 service/nifm: Deduplicate interface code
Rather than having the same code for each nifm service variant, we can
centralize it on one class and get rid of a bit of extra code.
2018-07-25 17:18:41 -04:00
Lioncash c96ea0051d service: Add pm services
Adds the skeleton for the process management services based off
information on Switch Brew.
2018-07-25 16:57:16 -04:00
Lioncash 6dcc80c285 wait_tree: Add missing switch case for WaitTreeThread::GetText()
We were missing the enum entry for WaitIPC
2018-07-25 15:50:41 -04:00
Lioncash 397d500e33 service: Add the es service
Adds the skeleton for the ETicket service based off the information on
Switch Brew
2018-07-25 15:36:55 -04:00
Mat M 4a05fca942 Merge pull request #801 from lioncash/time
time: Add the time:a service
2018-07-25 15:08:33 -04:00
Mat M 2113988e81 Merge pull request #804 from lioncash/log
svc: Log parameters in SetMemoryAttribute()
2018-07-25 14:43:24 -04:00
Lioncash 11931ccf6a time: Add the time:a service
Given we already have time:s and time:u, we should also have time:a
2018-07-25 14:42:04 -04:00
bunnei d1035d4b76 Merge pull request #803 from MerryMage/core_timing_util
core_timing: Split off utility functions into core_timing_util
2018-07-25 11:09:31 -07:00
bunnei 550bdb59b0 Merge pull request #802 from lioncash/unreach
wait_tree: Silence warning about all code paths not returning a value
2018-07-25 11:08:44 -07:00
bunnei a27c5d7afd Merge pull request #800 from lioncash/set
set_sys: Implement SetColorSetId()
2018-07-25 10:25:29 -07:00
Subv a99c559c69 GPU: Use the right texture format for sRGBA framebuffers. 2018-07-25 09:52:39 -05:00
Subv 6c114256ca GPU: Allow the use of Z24S8 as a texture format. 2018-07-25 09:41:24 -05:00
bunnei 9c18b48352 Merge pull request #816 from Subv/z32_s8
GPU: Implemented the Z32_S8_X24 depth buffer format.
2018-07-25 07:37:00 -07:00
bunnei e74efb1e46 Merge pull request #815 from Subv/z32f_tex
GPU: Allow using Z32 as a texture format.
2018-07-25 07:33:09 -07:00
bunnei c4852be404 Merge pull request #814 from Subv/rt_r8
GPU: Allow the usage of R8 as a render target format.
2018-07-25 07:32:18 -07:00
bunnei f4884e347b Merge pull request #809 from lioncash/rasterizer
gl_rasterizer: Minor cleanup
2018-07-24 19:31:34 -07:00
bunnei 467842a5aa Merge pull request #811 from Subv/code_address_assert
GPU: Remove the assert that required the CODE_ADDRESS to be 0.
2018-07-24 19:31:09 -07:00
Subv b4ae8432b4 GPU: Implemented the Z32_S8_X24 depth buffer format. 2018-07-24 20:41:40 -05:00
Subv 72cb7ab18b GPU: Allow using Z32 as a texture format. 2018-07-24 19:54:23 -05:00
Subv 1930980a26 GPU: Allow the usage of R8 as a render target format. 2018-07-24 19:49:36 -05:00
bunnei f88b7061c8 Merge pull request #806 from lioncash/friend
friend: Deduplicate interfaces
2018-07-24 17:42:16 -07:00
bunnei 8bf43a9939 Merge pull request #810 from Subv/r16
GPU: Implemented the R16 and R16F texture formats.
2018-07-24 17:41:02 -07:00
bunnei 59a41b585e Merge pull request #805 from lioncash/sign
svc: Resolve sign comparison warnings in WaitSynchronization()
2018-07-24 12:50:03 -07:00
Subv 3b77420f15 GPU: Remove the assert that required the CODE_ADDRESS to be 0.
Games usually just leave it at 0 but nouveau sets it to something else. This already works fine, the assert is useless.
2018-07-24 13:54:12 -05:00
Subv d10cc9c548 GPU: Implemented the R16 and R16F texture formats. 2018-07-24 13:39:16 -05:00
Lioncash 6bbabfe848 gl_rasterizer: Replace magic number with GL_INVALID_INDEX in SetupConstBuffers()
This is just the named constant that OpenGL provides, so we can use that
instead of using a literal -1
2018-07-24 12:24:49 -04:00
Lioncash 7300872843 gl_rasterizer: Use std::string_view instead of std::string when checking for extensions
We can avoid heap allocations here by just using a std::string_view
instead of performing unnecessary copying of the string data.
2018-07-24 12:10:37 -04:00
Lioncash 2aa1ec7f8d gl_rasterizer: Use in-class member initializers where applicable
We can just assign to the members directly in these cases.
2018-07-24 12:08:12 -04:00
Lioncash 4cab632ba6 video_core/memory_manager: Replace a loop with std::array's fill() function in PageSlot()
We already have a function that does what this code was doing, so let's
use that instead.
2018-07-24 11:56:30 -04:00
Lioncash 38ad89a19b video_core/memory_manager: Avoid repeated unnecessary page slot lookups
We don't need to keep calling the same function over and over again in a
loop, especially when the behavior is slightly non-trivial. We can just
keep a reference to the looked up location and do all the checking and
assignments based off it instead.
2018-07-24 11:19:54 -04:00
Lioncash 8dd50ecfb6 deconstructed_rom_directory: Remove unused FindRomFS() function 2018-07-24 10:54:07 -04:00
Lioncash 7449b47e7f friend: Add friend:m, friend:s, and friend:v services
Given we already have friend:a and friend:u, we should add the remaining
services as well.
2018-07-24 10:26:01 -04:00
Lioncash 4ac9553a75 friend/interface: Add missing CreateDaemonSuspendSessionService() to the function handler table 2018-07-24 10:24:16 -04:00
Lioncash a8473054f0 friend: Deduplicate interfaces 2018-07-24 10:21:51 -04:00
Lioncash 46a1bbceea svc: Resolve sign comparison warnings in WaitSynchronization()
The loop's induction variable was signed, but we were comparing against
an unsigned variable.
2018-07-24 09:55:17 -04:00
Lioncash 5bd30caa5c svc: Log parameters in SetMemoryAttribute()
Provides slightly more context than only logging out the address value.
2018-07-24 09:46:46 -04:00
bunnei 6da26bfccb Merge pull request #798 from lioncash/const
arm_dynarmic: Make MakeJit() a const member function
2018-07-24 04:48:06 -07:00
bunnei ef04b499ea Merge pull request #797 from lioncash/explicit
core: Make converting constructors explicit where applicable
2018-07-24 04:47:26 -07:00
bunnei e6abd9a13b Merge pull request #795 from lioncash/decl
apm/interface: Remove redundant declaration of InstallInterfaces()
2018-07-24 04:46:41 -07:00
bunnei a0873add99 Merge pull request #799 from Subv/tex_r32f
GPU: Implement texture format R32F.
2018-07-24 04:46:07 -07:00
bunnei 070b662525 Merge pull request #794 from lioncash/ref
mutex: Pass SharedPtr to GetHighestPriorityMutexWaitingThread() by reference
2018-07-24 04:45:34 -07:00
bunnei 2216f26593 Merge pull request #796 from bunnei/gl-uint
maxwell_to_gl: Implement VertexAttribute::Type::UnsignedInt.
2018-07-24 04:44:56 -07:00
bunnei f8a5e5fef3 Merge pull request #789 from bunnei/tex-wrap-border
maxwell_to_gl: Implement Texture::WrapMode::Border.
2018-07-24 04:44:37 -07:00
Lioncash bf002d355b time: Simplify interface creation
We can use one instance of the interface instead of duplicating code.
2018-07-24 06:21:27 -04:00
MerryMage 672d7dd573 core_timing: Split off utility functions into core_timing_util 2018-07-24 11:03:24 +01:00
MerryMage 86834affbb CMakeLists: Sort filenames 2018-07-24 11:02:53 +01:00
Lioncash 8bfaf576fb wait_tree: Silence warning about all code paths not returning a value
If code execution hits this spot, something has gone very wrong, so mark
the path as unreachable. This silences a warning on MSVC.
2018-07-24 04:06:55 -04:00
Lioncash 01efb33957 set_sys: Implement SetColorSetId() 2018-07-24 00:48:16 -04:00
Lioncash 506fb32dd5 ipc_helper: Add helper member function for popping enum values to RequestParser 2018-07-24 00:47:51 -04:00
bunnei f493b53c86 Merge pull request #793 from lioncash/priv
ipc_helpers: Make member variables of ResponseBuilder private
2018-07-23 21:23:27 -07:00
bunnei bbc63c6f29 Merge pull request #785 from lioncash/fs
partition_filesystem: Use std::move where applicable
2018-07-23 20:36:59 -07:00
bunnei 772c408826 gl_rasterizer: Implement texture border color. 2018-07-23 23:34:42 -04:00
bunnei a5062c345f maxwell_to_gl: Implement Texture::WrapMode::Border. 2018-07-23 23:34:41 -04:00
Subv 3a80e8ab24 GPU: Implement texture format R32F. 2018-07-23 22:21:31 -05:00
Lioncash 75c3f87d24 arm_dynarmic: Make MakeJit() a const member function
This functions doesn't modify instance state, so it can be a made a
const member function.
2018-07-23 23:19:37 -04:00
Lioncash 88f34a5b96 core: Make converting constructors explicit where applicable
Avoids unwanted implicit conversions. Thankfully, given the large amount
of cleanup in past PRs, only this tiny amount is left over to cover.
2018-07-23 23:13:22 -04:00
bunnei c324ea103c Merge pull request #791 from bunnei/rg32f-rgba32f-bgra8
gl_rasterizer_cache: Implement formats BGRA8_UNORM/RGBA32_FLOAT/RG32_FLOAT
2018-07-23 20:13:19 -07:00
bunnei 295d3104fb maxwell_to_gl: Implement VertexAttribute::Type::UnsignedInt. 2018-07-23 23:12:14 -04:00
bunnei 15f87717ca Merge pull request #792 from lioncash/retval
gl_shader_decompiler: Correct return value of WriteTexsInstruction()
2018-07-23 20:06:48 -07:00
Lioncash 592a444838 apm/interface: Remove redundant declaration of InstallInterfaces()
This is already declared in apm/apm.h
2018-07-23 23:01:04 -04:00
Lioncash ecc4f5065a mutex: Pass SharedPtr to GetHighestPriorityMutexWaitingThread() by reference
The pointed to thread's members are simply observed in this case, so we
don't need to copy it here.
2018-07-23 22:54:35 -04:00
bunnei 236789a321 Merge pull request #790 from bunnei/shader-print-instr
gl_shader_decompiler: Print instruction value in shader comments.
2018-07-23 19:48:47 -07:00
bunnei f2fc9c5284 Merge pull request #788 from bunnei/shader-check-zero
gl_shader_decompiler: Check if SetRegister result is ZeroIndex.
2018-07-23 19:44:05 -07:00
Zach Hilman bd410ce242 VFS Regression and Accuracy Fixes (#776)
* Regression and Mode Fixes

* Review Fixes

* string_view correction

* Add operator& for FileSys::Mode

* Return std::string from SanitizePath

* Farming Simulator Fix

* Use != With mode operator&
2018-07-23 19:40:35 -07:00
Lioncash a15433c2a9 hle_ipc: Make constructors explicit where applicable 2018-07-23 22:40:24 -04:00
Lioncash 97ce8f0457 gl_shader_decompiler: Correct return value of WriteTexsInstruction()
This should be returning void, not a std::string
2018-07-23 22:31:58 -04:00
Lioncash 1c25b997e8 ipc_helpers: Make member variables of ResponseBuilder private
These aren't used externally at all, so they can be made private.
2018-07-23 22:29:07 -04:00
bunnei 3bf9b59021 Merge pull request #787 from bunnei/tlds
gl_shader_decompiler: Implement shader instruction TLDS.
2018-07-23 19:14:01 -07:00
bunnei a7b90e00bf Merge pull request #786 from lioncash/exclusive
exclusive_monitor: Use consistent type alias for u64
2018-07-23 19:11:05 -07:00
bunnei a96c899ec9 Merge pull request #784 from lioncash/loader
loader: Minor cleanup
2018-07-23 19:08:12 -07:00
bunnei 77c1923b40 Merge pull request #783 from lioncash/linker
linker: Remove unused parameter from WriteRelocations()
2018-07-23 19:07:22 -07:00
bunnei 4dae32a7b9 Merge pull request #782 from lioncash/file
loader/nro: Minor changes
2018-07-23 19:06:30 -07:00
bunnei 567ae2ae9c gl_shader_decompiler: Implement shader instruction TLDS. 2018-07-23 22:02:51 -04:00
bunnei 9981de78e8 Merge pull request #781 from lioncash/decl
gl_shader_decompiler: Simplify GetCommonDeclarations()
2018-07-23 18:30:23 -07:00
bunnei 1a6fe993da Merge pull request #780 from lioncash/move
vi: Minor changes
2018-07-23 18:29:11 -07:00
bunnei 85a40f8fef Merge pull request #779 from lioncash/shared
hle: Remove unused config_mem and shared_page source files
2018-07-23 18:28:45 -07:00
bunnei 889da74c9d gl_rasterizer_cache: Implement RenderTargetFormat RG32_FLOAT. 2018-07-23 21:22:54 -04:00
bunnei c8cb44909a gl_rasterizer_cache: Implement RenderTargetFormat RGBA32_FLOAT. 2018-07-23 21:22:53 -04:00
bunnei e1ffcc6817 gl_rasterizer_cache: Implement RenderTargetFormat BGRA8_UNORM. 2018-07-23 21:22:44 -04:00
bunnei ff355e7684 gl_rasterizer_cache: Add missing log statements. 2018-07-23 21:20:09 -04:00
bunnei 04cf719b92 gl_shader_decompiler: Print instruction value in shader comments. 2018-07-23 21:11:05 -04:00
bunnei 658f096c03 gl_shader_decompiler: Check if SetRegister result is ZeroIndex. 2018-07-23 21:08:40 -04:00
Lioncash 78051d5378 exclusive_monitor: Use consistent type alias for u64
Uses the same type aliases we use for virtual addresses, and converts
one lingering usage of std::array<uint64_t, 2> to u128 for consistency.
2018-07-23 20:54:57 -04:00
Lioncash 6904f9f6b1 partition_filesystem: Use std::move where applicable
Avoids copying a std::string instance and avoids unnecessary atomic
reference count incrementing and decrementing.
2018-07-23 20:27:11 -04:00
Lioncash 204ed73e8c loader: Remove unnecessary constructor call in IdentifyFile()
RealVfsFile inherits from VfsFile, the instance from std::make_shared is
already compatible with the function argument type, making the copy
constructor call unnecessary.
2018-07-23 17:44:58 -04:00
Lioncash d5a96f2c94 linker: Remove unused parameter from WriteRelocations()
is_jump_relocation is never used within the function, so we can just
remove it.
2018-07-23 17:40:12 -04:00
Lioncash 3a72ee5fec nro: Replace inclusion with a forward declaration
It's sufficient to use a forward declaration instead of a direct
inclusion here.
2018-07-23 17:29:02 -04:00
Lioncash a2c69eb949 nro: Make bracing consistent
Makes the code more uniform, and also braces cases where the body of an
unbraced conditional travels more than one line.
2018-07-23 17:24:29 -04:00
Lioncash 6fd1615b93 nro: Make constructor explicit
Makes it consistent with the other Apploader constructors, and prevents
implicit conversions.
2018-07-23 17:20:33 -04:00
Lioncash df82410454 nro: Remove unused forward declaration
This isn't used anywhere in the header.
2018-07-23 17:19:42 -04:00
bunnei de2a8eb52f Merge pull request #695 from DarkLordZach/nro-asset
NRO Assets and NACP File Format
2018-07-23 14:14:11 -07:00
Lioncash 71c3648ad6 gl_shader_decompiler: Simplify GetCommonDeclarations() 2018-07-23 17:11:18 -04:00
Lioncash 6e39fa5950 vi: Add std::is_trivially_copyable checks to Read and Write functions
It's undefined behavior to memcpy an object that isn't considered
trivially copyable, so put a compile-time check in to make sure this
doesn't occur.
2018-07-23 14:53:54 -04:00
Lioncash dab340a3b3 vi: std::move std::vector in constructors where applicable
Allows avoiding unnecessary copies of the vector depending on the
calling code.

While we're at it, remove a redundant no-parameter base constructor call
2018-07-23 14:49:54 -04:00
Lioncash ec38b938da hle: Remove config_mem.h/.cpp
This is just an unused hold-over from citra, so we can get rid of this
to trim off an exposed global, among other things.
2018-07-23 12:57:34 -04:00
Lioncash aba0f5452d hle: Remove shared_page.h/.cpp
This is a holdover from citra that's essentially unused.
2018-07-23 12:53:07 -04:00
Lioncash f53d6ee0bc set: Add missing log call in GetAvailableLanguageCodeCount()
Forgot to include this in 2c22e4be19
2018-07-23 12:37:42 -04:00
bunnei 112b7d1ee6 Merge pull request #775 from lioncash/str
string_util: Minor changes
2018-07-23 09:34:41 -07:00
Zach Hilman ac0c52dd5f NRO Assets and NACP file format
Cleanup

Review fixes
2018-07-23 12:34:26 -04:00
bunnei b9cd9365c6 Merge pull request #777 from lioncash/lang
set: Amend return value of GetAvailableLanguageCodes()
2018-07-23 09:34:08 -07:00
Lioncash 2c22e4be19 set: Implement GetAvailableLanguageCodeCount()
This just returns the size of the language code buffer.
2018-07-23 00:29:40 -04:00
Lioncash 6b4ed7cf2f set: Correct return code size of value in GetAvailableLanguageCodes()
The return code should be 32-bit in size.
2018-07-23 00:29:22 -04:00
bunnei ee26b9541e Merge pull request #769 from bunnei/shader-mask-fixes
shader_bytecode: Implement other TEXS masks.
2018-07-22 18:03:31 -07:00
Lioncash 54b477c4f9 string_util: Get rid of separate resize() in CPToUTF16(), UTF16ToUTF8(), CodeToUTF8() and UTF8ToUTF16()
There's no need to perform the resize separately here, since the
constructor allows presizing the buffer.

Also move the empty string check before the construction of the string
to make the early out more straightforward.
2018-07-22 16:39:21 -04:00
Lioncash cd09896057 string_util: Use emplace_back() in SplitString() instead of push_back()
This is equivalent to doing:

push_back(std::string(""));

which is likely not to cause issues, assuming a decent std::string
implementation with small-string optimizations implemented in its
design, however it's still a little unnecessary to copy that buffer
regardless. Instead, we can use emplace_back() to directly construct the
empty string within the std::vector instance, eliminating any possible
overhead from the copy.
2018-07-22 15:36:32 -04:00
Lioncash 7b00b5c322 string_util: Remove unnecessary std::string instance in TabsToSpaces()
We can just use the variant of std::string's replace() function that can
replace an occurrence with N copies of the same character, eliminating
the need to allocate a std::string containing a buffer of spaces.
2018-07-22 15:35:48 -04:00
bunnei fd7888e3f5 Merge pull request #774 from Subv/atomic_signal
Kernel/SVC: Perform atomic accesses in SignalProcessWideKey as per the real kernel.
2018-07-22 12:26:03 -07:00
bunnei 5ae803cdab Merge pull request #773 from Subv/gl_ext_check
Frontend: Check for more required OpenGL extensions during startup.
2018-07-22 11:47:07 -07:00
bunnei 349e7974a5 Merge pull request #768 from lioncash/string-view
file_util, vfs: Use std::string_view where applicable
2018-07-22 11:32:28 -07:00
Subv e9639ffafa Kernel/SVC: Perform atomic accesses in SignalProcessWideKey as per the real kernel. 2018-07-22 12:27:24 -05:00
bunnei 8a3ae169e9 Merge pull request #770 from lioncash/construct
gl_shader_decompiler: Remove redundant Subroutine construction in AddSubroutine()
2018-07-22 10:24:20 -07:00
Subv 555a0638ec Frontend: Check for more required OpenGL extensions during startup. 2018-07-22 12:05:38 -05:00
MerryMage 34bf2dbf68 Implement exclusive monitor 2018-07-22 15:55:17 +01:00
Lioncash db185e6950 gl_shader_decompiler: Remove redundant Subroutine construction in AddSubroutine()
We don't need to toss away the Subroutine instance after the find() call
and reconstruct another instance with the same data right after it.
Particularly give Subroutine contains a std::set.
2018-07-22 03:30:35 -04:00
bunnei 392383692c shader_bytecode: Implement other TEXS masks. 2018-07-22 03:23:15 -04:00
Lioncash 2cbc2717e4 vfs: Correct file_p variable usage within InterpretAsDirectory()
ReplaceFileWithSubdirectory() takes a VirtualFile and a VirtualDir, but
it was being passed a string as one of its arguments. The only reason
this never caused issues is because this template isn't instantiated
anywhere yet.

This corrects an issue before it occurs.
2018-07-22 03:22:28 -04:00
Lioncash 861405d6c0 file_util, vfs: Use std::string_view where applicable
Avoids unnecessary construction of std::string instances where
applicable.
2018-07-22 03:22:21 -04:00
bunnei 0605fbbfeb Merge pull request #765 from lioncash/file
file_util: Remove goto usages from Copy()
2018-07-22 00:03:35 -07:00
bunnei 30b1afcf99 Merge pull request #767 from bunnei/shader-cleanup
gl_shader_decompiler: Remove unused state tracking and minor cleanup.
2018-07-22 00:03:17 -07:00
bunnei e04ea2bcef Merge pull request #766 from bunnei/shader-sel
gl_shader_decompiler: Implement SEL instruction.
2018-07-21 23:13:27 -07:00
bunnei aaac8c5a00 Merge pull request #764 from lioncash/move
file_util: Minor changes to ScanDirectoryTree() and ForeachDirectoryEntry()
2018-07-21 22:05:30 -07:00
bunnei e8f619cc71 gl_shader_decompiler: Remove unused state tracking and minor cleanup. 2018-07-22 01:00:44 -04:00
bunnei 3a6bad38b6 gl_shader_decompiler: Implement SEL instruction. 2018-07-22 00:37:12 -04:00
Lioncash 5440a4a9d9 file_util: Remove goto usages from Copy()
We can just leverage std::unique_ptr to automatically close these for us
in error cases instead of jumping to the end of the function to call
fclose on them.
2018-07-21 23:08:55 -04:00
Lioncash 574be087d4 file_util: Use a u64 to represent number of entries
This avoids a truncating cast on size. I doubt we'd ever traverse a
directory this large, however we also shouldn't truncate sizes away.
2018-07-21 22:42:08 -04:00
Lioncash 2684cc586e file_util: std::move FST entries in ScanDirectoryTree()
Avoids unnecessary copies when building up the FST entries.
2018-07-21 22:31:44 -04:00
bunnei f4101aeacc gl_rasterizer_cache: Blit surfaces on recreation instead of flush and load. 2018-07-21 21:51:06 -04:00
bunnei def372de50 gl_rasterizer_cache: Use GPUVAddr as cache key, not parameter set. 2018-07-21 21:51:06 -04:00
bunnei b00904f10e gl_rasterizer_cache: Use zeta_width and zeta_height registers for depth buffer. 2018-07-21 21:51:06 -04:00
bunnei 602ff24d5c gl_rasterizer: Use zeta_enable register to enable depth buffer. 2018-07-21 21:51:06 -04:00
bunnei 6d96a4fc0a maxwell_3d: Add depth buffer enable, width, and height registers. 2018-07-21 21:51:05 -04:00
bunnei 6602b23676 Merge pull request #759 from lioncash/redundant
file_util: Remove redundant duplicate return in GetPathWithoutTop()
2018-07-21 18:50:38 -07:00
bunnei 9ae3e4413f Merge pull request #748 from lioncash/namespace
video_core: Use nested namespaces where applicable
2018-07-21 18:50:14 -07:00
bunnei fae0eaf7c6 Merge pull request #758 from lioncash/sync
common: Remove synchronized_wrapper.h
2018-07-21 18:30:31 -07:00
bunnei 0bb774f069 Merge pull request #760 from lioncash/path
file_util: Use an enum class for GetUserPath()
2018-07-21 18:30:04 -07:00
Subv c4bfd25a6a GPU: Implement the NVGPU_IOCTL_CHANNEL_KICKOFF_PB ioctl2 command.
This behaves quite similarly to the SubmitGPFIFO command. Referenced from Ryujinx.
Many thanks to @gdkchan for investigating this!
2018-07-21 15:50:02 -05:00
Lioncash 85ca923ed4 file_util: Use an enum class for GetUserPath()
Instead of using an unsigned int as a parameter and expecting a user to
always pass in the correct values, we can just convert the enum into an
enum class and use that type as the parameter type instead, which makes
the interface more type safe.

We also get rid of the bookkeeping "NUM_" element in the enum by just
using an unordered map. This function is generally low-frequency in
terms of calls (and I'd hope so, considering otherwise would mean we're
slamming the disk with IO all the time) so I'd consider this acceptable
in this case.
2018-07-21 16:21:19 -04:00
Lioncash 478a19a774 file_util: Remove explicit type from std::min() in GetPathWithoutTop()
Given both operands are the same type, there won't be an issue with
overload selection that requires making this explicit.
2018-07-21 15:19:32 -04:00
Lioncash 32dde02a89 file_util: Remove redundant duplicate return in GetPathWithoutTop() 2018-07-21 15:18:23 -04:00
Lioncash 8ec2f1b2b7 common: Remove synchronized_wrapper.h
This is entirely unused in the codebase.
2018-07-21 14:51:44 -04:00
bunnei 8623af5453 Merge pull request #754 from lioncash/part
partition_filesystem, vfs_real: Minor changes
2018-07-21 11:38:52 -07:00
bunnei 51ba7c8827 Merge pull request #750 from lioncash/ctx
arm_interface: Remove unused tls_address member of ThreadContext
2018-07-21 11:38:16 -07:00
bunnei 09837fe5ff Merge pull request #746 from lioncash/tests
tests/arm_test_common: Minor changes
2018-07-21 10:55:29 -07:00
bunnei 039c35ddeb Merge pull request #747 from lioncash/unimplemented
gl_shader_manager: Remove unimplemented function prototype
2018-07-21 10:54:58 -07:00
bunnei 376ef08be7 Merge pull request #755 from lioncash/ctor
file_sys/errors: Remove redundant object constructor calls
2018-07-21 10:53:53 -07:00
bunnei f3f12b09ad Merge pull request #749 from lioncash/consistency
gpu: Rename Get3DEngine() to Maxwell3D()
2018-07-21 10:51:00 -07:00
bunnei 6458900d74 Merge pull request #751 from Subv/tpidr_el0
CPU: Save and restore the TPIDR_EL0 system register on every context switch
2018-07-21 10:48:30 -07:00
bunnei 58911f4ec5 Merge pull request #753 from lioncash/const
vfs: Minor changes
2018-07-21 10:44:08 -07:00
bunnei bd9786a6ff Merge pull request #752 from Subv/vfs_load
Loader: Only print the module names and addresses if they actually exist.
2018-07-20 22:57:18 -07:00
Lioncash 25e1111621 file_sys/errors: Remove redundant object constructor calls
Given we're already constructing the error code, we don't need to call
the constructor inside of it.
2018-07-20 22:37:54 -04:00
Lioncash 285dfd1a6d vfs_real: Remove redundant copying of std::vector instances in GetFiles() and GetSubdirectories()
We already return by value, so we don't explicitly need to make the
copy.
2018-07-20 22:30:22 -04:00
Lioncash 97f7a15e70 partition_filesystem, vfs_real: Add missing standard includes 2018-07-20 22:28:35 -04:00
Lioncash ed7f23ef32 partition_filesystem, vfs_real: Use std::move in ReplaceFileWithSubdirectory() where applicable
Avoids unnecessary atomic increment and decrement operations.
2018-07-20 22:23:58 -04:00
Lioncash 24fc1a425a partition_filesystem, vfs_real: Use std::distance() instead of subtraction
This is a little bit more self-documenting on what is being done here.
2018-07-20 22:19:17 -04:00
Lioncash 785d86d181 vfs_offset: Simplify TrimToFit()
We can simply use std::clamp() here, instead of using an equivalent
with std::max() and std::min().
2018-07-20 22:04:37 -04:00
Lioncash 25510961ea vfs: Make WriteBytes() overload taking a std::vector pass the std::vector by const reference
Given the data is intended to be directly written, there's no need to
take the std::vector by value and copy the data.
2018-07-20 21:51:30 -04:00
Lioncash e523ab8b03 vfs: Use variable template variants of std::is_trivially_copyable
Provides the same behavior, but with less writing
2018-07-20 21:47:19 -04:00
Lioncash 556aaf9627 vfs: Amend constness on pointers in WriteBytes() and WriteArrays() member functions to be const qualified
These functions don't modify the data being pointed to, so these can be
pointers to const data
2018-07-20 21:40:15 -04:00
Subv c1cc141fb0 Loader: Only print the module names and addresses if they actually exist. 2018-07-20 19:59:15 -05:00
Subv 196a689d20 CPU: Save and restore the TPIDR_EL0 system register on every context switch.
Note that there's currently a dynarmic bug preventing this register from being written.
2018-07-20 19:57:45 -05:00
bunnei 8333b9afd0 Merge pull request #743 from lioncash/view
logging: Use std::string_view where applicable
2018-07-20 17:17:04 -07:00
bunnei a140792144 Merge pull request #745 from lioncash/package
param_package: Minor changes
2018-07-20 17:16:54 -07:00
Lioncash f4047ccd48 arm_interface: Remove unused tls_address member of ThreadContext
Currently, the TLS address is set within the scheduler, making this
member unused.
2018-07-20 18:57:40 -04:00
Lioncash 604f780c9d gl_shader_manager: Replace unimplemented function prototype
This was just a linker error waiting to happen.
2018-07-20 18:39:54 -04:00
Lioncash d923d8f50c gpu: Rename Get3DEngine() to Maxwell3D()
This makes it match its const qualified equivalent.
2018-07-20 18:34:49 -04:00
Lioncash bdfd46e192 video_core: Use nested namespaces where applicable
Compresses a few namespace specifiers to be more compact.
2018-07-20 18:23:54 -04:00
bunnei 2a56f71e58 Merge pull request #742 from bunnei/misc-apm
apm: Improve stub for GetPerformanceConfiguration.
2018-07-20 15:01:19 -07:00
Lioncash 633cba2848 arm_test_common: Get rid of truncation warnings
Explicitly cast the value to a u8 to show that this is intentional.
2018-07-20 17:53:53 -04:00
Lioncash 193e23b12f arm_test_common: Make file static variable a member variable of the testing environment
Gets rid of file-static behavior.
2018-07-20 17:52:37 -04:00
Lioncash c45b86bbb4 arm_test_common: Add missing header guard 2018-07-20 17:48:43 -04:00
Lioncash a2e090303f param_package: Take std::string by value in string-based Set() function
Allows avoiding string copies by letting the strings be moved into the
function calls.
2018-07-20 17:24:06 -04:00
Lioncash 3c613decdf param_package: Use std::unordered_map's insert_or_assign instead of map indexing
This avoids a redundant std::string construction if a key doesn't exist
in the map already.

e.g.

data[key] requires constructing a new default instance of the value in
the map (but this is wasteful, since we're already setting something
into the map over top of it).
2018-07-20 17:24:06 -04:00
Lioncash 48ea3bc5fb param_package: Get rid of file-static std::string construction
Avoids potential dynamic allocation occuring during program launch
2018-07-20 17:24:02 -04:00
Lioncash e107471e08 logging/filter: Use std::string_view in ParseFilterString()
Allows avoiding constructing std::string instances, since this only
reads an arbitrary sequence of characters.

We can also make ParseFilterRule() internal, since it doesn't depend on
any private instance state of Filter
2018-07-20 15:58:46 -04:00
Lioncash aa199be9d0 logging/backend: Add missing standard includes
A few inclusions were being satisfied indirectly. To prevent breakages
in the future, include these directly.
2018-07-20 15:31:27 -04:00
Lioncash 943584ff42 logging/backend: Use std::string_view in RemoveBackend() and GetBackend()
These can just use a view to a string since its only comparing against
two names in both cases for matches. This avoids constructing
std::string instances where they aren't necessary.
2018-07-20 15:27:20 -04:00
bunnei 1c43ebbdec apm: Improve stub for GetPerformanceConfiguration. 2018-07-20 15:20:01 -04:00
Lioncash 9e7e0ed9f0 ipc_helpers: Add PushEnum() member function to ResponseBuilder
Allows pushing strongly-typed enum members without the need to always
cast them at the call sites.

Note that we *only* allow strongly-typed enums in this case. The reason
for this is that strongly typed enums have a guaranteed defined size, so
the size of the data being pushed is always deterministic. With regular
enums this can be a little more error-prone, so we disallow them.

This function simply uses the underlying type of the enum to determine
the size of the data. For example, if an enum is defined as:

enum class SomeEnum : u16 {
  SomeEntry
};

if PushEnum(SomeEnum::SomeEntry); is called, then it will push a
u16-size amount of data.
2018-07-20 15:00:58 -04:00
bunnei b82c160eff Merge pull request #740 from Subv/acc_crash
HLE/ACC: Stub IManagerForApplication::GetAccountId to return an error.
2018-07-20 09:47:47 -07:00
bunnei 16888f7cb9 Merge pull request #738 from lioncash/sign
gl_state: Get rid of mismatched sign conversions in Apply()
2018-07-20 09:21:57 -07:00
bunnei 083b638e85 Merge pull request #737 from lioncash/move
filesys/loader: std::move VirtualFile instances in constructors where applicable
2018-07-20 09:21:15 -07:00
bunnei 059fa4330e Merge pull request #736 from lioncash/null
audout_u/audren_u: Ensure null terminators are written out in ListAudioOutsImpl(), ListAudioDeviceName(), and GetActiveAudioDeviceName()
2018-07-20 09:17:07 -07:00
bunnei e85b4f8c75 Merge pull request #735 from lioncash/video-unused
maxwell_3d: Remove unused variable within GetStageTextures()
2018-07-20 09:16:15 -07:00
bunnei 8774a9b207 Merge pull request #734 from lioncash/thread
thread: Convert ThreadStatus into an enum class
2018-07-20 09:15:52 -07:00
bunnei 70cd34a4a8 Merge pull request #733 from lioncash/dirs
partition_filesystem: Return pfs_dirs member variable within GetSubdirectories()
2018-07-20 09:15:16 -07:00
bunnei 52fcd2e880 Merge pull request #732 from lioncash/unused
nso: Minor changes
2018-07-20 09:14:10 -07:00
bunnei 133c99fb4a Merge pull request #731 from lioncash/shadow
gl_shader_decompiler: Eliminate variable and declaration shadowing
2018-07-20 09:13:36 -07:00
Subv 34d18dac20 HLE/ACC: Stub IManagerForApplication::GetAccountId to return an error.
And make IManagerForApplication::CheckAvailability always return false.
Returning a bogus id from GetAccountId causes games to crash on boot.
We should investigate this with a hwtest and either stub it properly or implement it.
2018-07-20 11:02:25 -05:00
Lioncash f53a9138bb gl_state: Make references const where applicable in Apply() 2018-07-20 01:12:29 -04:00
Lioncash 80a916dc0a gl_state: Get rid of mismatched sign conversions
While we're at it, amend the loop variable type to be the same width as
that returned by the .size() call.
2018-07-20 01:11:20 -04:00
Lioncash c9b1340d3d loader/{nca, nro}: std::move VirtualFile in the constructors where applicable
This avoids unnecessary atomic reference count increments and decrements
2018-07-20 00:10:24 -04:00
Lioncash 02e5e6fba3 vfs_offset: std::move file and name parameters of OffsetVfsFile
Avoids potentially unnecessary atomic reference count incrementing and
decrementing, as well as string copying.
2018-07-20 00:04:54 -04:00
bunnei 66808c8489 Merge pull request #730 from lioncash/string
gl_shader_decompiler: Remove unnecessary const from return values
2018-07-19 20:46:43 -07:00
Lioncash 2ce4fde1ef audren_u: Use a std::array instead of std::string for holding the audio interface/device name
std::string doesn't include the null-terminator in its data() + size()
range. This ensures that the null-terminator will also be written to the buffer
2018-07-19 23:15:27 -04:00
Lioncash 516bc05b15 audout_u: Use a std::array instead of std::string for holding the audio interface name
Uses a type that doesn't potentially dynamically allocate, and ensures
that the name of the interface is properly null-terminated when writing
it to the buffer.
2018-07-19 23:15:00 -04:00
Lioncash 10a91d9b9a maxwell_3d: Remove unused variable within GetStageTextures() 2018-07-19 22:38:28 -04:00
Lioncash 059d0017f1 thread: Convert ThreadStatus into an enum class
Makes the thread status strongly typed, so implicit conversions can't
happen. It also makes it easier to catch mistakes at compile time.
2018-07-19 22:08:56 -04:00
Lioncash 3fbde66789 partition_filesystem: Return pfs_dirs member variable within GetSubdirectories()
This should be returned here, otherwise pfs_dirs is effectively only
ever added to, but never read.
2018-07-19 21:08:50 -04:00
Lioncash 3bc310cb92 nso: Silence implicit sign conversion warnings 2018-07-19 20:51:15 -04:00
Lioncash d0dd836d53 nso: Remove unused function ReadSegment() 2018-07-19 20:49:27 -04:00
Lioncash 41a8990ba7 gl_shader_decompiler: Eliminate variable and declaration shadowing
Ensures that no identifiers are being hidden, which also reduces
compiler warnings.
2018-07-19 20:32:49 -04:00
Lioncash 5b433431aa gl_shader_decompiler: Remove unnecessary const from return values
This adds nothing from a behavioral point of view, and can inhibit the
move constructor/RVO
2018-07-19 20:11:04 -04:00
Lioncash 433c9c7bac pl_u: Simplify WriteBuffer() calls in GetSharedFontInOrderOfPriority()
With the new overload, we can simply pass the container directly.
2018-07-19 19:50:30 -04:00
bunnei b55fa06eef Merge pull request #726 from lioncash/overload
hle_ipc: Introduce generic WriteBuffer overload for multiple container types
2018-07-19 16:18:38 -07:00
bunnei a5427ba87a Merge pull request #725 from lioncash/bytes
pl_u: Specify correct size for buffers in GetSharedFontInOrderOfPriority()
2018-07-19 16:16:30 -07:00
bunnei 9cdfa3a942 Merge pull request #728 from Subv/acc_profile
HLE/ACC: Change the default user id and small improvements to the way we handle profiles
2018-07-19 16:15:01 -07:00
bunnei ae40418f2e Merge pull request #727 from Subv/acc_users
HLE/ACC: Write a single whole user id in ListAllUsers and ListOpenUsers.
2018-07-19 16:13:45 -07:00
bunnei 98ebfedfa9 Merge pull request #724 from lioncash/printf
pl_u: Remove printf specifier in log call in a log call in GetSharedFontInOrderOfPriority()
2018-07-19 16:13:07 -07:00
bunnei 0e5f6180db Merge pull request #723 from lioncash/gdb
gdbstub: Get rid of a few signed/unsigned comparisons
2018-07-19 16:12:40 -07:00
bunnei 9d65a4481e Merge pull request #722 from lioncash/signed
hid: Resolve a signed/unsigned comparison warning
2018-07-19 16:12:15 -07:00
bunnei e9c9207523 Merge pull request #721 from lioncash/svc
svc: Correct always true assertion case in SetThreadCoreMask
2018-07-19 16:11:40 -07:00
bunnei fdf72b6b60 Merge pull request #719 from lioncash/docs
loader: Amend Doxygen comments
2018-07-19 16:11:09 -07:00
bunnei b4e1375e78 Merge pull request #718 from lioncash/read
loader/nso: Check if read succeeded in IdentifyFile() before checking magic value
2018-07-19 16:10:29 -07:00
bunnei dbb4596293 Merge pull request #717 from lioncash/explicit
hle/service: Make constructors explicit where applicable
2018-07-19 16:08:07 -07:00
Subv 5bad464f7b HLE/ACC: Return an IProfile that is consistent with what was requested.
The default username for now is "yuzu".
We should eventually allow the creation of users in the emulator and have the ability to modify their parameters.
2018-07-19 16:53:42 -05:00
Subv 791d6b8b3a HLE/ACC: Change the default user id to be consistent with what we tell games on startup.
In IApplicationFunctions::PopLaunchParameter we tell the games that they were launched as user id 1.
2018-07-19 16:51:55 -05:00
Subv 3c8e295c50 HLE/ACC: Write a single whole user id in ListAllUsers and ListOpenUsers.
We only emulate a single user id for now.
2018-07-19 16:19:46 -05:00
bunnei b4a4383fb5 Merge pull request #716 from lioncash/construct
nvflinger: Emplace Display instances directly
2018-07-19 14:18:29 -07:00
Lioncash 2b158ebd25 hle_ipc: Introduce generic WriteBuffer overload for multiple container types
This introduces a slightly more generic variant of WriteBuffer().
Notably, this variant doesn't constrain the arguments to only accepting
std::vector instances. It accepts whatever adheres to the
ContiguousContainer concept in the C++ standard library.

This essentially means, std::array, std::string, and std::vector can be
used directly with this interface. The interface no longer forces you to
solely use containers that dynamically allocate.

To ensure our overloads play nice with one another, we only enable the
container-based WriteBuffer if the argument is not a pointer, otherwise
we fall back to the pointer-based one.
2018-07-19 17:05:12 -04:00
bunnei a5d3565cd8 Merge pull request #715 from lioncash/const-ref
nvdrv: Take std::string by const reference in GetDevice()
2018-07-19 13:27:48 -07:00
Sebastian Valle ee244af2f4 Merge pull request #720 from Subv/getentrytype_root
Filesystem: Return EntryType::Directory for the root directory.
2018-07-19 15:23:32 -05:00
Lioncash 0dcaa4485b pl_u: Specify correct size for buffers in GetSharedFontInOrderOfPriority()
This WriteBuffer overload expects its size argument to be in bytes, not
elements.
2018-07-19 15:57:58 -04:00
Lioncash 9ee475f731 svc: Correct always true assertion case in SetThreadCoreMask
The reason this would never be true is that ideal_processor is a u8 and
THREADPROCESSORID_DEFAULT is an s32. In this case, it boils down to how
arithmetic conversions are performed before performing the comparison.

If an unsigned value has a lesser conversion rank (aka smaller size)
than the signed type being compared, then the unsigned value is promoted
to the signed value (i.e. u8 -> s32 happens before the comparison). No
sign-extension occurs here either.

An alternative phrasing:

Say we have a variable named core and it's given a value of -2.

u8 core = -2;

This becomes 254 due to the lack of sign. During integral promotion to
the signed type, this still remains as 254, and therefore the condition
will always be true, because no matter what value the u8 is given it
will never be -2 in terms of 32 bits.

Now, if one type was a s32 and one was a u32, this would be entirely
different, since they have the same bit width (and the signed type would
be converted to unsigned instead of the other way around) but would
still have its representation preserved in terms of bits, allowing the
comparison to be false in some cases, as opposed to being true all the
time.

---

We also get rid of two signed/unsigned comparison warnings while we're
at it.
2018-07-19 15:46:17 -04:00
Lioncash 2783d58ab3 pl_u: Remove printf specifier in log call in a log call in GetSharedFontInOrderOfPriority()
This can just use the fmt specifiers and be type-agnostic.
2018-07-19 15:44:04 -04:00
Sebastian Valle 9017666b6f Merge pull request #714 from lioncash/index
hle_ipc: Amend usage of buffer_index within one of HLERequestContext's WriteBuffer() overloads
2018-07-19 14:36:34 -05:00
bunnei 1f2644b474 Merge pull request #712 from lioncash/fsp
fsp_srv: Misc individual changes
2018-07-19 12:31:33 -07:00
Lioncash 19be3828b6 gdbstub: Get rid of a few signed/unsigned comparisons
Ensures both operands in comparisons are the same signedness.
2018-07-19 15:27:01 -04:00
Lioncash 60eab9b720 hid: Use a ranged-for loops in UpdatePadCallback
Modernizes the loops themselves while also getting rid of a signed/unsigned
comparison in a loop condition.
2018-07-19 15:11:08 -04:00
Lioncash 68b6099706 hid: Use HID_NUM_LAYOUTS constant for indicating size of the layouts array
Gets rid of the use of a magic constant
2018-07-19 15:07:36 -04:00
bunnei 153756ced5 Merge pull request #713 from lioncash/filesys
filesystem: Minor changes
2018-07-19 11:49:06 -07:00
bunnei 9f6fe39602 Merge pull request #711 from lioncash/swap
common/swap: Minor changes
2018-07-19 11:48:16 -07:00
bunnei a8139e0c59 Merge pull request #710 from lioncash/unused
common/common_funcs: Remove unused rotation functions
2018-07-19 11:43:41 -07:00
bunnei fb8a2dd552 Merge pull request #694 from lioncash/warn
loader/{nro, nso}: Resolve compilation warnings
2018-07-19 11:43:14 -07:00
Subv c1b5369f60 Filesystem: Return EntryType::Directory for the root directory.
It is unknown if this is correct behavior, but it makes sense and fixes a regression with Stardew Valley.
2018-07-19 13:11:09 -05:00
Lioncash ebefc0f080 loader: Amend Doxygen comments
These weren't adjusted when VFS was introduced
2018-07-19 14:04:33 -04:00
bunnei b2d1d18681 Merge pull request #709 from lioncash/thread-local
common/misc: Deduplicate code in GetLastErrorMsg()
2018-07-19 10:00:48 -07:00
Lioncash 71dc75b71e loader/nso: Check if read succeeded in IdentifyFile() before checking magic value
We should always assume the filesystem is volatile and check each IO
operation. While we're at it reorganize checks so that early-out errors
are near one another.
2018-07-19 12:43:21 -04:00
Lioncash e664bf00ed hle/service: Make constructors explicit where applicable
Prevents implicit construction and makes these lingering non-explicit
constructors consistent with the rest of the other classes in services.
2018-07-19 12:25:02 -04:00
Lioncash f31b335a27 nvflinger: Emplace Display instances directly
We can use emplace_back to construct the Display instances directly,
instead of constructing them separately and copying them, avoiding the
need to copy std::string and std::vector instances that are part of the
Display struct.
2018-07-19 11:50:12 -04:00
bunnei 4b6bc818bf Merge pull request #705 from lioncash/string-ref
file_util: return string by const reference for GetExeDirectory()
2018-07-19 08:47:06 -07:00
bunnei 232392968f Merge pull request #704 from lioncash/string
string_util: Remove AsciiToHex()
2018-07-19 08:46:40 -07:00
bunnei 280f1100b6 Merge pull request #703 from lioncash/const
savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member function
2018-07-19 08:46:15 -07:00
bunnei bdf9a9c044 Merge pull request #702 from lioncash/initialize
partition_filesystem: Ensure all class members of PartitionFilesystem are initialized
2018-07-19 08:45:54 -07:00
bunnei a0c32fc161 Merge pull request #701 from lioncash/moving
content_archive: Minor changes
2018-07-19 08:41:42 -07:00
Lioncash 6b1043fab4 nvdrv: Take std::string by const reference in GetDevice()
This is only ever used as a lookup into the device map, so we don't need to
take the std::string instance by value here.
2018-07-19 11:40:36 -04:00
Lioncash a52cb33af2 hle_ipc: Amend usage of buffer_index within one of HLERequestContext's WriteBuffer() overloads
Previously, the buffer_index parameter was unused, causing all writes to
use the buffer index of zero, which is not necessarily what is wanted
all the time.

Thankfully, all current usages don't use a buffer index other than zero,
so this just prevents a bug before it has a chance to spring.
2018-07-19 11:10:16 -04:00
Lioncash 6fff93da5f fsp_srv: Remove unnecessary vector construction in IFile's Write() function
We can avoid constructing a std::vector here by simply passing a pointer
to the original data and the size of the copy we wish to perform to the
backend's Write() function instead, avoiding copying the data where it's
otherwise not needed.
2018-07-19 11:01:07 -04:00
Lioncash 45e747beaa fsp_srv: Remove unnecessary std::vector construction in IDirectory's Read() function
We were using a second std::vector as a buffer to convert another
std::vector's data into a byte sequence, however we can just use
pointers to the original data and use them directly with WriteBuffer,
which avoids copying the data at all into a separate std::vector.

We simply cast the pointers to u8* (which is allowed by the standard,
given std::uint8_t is an alias for unsigned char on platforms that we
support).
2018-07-19 10:46:54 -04:00
bunnei f15104730f Merge pull request #699 from lioncash/vfs
vfs: Deduplicate accumulation code in VfsDirectory's GetSize()
2018-07-19 07:38:45 -07:00
bunnei ca8697b7d9 Merge pull request #697 from bunnei/disable-depth-cull
gl_state: Temporarily disable culling and depth test.
2018-07-19 07:38:00 -07:00
Lioncash 043ab179b5 filesystem: std::move VirtualDir instance in VfsDirectoryServiceWrapper's constructor
Avoids unnecessary atomic reference count incrementing and decrementing
2018-07-19 10:34:11 -04:00
Lioncash 7ab5eb948c filesystem: Use std::string's empty() function instead of comparing against a literal
This is simply a basic value check as opposed to potentially doing
string based operations (unlikely, but still, avoiding it is free).
2018-07-19 10:32:23 -04:00
Lioncash 9dccecb6b0 filesystem: Remove pragma disabling global optimizations
This was just an artifact missed during PR review.
2018-07-19 10:30:53 -04:00
Lioncash b9758eeb2f fsp_srv: Make IStorage constructor explicit
Prevents implicit conversions.
2018-07-19 10:04:16 -04:00
Lioncash c835e6f941 fsp_srv: Add missing includes
Gets rid of relying on indirect inclusions.
2018-07-19 10:03:17 -04:00
Lioncash b4efdeb80b fsp_srv: Resolve sign-mismatch warnings in assertion comparisons 2018-07-19 09:58:32 -04:00
Lioncash 106207e2ca fsp_srv: Respect write length in Write()
Previously we were just copying the data whole-sale, even if the length
was less than the total data size. This effectively makes the
actual_data vector useless, which is likely not intended.

Instead, amend this to only copy the given length amount of data.

At the same time, we can avoid zeroing out the data before using it by
passing iterators to the constructor instead of a size.
2018-07-19 09:57:48 -04:00
Lioncash 5edccd695c common/swap: Remove unnecessary const on return value of swap() 2018-07-19 09:35:54 -04:00
Lioncash f66d29acf2 common/swap: Use static_cast where applicable 2018-07-19 09:35:13 -04:00
Lioncash d7ebfa40a1 common/swap: Use using aliases where applicable 2018-07-19 09:32:13 -04:00
Lioncash 3ec8aa2bb9 common/common_funcs: Remove unused rotation functions
These are unused and essentially don't provide much benefit either. If
we ever need rotation functions, these can be introduced in a way that
they don't sit in a common_* header and require a bunch of ifdefing to
simply be available
2018-07-19 09:21:23 -04:00
Lioncash 03d8c78199 common/misc: Deduplicate code in GetLastErrorMsg()
Android and macOS have supported thread_local for quite a while, but
most importantly is that we don't even really need it. Instead of using
a thread-local buffer, we can just return a non-static buffer as a
std::string, avoiding the need for that quality entirely.
2018-07-19 09:15:38 -04:00
Lioncash ba015f825f file_util: return string by const reference for GetExeDirectory()
This disallows modifying the internal string buffer (which shouldn't be
modified anyhow).
2018-07-19 01:27:29 -04:00
Lioncash 7ad7ee1411 string_util: Remove AsciiToHex()
Easy TODO
2018-07-18 23:57:15 -04:00
bunnei 25c34badfa Merge pull request #692 from lioncash/assign
address_arbiter: Correct assignment within an assertion statement in WakeThreads()
2018-07-18 20:56:28 -07:00
bunnei 90042f35a5 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 f92bb43138 savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member function
This function doesn't alter class state.
2018-07-18 23:50:07 -04:00
Lioncash a9b596c444 partition_filesystem: Ensure all class members of PartitionFilesystem are initialized
Previously is_hfs and pfs_header members wouldn't be initialized in the
constructor, as they were stored in locals instead. This would result in
things like GetName() and PrintDebugInfo() behaving incorrectly.

While we're at it, initialize the members to deterministic values as
well, in case loading ever fails.
2018-07-18 23:45:22 -04:00
bunnei 9a4fa973c8 gl_state: Temporarily disable culling and depth test. 2018-07-18 23:21:43 -04:00
Lioncash 9eb43dc910 content_archive: Make IsDirectoryExeFS() take a shared_ptr as a const reference
There's no need to take this by value when it's possible to avoid
unnecessary copies entirely like this.
2018-07-18 23:19:28 -04:00
Lioncash 701bdfd753 content_archive: Add missing standard includes 2018-07-18 23:18:59 -04:00
Lioncash bff53f234d content_archive: std::move VirtualFile in NCA's constructor
Gets rid of unnecessary atomic reference count incrementing and
decrementing.
2018-07-18 23:13:25 -04:00
Lioncash 47858aed98 vfs: Deduplicate accumulation code in VfsDirectory's GetSize()
We can just use a generic lambda to avoid writing the same thing twice.
2018-07-18 23:03:27 -04:00
bunnei f6f77b403e Merge pull request #691 from lioncash/guard
service/prepo: Add missing header guard
2018-07-18 19:46:14 -07:00
bunnei 35b7d6ec37 Merge pull request #686 from lioncash/fmt
externals: update fmt to version 5.1.0
2018-07-18 19:44:44 -07:00
Lioncash d0f53d27e0 loader/nro: Resolve sign mismatch warnings 2018-07-18 22:27:22 -04:00
Lioncash b20bac710d loader/nso: Remove unnecessary vector resizes
We can just initialize these vectors directly via their constructor.
2018-07-18 22:26:41 -04:00
Lioncash 0a48b45954 loader/nso: Resolve sign mismatch warnings 2018-07-18 22:26:37 -04:00
bunnei 6f120be510 Merge pull request #688 from lioncash/comma
vm_manager: Add missing commas to string literal array elements in GetMemoryStateName()
2018-07-18 18:59:09 -07:00
bunnei 8387313266 Merge pull request #693 from lioncash/unused
core/memory: Remove unused function GetSpecialHandlers() and an unused variable in ZeroBlock()
2018-07-18 18:57:13 -07:00
bunnei 5ab4dc3e1e Merge pull request #687 from lioncash/instance
core: Don't construct instance of Core::System, just to access its live instance
2018-07-18 18:55:58 -07:00
bunnei c2109ba58e Merge pull request #680 from bunnei/fix-swizz
decoders: Fix calc of swizzle image_width_in_gobs.
2018-07-18 18:55:37 -07:00
bunnei 55ef6c6686 Merge pull request #684 from lioncash/nonmember
game_list: Make ContainsAllWords an internally linked non-member function
2018-07-18 18:55:00 -07:00
bunnei 47a305ed54 decoders: Fix calc of swizzle image_width_in_gobs. 2018-07-18 21:42:52 -04:00
Zach Hilman 82150bd5c1 Virtual Filesystem 2: Electric Boogaloo (#676)
* Virtual Filesystem

* Fix delete bug and documentate

* Review fixes + other stuff

* Fix puyo regression
2018-07-18 18:07:11 -07:00
Lioncash b7e7ddbdfc core/memory: Remove unused function GetSpecialHandlers() and an unused variable in ZeroBlock() 2018-07-18 19:55:46 -04:00
Lioncash 76a9fc2f85 address_arbiter: Correct assignment within an assertion statement in WakeThreads()
This was introduced within d12af72c8f, and
considering there's no comment indicating that this is intentional, this
is very likely a bug.
2018-07-18 19:46:46 -04:00
Lioncash 26e188d074 service/prepo: Add missing header guard 2018-07-18 19:43:28 -04:00
Lioncash 81bf614695 vm_manager: Add missing commas to string literal array elements in GetMemoryStateName()
Without these, this would perform concatenation, which is definitely not
what we want here.
2018-07-18 19:37:19 -04:00
Lioncash b1b1c60009 core/memory, core/hle/kernel: Use std::move where applicable
Avoids pointless copies
2018-07-18 19:34:31 -04:00
Lioncash 74185c108e core: Make System's default constructor private
This makes it a compilation error to construct additional instances of
the System class directly, preventing accidental wasteful constructions
over and over.
2018-07-18 18:18:27 -04:00
Lioncash e72928762f core: Don't construct instance of Core::System, just to access its live instance
This would result in a lot of allocations and related object
construction, just to toss it all away immediately after the call.

These are definitely not intentional, and it was intended that all of
these should have been accessing the static function GetInstance()
through the name itself, not constructed instances.
2018-07-18 18:18:27 -04:00
Lioncash d284e38814 externals: update fmt to version 5.1.0
Previously, we were on 4.1.0, which was a major version behind.
2018-07-18 17:46:17 -04:00
Lioncash 2b547cda84 game_list: Make ContainsAllWords an internally linked non-member function
This function actually depends on no internal class state, so it doesn't
even need to be a part of the class interface.
2018-07-18 16:52:14 -04:00
Zach Hilman 03480ff436 Fill in more fields in TouchScreenEntryTouch 2018-07-18 16:33:11 -04:00
Zach Hilman 25becb080e Single touch support 2018-07-18 14:06:33 -04:00
bunnei 21fe5fa391 Merge pull request #681 from lioncash/const
game_list: Make containsAllWords a const member function
2018-07-18 10:02:58 -07:00
bunnei 988d752729 Merge pull request #682 from lioncash/telemetry
Telemetry: Minor changes
2018-07-18 10:02:46 -07:00
bunnei 2787ea8c3a Merge pull request #679 from lioncash/ctor
game_list: Remove unnecessary QString initialization in KeyReleaseEater
2018-07-17 22:18:39 -07:00
bunnei 8a6b2b17de Merge pull request #678 from lioncash/astc
astc: Minor changes
2018-07-17 22:06:20 -07:00
Lioncash 4fee2216fc telemetry: Remove unnecessary Field constructor
We can just take the value parameter by value which allows both moving
into it, and copies at the same time, depending on the calling code.
2018-07-18 00:32:35 -04:00
Lioncash 2df4be6f25 telemetry: Make operator== and operator!= const member functions of Field
These operators don't modify internal class state, so they can be made
const member functions. While we're at it, drop the unnecessary inline
keywords. Member functions that are defined in the class declaration are
already inline by default.
2018-07-18 00:28:47 -04:00
Lioncash c66555a28f telemetry: Default copy/move constructors and assignment operators
This provides the equivalent behavior, but without as much boilerplate.
While we're at it, explicitly default the move constructor, since we
have a move-assignment operator defined.
2018-07-18 00:25:12 -04:00
Lioncash 80b03cb214 game_list: Upper-case containsAllWords to ContainsAllWords()
This makes it consistent with most of the other private utility
functions.
2018-07-18 00:15:48 -04:00
Lioncash 75eba5fdb9 game_list: Make containsAllWords a const member function
This doesn't actually modify the internal class state, so it can be a
const member function. While we're at it, amend the function to take
its arguments by const reference.
2018-07-18 00:13:04 -04:00
Lioncash 308205980e game_list: Remove unnecessary QString initialization in KeyReleaseEater
QString initializes to an empty string by default, so this does nothing
meaningful. While we're at it, use a constructor initializer list for
initializing the gamelist member variable.
2018-07-18 00:07:47 -04:00
Lioncash e0c31daa57 astc: Initialize vector size directly in Decompress
There's no need to perform a separate resize.
2018-07-17 23:58:14 -04:00
Lioncash fa13cedc7a astc: Mark functions as internally linked where applicable 2018-07-17 23:58:14 -04:00
Lioncash 03f1f17552 astc: const-correctness changes where applicable
A few member functions didn't actually modify class state, so these can
be amended as necessary.
2018-07-17 23:58:14 -04:00
Lioncash 62eb3b3ede astc: Delete Bits' copy contstructor and assignment operator
This also potentially avoids warnings, considering the copy assignment
operator is supposed to have a return value.
2018-07-17 23:58:14 -04:00
Lioncash 6b32ef1d9e astc: In-class initialize member variables where appropriate 2018-07-17 23:58:10 -04:00
bunnei 6143bfd58a settings: Turn docked mode off by default. 2018-07-17 22:52:25 -04:00
bunnei ad40c27409 vi: Change TransactionId::CancelBuffer to LOG_CRITICAL. 2018-07-17 22:47:35 -04:00
bunnei 3ff59a95d5 vi: Fix size for ListDisplays default display. 2018-07-17 22:18:14 -04:00
bunnei 42b866afc5 vi: Partially implement buffer crop parameters. 2018-07-17 20:13:17 -04:00
bunnei 8931dadcf7 Merge pull request #675 from Subv/stencil
GPU: Added register definitions for the stencil parameters.
2018-07-17 15:53:00 -07:00
Subv 8335e656bb GPU: Added register definitions for the stencil parameters. 2018-07-17 15:00:21 -05:00
Zach Hilman 753d85fb0c General Filesystem and Save Data Fixes (#670) 2018-07-17 12:42:15 -07:00
bunnei 5dde645197 Merge pull request #671 from MerryMage/clear-exclusive-state
scheduler: Clear exclusive state when switching contexts
2018-07-17 07:33:32 -07:00
bunnei 430c52b249 Merge pull request #672 from SciresM/to_address_fix
svc:: Fix bug in svcWaitForAddress
2018-07-17 07:32:42 -07:00
bunnei df66fadc12 nvflinger: Fix for BufferQueue event handling. 2018-07-17 00:26:23 -04:00
Michael Scire 045893374f Kernel/Arbiter: Fix bug in WaitIfLessThan 2018-07-16 20:55:53 -06:00
MerryMage bd97579188 scheduler: Clear exclusive state when switching contexts 2018-07-16 11:24:00 +01:00
bunnei 0677b5e281 Merge pull request #668 from jroweboy/controller-lag
HID: Update controllers less often
2018-07-15 13:06:28 -07:00
bunnei f804c21cc8 Merge pull request #664 from jroweboy/logging-stuff
Minor logging improvements
2018-07-15 12:58:52 -07:00
James Rowe 12e7a3065a HID: Update controllers less often 2018-07-15 13:47:41 -06:00
James Rowe 9e5bc967de Logging: Dump all logs in the queue on close in debug mode 2018-07-15 13:02:09 -06:00
bunnei efc5bbb9ab gl_rasterizer_cache: Implement texture format G8R8. 2018-07-15 01:33:42 -04:00
bunnei bba5e84efc Merge pull request #665 from bunnei/fix-z24-s8
gl_rasterizer_cache: Fix incorrect offset in ConvertS8Z24ToZ24S8.
2018-07-14 22:18:55 -07:00
bunnei 50037e0c4f gl_rasterizer_cache: Fix incorrect offset in ConvertS8Z24ToZ24S8. 2018-07-15 00:02:05 -04:00
bunnei f5feb89c86 gl_rasterizer_cache: Implement depth format Z16_UNORM. 2018-07-14 23:43:28 -04:00
bunnei c503bd852d Merge pull request #598 from bunnei/makedonecurrent
OpenGL: Use MakeCurrent/DoneCurrent for multithreaded rendering.
2018-07-14 20:18:11 -07:00
bunnei 062a6e2f5a Merge pull request #663 from Subv/bsd
Services/BSD: Corrected the return for StartMonitoring according to SwIPC
2018-07-14 19:40:34 -07:00
bunnei d86d300744 Merge pull request #662 from Subv/delete_file
FileSys: Append the requested path to the filesystem base path in DeleteFile
2018-07-14 13:11:58 -07:00
James Rowe ada0d38ca9 Logging: Don't lock the queue for the duration of the write 2018-07-14 11:57:13 -06:00
Subv a4f321da14 Services/BSD: Corrected the return for StartMonitoring according to SwIPC. 2018-07-14 12:34:07 -05:00
Subv d4a639a08e FileSys: Append the requested path to the filesystem base path in DeleteFile.
We were trying to delete things in the current directory instead of the actual filesystem directory. This may fix some savedata issues in some games.
2018-07-14 10:57:22 -05:00
David Marcec 66bd4de380 No need to use ASSERT_MSG with an empty message 2018-07-14 23:13:16 +10:00
bunnei 91e048cce7 OpenGL: Use MakeCurrent/DoneCurrent for multithreaded rendering. 2018-07-14 02:50:35 -04:00
Subv 021731e42a GPU: Always enable the depth write when clearing the depth buffer.
The GPU ignores that register when clearing, but OpenGL obeys the glDepthMask parameter, so we set the depth mask to GL_TRUE when clearing the depth buffer. It will be restored to the correct value automatically on the next draw call.
2018-07-14 00:52:23 -05:00
bunnei 8e9285f679 Merge pull request #657 from bunnei/dual-vs
gl_shader_gen: Implement dual vertex shader mode.
2018-07-13 07:08:54 -07:00
Hedges d8d8be6ac0 More improvements to GDBStub (#653)
* More improvements to GDBStub
- Debugging of threads should work correctly with source and assembly level stepping and modifying registers and memory, meaning threads and callstacks are fully clickable in VS.
- List of modules is available to the client, with assumption that .nro and .nso are backed up by an .elf with symbols, while deconstructed ROMs keep N names.
- Initial support for floating point registers.

* Tidy up as requested in PR feedback

* Tidy up as requested in PR feedback
2018-07-12 20:22:59 -07:00
bunnei e904e1f785 gl_rasterizer: Fix check for if a shader stage is enabled. 2018-07-12 22:57:57 -04:00
bunnei 6e04dd24fe gl_shader_gen: Implement dual vertex shader mode.
- When VertexA shader stage is enabled, we combine with VertexB program to make a single Vertex Shader stage.
2018-07-12 22:25:36 -04:00
bunnei 30b352bfc4 Merge pull request #656 from ogniK5377/audren-mem-init
Initialized memory for RequestUpdateAudioRenderer and fixed MemoryPoolSection to be more accurate
2018-07-12 19:12:47 -07:00
bunnei 7fa10a188d Merge pull request #655 from bunnei/pred-lt-nan
gl_shader_decompiler: Implement PredCondition::LessThanWithNan.
2018-07-12 18:59:15 -07:00
David Marcec 0b2adb2672 We only need to alert for memory pool changes 2018-07-13 10:36:28 +10:00
David Marcec 761d44eea4 initialized voice status and unused sizes in the update data header 2018-07-13 10:35:44 +10:00
bunnei 50e6ef98e2 gl_shader_decompiler: Implement PredCondition::LessThanWithNan. 2018-07-12 20:04:35 -04:00
bunnei fef7eb92de gl_shader_decompiler: Use FlowCondition field in EXIT instruction. 2018-07-12 20:00:37 -04:00
Sebastian Valle d1bd94351c Merge pull request #652 from Subv/fadd32i
GPU: Implement the FADD32I shader instruction.
2018-07-12 17:36:51 -05:00
bunnei ba0665c397 Merge pull request #651 from Subv/ffma_decode
GPU: Corrected the decoding of FFMA for immediate operands.
2018-07-12 12:42:58 -07:00
Subv 555dd2f793 GPU: Implement the FADD32I shader instruction. 2018-07-12 12:00:31 -05:00
Tobias 7bf3ea7dcc Port #3335 and #3373 from Citra: "Small SDL fixes" and "Print the actual error preventing SDL from working" (#637)
* Port #3335 and #3373 from Citra

* Fixup: Use the new logging placeholders
2018-07-12 09:26:27 -07:00
Subv d87962405b GPU: Corrected the decoding of FFMA for immediate operands. 2018-07-12 10:15:48 -05:00
bunnei 9ce122e047 Merge pull request #648 from ogniK5377/no-net
Let games/application know that we're offline
2018-07-12 06:44:15 -07:00
bunnei 855a9e2fdc Merge pull request #649 from ogniK5377/audout-auto
Audout "Auto" functions
2018-07-12 06:43:37 -07:00
James Rowe ca04901b0f yuzu - Fix duplicate logs 2018-07-12 01:11:43 -06:00
James Rowe bed23a6e25 yuzu-cmd Apply the filter string from settings 2018-07-12 01:09:03 -06:00
David Marcec 7d5403fc89 Audout "Auto" functions
Audout autos are identical to their counterpart except for the buffer type which yuzu already handles for us.
2018-07-12 16:57:31 +10:00
David Marcec 3fcb7978f0 Added IsWirelessCommunicationEnabled, IsEthernetCommunicationEnabled, IsAnyInternetRequestAccepted
Since we have no socket implementation we should be returning 0 to indicate we're currently offline.
2018-07-12 16:40:17 +10:00
bunnei c2ade32fad Merge pull request #559 from Subv/mount_savedata
Services/FS: Return the correct error code when trying to mount a nonexistent savedata.
2018-07-11 20:21:52 -07:00
bunnei d613d8ee52 hid: Fix timestamps and controller type.
- This fixes user input in SMO.
2018-07-10 22:55:13 -04:00
bunnei 094bac5413 Merge pull request #644 from ogniK5377/getconfig-err
NvOsGetConfigU32 production impl
2018-07-10 15:44:23 -07:00
bunnei 9ae6aa8a2e Merge pull request #633 from FearlessTobi/port-defines
Port #3579 from Citra: Clean up architecture-specific defines
2018-07-10 09:12:52 -07:00
bunnei e73ad0c7bb Merge pull request #642 from bunnei/create-save-dir
savedata_factory: Always create a save directory for games.
2018-07-10 09:09:58 -07:00
David Marcec bc85c649c1 NvOsGetConfigU32 production impl
Settings are only  used when RMOS_SET_PRODUCTION_MODE is set to 0.
If production mode is set, the error code 0x30006 is returned instead
2018-07-10 14:10:17 +10:00
bunnei 9816ce67a5 Merge pull request #635 from FearlessTobi/port-crashfix
Port #3474 from Citra: Do not crash on unimplemented code in debug build
2018-07-09 17:08:25 -07:00
bunnei 082fb5a8a8 Merge pull request #634 from FearlessTobi/port-viewport-fix
Port #3505 from Citra: Fix QGLWidget viewport resize on macOS
2018-07-09 17:07:30 -07:00
bunnei c6703bb009 Merge pull request #640 from bunnei/flip-tris-viewport
gl_rasterizer: Flip triangles when regs.viewport_transform[0].scale_y is negative.
2018-07-09 14:32:35 -07:00
bunnei 99a359777c savedata_factory: Always create a save directory for games. 2018-07-08 17:05:13 -04:00
bunnei 8924486715 nvhost_ctrl: Fix NvOsGetConfigU32 for Snipper Clips. 2018-07-08 17:01:46 -04:00
bunnei 9d9375e109 gl_rasterizer: Flip triangles when regs.viewport_transform[0].scale_y is negative.
- Fixes a regression with Binding of Isaac.
2018-07-08 16:16:24 -04:00
bunnei fb664990a3 Merge pull request #625 from Subv/imnmx
GPU: Implemented the IMNMX shader instruction.
2018-07-07 19:33:50 -07:00
bunnei 709d855436 Merge pull request #627 from Subv/bc7u
GPU: Implemented the BC7U texture format.
2018-07-07 19:33:18 -07:00
bunnei 0c22a8d514 Revert "Virtual Filesystem (#597)"
This reverts commit 12e9522b32.
2018-07-07 20:24:51 -07:00
Subv 3c86a705ba GPU: Implemented the BC7U texture format.
Note: Our version of glad exports GL_COMPRESSED_RGBA_BPTC_UNORM as GL_COMPRESSED_RGBA_BPTC_UNORM_ARB, maybe it's time we update it.
2018-07-07 09:17:48 -05:00
fearlessTobi 8f74246cb1 Port #3474 from Citra 2018-07-07 14:17:44 +02:00
fearlessTobi fa8a9656a9 Port #3505 from CItra 2018-07-07 14:11:49 +02:00
fearlessTobi 365753a98c Port #3579 from Citra 2018-07-07 13:59:18 +02:00
bunnei c754485cda Merge pull request #630 from FearlessTobi/remove-citra-references
Remove some references to Citra
2018-07-06 11:13:50 -04:00
Zach Hilman 12e9522b32 Virtual Filesystem (#597)
* Add VfsFile and VfsDirectory classes

* Finish abstract Vfs classes

* Implement RealVfsFile (computer fs backend)

* Finish RealVfsFile and RealVfsDirectory

* Finished OffsetVfsFile

* More changes

* Fix import paths

* Major refactor

* Remove double const

* Use experimental/filesystem or filesystem depending on compiler

* Port partition_filesystem

* More changes

* More Overhaul

* FSP_SRV fixes

* Fixes and testing

* Try to get filesystem to compile

* Filesystem on linux

* Remove std::filesystem and document/test

* Compile fixes

* Missing include

* Bug fixes

* Fixes

* Rename v_file and v_dir

* clang-format fix

* Rename NGLOG_* to LOG_*

* Most review changes

* Fix TODO

* Guess 'main' to be Directory by filename
2018-07-06 10:51:32 -04:00
fearlessTobi 08acefbaab Remove some references to Citra 2018-07-06 15:47:06 +02:00
bunnei 0ea724e06b Merge pull request #629 from Subv/depth_test
GPU: Allow using the old NV04 values for the depth test function.
2018-07-05 16:43:10 -04:00
Subv c44c0078cc GPU: Allow using the old NV04 values for the depth test function.
These seem to be just a valid as the GL token values. Thanks @ReinUsesLisp

This restores graphical output to Disgaea 5
2018-07-05 13:01:31 -05:00
bunnei aaf0e0a73e Merge pull request #626 from Subv/shader_sync
GPU: Stub the shader SYNC and DEPBAR instructions.
2018-07-05 12:54:19 -04:00
bunnei ffdd37675f Merge pull request #624 from Subv/f2f_round
GPU: Implemented the F2F 'round' rounding mode.
2018-07-05 11:30:29 -04:00
bunnei 159deaa00f Merge pull request #623 from Subv/vertex_types
GPU: Implement the Size_16_16 and Size_10_10_10_2 vertex attribute types
2018-07-05 11:30:01 -04:00
bunnei 9bfeacb59a Merge pull request #622 from Subv/unused_tex
GPU: Ignore unused textures and corrected the TEX shader instruction decoding.
2018-07-05 11:29:17 -04:00
bunnei a45206c2b2 Merge pull request #621 from Subv/psetp_
GPU: Implemented the PSETP shader instruction.
2018-07-05 11:28:50 -04:00
bunnei 21f8cd6e8c Merge pull request #620 from Subv/depth_z32f
GPU: Implemented the 32 bit float depth buffer format.
2018-07-05 11:09:15 -04:00
Subv cc56ecc097 GPU: Implemented the IMNMX shader instruction.
It's similar to the FMNMX instruction but it works on integers.
2018-07-04 15:44:37 -05:00
Subv c4268c13c6 GPU: Implemented the F2F 'round' rounding mode.
It's implemented via the GLSL 'roundEven()' function.
2018-07-04 15:43:21 -05:00
Subv 56a5e7ba50 GPU: Stub the shader SYNC and DEPBAR instructions.
It is unknown at this moment if we actually need to do something with these instructions or if the GLSL compiler takes care of that for us.
2018-07-04 15:29:51 -05:00
Subv 25e08cf116 GPU: Implement the Size_16_16 and Size_10_10_10_2 vertex attribute types.
Both signed and unsigned variants.
2018-07-04 15:22:34 -05:00
Subv 36822431cc GPU: Ignore textures that the GLSL compiler deemed unused when binding textures to the shaders. 2018-07-04 15:20:12 -05:00
Subv 673600656c GPU: Corrected the decoding for the TEX shader instruction. 2018-07-04 15:19:20 -05:00
Subv 9ba997d4f0 GPU: Implemented the PSETP shader instruction.
It's similar to the isetp and fsetp instructions but it works on predicates instead.
2018-07-04 15:15:03 -05:00
Subv 910af4676c GPU: Implemented the 32 bit float depth buffer format. 2018-07-04 10:42:33 -05:00
Subv 70f55cf738 GPU: Flip the triangle front face winding if the GPU is configured to not flip the triangles.
OpenGL's default behavior is already correct when the GPU is configured to flip the triangles.

This fixes 1-2 Switch's splash screen.
2018-07-04 10:26:46 -05:00
Subv 53e622f91d GPU: Only configure the used framebuffers during clear.
Don't try to configure the color buffer if it is not being cleared, it may not be completely valid at this point.
2018-07-03 22:32:59 -05:00
bunnei 3c4a5817c2 Merge pull request #609 from Subv/clear_buffers
GPU: Implemented the CLEAR_BUFFERS register.
2018-07-03 19:34:34 -04:00
Subv bb62c6dde3 GPU: Factor out the framebuffer configuration code for both Clear and Draw commands. 2018-07-03 16:56:47 -05:00
Subv 20afd1187d GPU: Support clears that don't clear the color buffer. 2018-07-03 16:56:47 -05:00
Subv fd4699c84f GPU: Bind and clear the render target when the CLEAR_BUFFERS register is written to. 2018-07-03 16:56:44 -05:00
Subv be5f1dde73 GPU: Added registers for the CLEAR_BUFFERS and CLEAR_COLOR methods. 2018-07-03 16:56:31 -05:00
bunnei 8a717606e4 gl_rasterizer_cache: Implement PixelFormat S8Z24. 2018-07-03 14:58:13 -04:00
David 051040caaf Update AudioRenderer Voice Sections (#614)
* voice section updating

* fixed slight offset miscalculation

* fixed overflow
2018-07-03 13:09:10 -04:00
bunnei 1a67d370cf Merge pull request #607 from jroweboy/logging
Logging - Customizable backends
2018-07-03 00:26:45 -04:00
bunnei 6bc04e4fed Merge pull request #612 from bunnei/fix-cull
gl_rasterizer: Only set cull mode and front face if enabled.
2018-07-02 23:48:52 -04:00
bunnei 616c64f56d Merge pull request #611 from Subv/enabled_depth_test
GPU: Don't try to parse the depth test function if the depth test is disabled and use only the least significant 3 bits in the depth test func
2018-07-02 23:47:11 -04:00
bunnei 0dcdf918d9 Merge pull request #610 from Subv/mufu_8
GPU: Implemented MUFU suboperation 8, sqrt.
2018-07-02 22:26:42 -04:00
bunnei e702550809 gl_rasterizer: Only set cull mode and front face if enabled. 2018-07-02 22:22:25 -04:00
Subv 40fd6504e2 GPU: Use only the least significant 3 bits when reading the depth test func.
Some games set the full GL define value here (including nouveau), but others just seem to set those last 3 bits.
2018-07-02 21:06:36 -05:00
Subv f6e05eac41 GPU: Don't try to parse the depth test function if the depth test is disabled. 2018-07-02 21:02:46 -05:00
bunnei 0afb4ff542 Fix build and address review feedback 2018-07-02 21:45:48 -04:00
James Rowe 7af1a786d5 Add configurable logging backends 2018-07-02 21:45:47 -04:00
James Rowe d74d2a77cb Update clang format 2018-07-02 21:45:47 -04:00
James Rowe e159c550d8 Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
bunnei 0b05c9abc8 Merge pull request #608 from Subv/depth
GPU: Implemented the depth buffer and depth test + culling
2018-07-02 21:24:43 -04:00
Subv 629b9090ff GPU: Set up the culling configuration on each draw. 2018-07-02 19:51:29 -05:00
Subv 6880dd7352 GPU: Implemented MUFU suboperation 8, sqrt. 2018-07-02 19:48:15 -05:00
Sebastian Valle 5809a9bc82 Merge pull request #606 from Subv/base_vertex
GPU: Fixed the index offset and implement BaseVertex when doing indexed rendering.
2018-07-02 14:07:38 -05:00
Sebastian Valle 9d3f6e86cf Merge pull request #603 from Subv/nvmap_free
GPU: Remove unmapped surfaces from the rasterizer cache and fix our nvmap::Free behavior.
2018-07-02 14:07:17 -05:00
Sebastian Valle 8bb96959c0 Merge pull request #605 from Subv/dma_copy
GPU: Directly copy the pixels when performing a same-layout DMA.
2018-07-02 14:06:56 -05:00
Subv 65439518d8 GPU: Set up the depth test state on every draw. 2018-07-02 13:33:06 -05:00
Subv fb733c02bd MaxwellToGL: Added conversion functions for depth test and cull mode. 2018-07-02 13:31:49 -05:00
Subv dfe650f7bd GPU: Added registers for depth test and cull mode. 2018-07-02 13:31:20 -05:00
Subv 62068f723a GPU: Implemented the Z24S8 depth format and load the depth framebuffer. 2018-07-02 12:42:04 -05:00
Subv 95a7f92998 GPU: Implement offsetted rendering when using non-indexed drawing. 2018-07-02 11:23:36 -05:00
Subv 1f6139aa58 GPU: Fixed the index offset rendering, and implemented the base vertex functionality.
This fixes Stardew Valley.
2018-07-02 11:22:17 -05:00
Subv 270358e666 GPU: Added register definitions for the vertex buffer base element. 2018-07-02 11:21:23 -05:00
bunnei 9bef775227 Merge pull request #604 from Subv/invalid_textures
GPU: Ignore invalid and disabled textures when drawing.
2018-07-02 11:48:18 -04:00
Subv 70196aa935 GPU: Directly copy the pixels when performing a same-layout DMA. 2018-07-02 09:46:33 -05:00
Subv 9819aa1298 GPU: Ignore disabled textures and textures with an invalid address. 2018-07-02 09:43:38 -05:00
Subv 40d52181c3 GPU: Allow GpuToCpuAddress to return boost::none for unmapped addresses. 2018-07-02 09:42:48 -05:00
Subv 4c6cb7161a GPU: Remove a surface from the cache when its backing memory is being unmapped from the GPU's MMU. 2018-07-01 10:50:06 -05:00
Subv a90bbff826 nvmap: Return the address of the nvmap object when Freeing it for the last time.
This behavior is confirmed by reverse engineering.
2018-07-01 10:48:50 -05:00
bunnei eac897d583 Merge pull request #602 from Subv/mufu_subop
GPU: Corrected the size of the MUFU subop field, and removed incorrect "min" operation.
2018-07-01 11:06:04 -04:00
bunnei 7eb7b100a8 Merge pull request #601 from Subv/rgba32_ui
GPU: Implement the RGBA32_UINT rendertarget format.
2018-07-01 03:22:38 -04:00
Subv b9e6f48dbb GPU: Corrected the size of the MUFU subop field, and removed incorrect "min" operation. 2018-06-30 14:48:25 -05:00
Subv 8bfac40a92 GPU: Implemented the RGBA32_UINT rendertarget format. 2018-06-30 14:23:13 -05:00
Subv d72f74483c GLCache: Specify the component type along the texture type in the format tuple. 2018-06-30 14:08:51 -05:00
bunnei 4406d9b84c gl_shader_decompiler: Implement predicate NotEqualWithNan. 2018-06-30 03:01:25 -04:00
bunnei a900f81bdb Merge pull request #595 from bunnei/raster-cache
Rewrite the OpenGL rasterizer cache
2018-06-29 14:07:28 -04:00
bunnei bf95fca386 gl_rasterizer_cache: Only dereference color_surface/depth_surface if valid. 2018-06-29 13:08:08 -04:00
bunnei 9500a18c52 Merge pull request #588 from mailwl/hwopus
Service/Audio: add hwopus service, stub GetWorkBufferSize function
2018-06-27 21:57:21 -04:00
bunnei 147286048e gl_shader_decompiler: Add a return path for unknown instructions. 2018-06-27 01:14:34 -04:00
bunnei bdba4b6c83 gl_rasterizer_cache: Implement caching for texture and framebuffer surfaces.
gl_rasterizer_cache: Improved cache management based on Citra's implementation.

gl_surface_cache: Add some docstrings.
2018-06-27 00:15:44 -04:00
bunnei fb731b0a5a gl_rasterizer_cache: Various fixes for ASTC handling. 2018-06-27 00:08:04 -04:00
bunnei 796f775771 gl_rasterizer_cache: Use SurfaceParams as a key for surface caching. 2018-06-27 00:08:04 -04:00
bunnei 1576d41c0f maxwell_3d: Add a struct for RenderTargetConfig. 2018-06-27 00:08:04 -04:00
bunnei 47ba060950 settings: Add a configuration for use_accurate_framebuffers. 2018-06-27 00:08:04 -04:00
bunnei bd86248eae gl_rasterizer: Implement AccelerateDisplay to forward textures to framebuffers. 2018-06-27 00:08:03 -04:00
bunnei 09150adc15 gl_rasterizer_cache: Cache size_in_bytes as a const per surface. 2018-06-27 00:08:03 -04:00
bunnei 022b5b7630 gl_rasterizer_cache: Refactor to make SurfaceParams members const. 2018-06-27 00:08:03 -04:00
bunnei e250313bcf gl_rasterizer_cache: Remove Citra's rasterizer cache, always load/flush surfaces. 2018-06-27 00:08:03 -04:00
bunnei e210287624 gl_rasterizer: Workaround for when exceeding max UBO size. 2018-06-26 23:07:34 -04:00
bunnei 5366e91b51 Merge pull request #593 from bunnei/fix-swizzle
gl_state: Fix state management for texture swizzle.
2018-06-26 22:05:49 -04:00
bunnei 8151dfed79 Merge pull request #592 from bunnei/cleanup-gl-state
gl_state: Remove unused state management from 3DS.
2018-06-26 22:05:03 -04:00
bunnei 11c391a914 gl_state: Fix state management for texture swizzle. 2018-06-26 17:15:58 -04:00
bunnei 93a4bb20dc gl_state: Remove unused state management from 3DS. 2018-06-26 17:09:25 -04:00
bunnei b856c6d1c2 gl_rasterizer_cache: Fix inverted B5G6R5 format. 2018-06-26 17:07:36 -04:00
bunnei 78ce5a7026 yuzu: Remove SSBOs check from Qt frontend. 2018-06-26 11:28:56 -04:00
bunnei ef66c36936 Merge pull request #554 from Subv/constbuffer_ubo
Rasterizer: Use UBOs instead of SSBOs for uploading const buffers.
2018-06-26 10:25:56 -04:00
bunnei 8bd9579984 Merge pull request #589 from mailwl/fix-crash
Fix crash at exit
2018-06-26 01:01:10 -04:00
mailwl 52b73904e8 Fix crash at exit 2018-06-25 18:01:08 +03:00
David e4479c5b55 Send the correct RequestUpdateAudioRenderer revision in the output header (#587)
* We should be returning our revision instead of what is requested.

Hardware test on a 5.1.0 console

* Added sysversion comment
2018-06-25 10:34:41 -04:00
mailwl 5ffac05099 Service/Audio: add hwopus service, stub GetWorkBufferSize function 2018-06-25 16:44:17 +03:00
David 1a6e4c3a2e Removed duplicate structs, changed AudioRendererResponse -> UpdateDataHeader (#583)
* Removed duplicate structs, changed AudioRendererResponse -> UpdateDataHeader

According to game symbols(SMO), there's references to UpdateDataHeader which seems to be what AudioRendererResponse actually is

* oops

* AudioRendererParameters should be AudioRendererParameter according to SMO
2018-06-23 20:46:29 -04:00
David a86258dfc1 Fixed RequestUpdateAudioRenderer deadlocks and calculated section sizes properly (#580)
* Fixed RequestUpdateAudioRenderer deadlocks and calculated section sizes properly

This fixes RequestUpdateAudioRenderer deadlocks in games like Puyo Puyo Tetris and games which require a proper section size in games such as Retro City Rampage. This fixes causes various games to start rendering or trying to render
2018-06-22 22:22:33 -04:00
bunnei 55d7d4afa4 Merge pull request #579 from SciresM/master
svc: Fully implement svcSignalToAddress and svcWaitForAddress
2018-06-22 12:08:39 -04:00
mailwl 29f156eb60 IPC: skip empty buffer write
prevent yuzu crash, if games, like Axiom Verge, trying to read 0 bytes from file
2018-06-22 11:28:10 +03:00
Michael Scire a3509a9e74 Kernel/Arbiters: Fix casts, cleanup comments/magic numbers 2018-06-22 00:47:59 -06:00
Michael Scire 28fe461cd3 Add additional missing format. 2018-06-21 21:09:51 -06:00
Michael Scire 96617f16ed Run clang-format on PR. 2018-06-21 21:05:34 -06:00
bunnei dc28738bc9 Merge pull request #577 from mailwl/audren-update
Service/Audio: update audren:u service
2018-06-21 22:40:37 -04:00
Michael Scire 9d83964c1b Kernel/Arbiters: HLE is atomic, adjust code to reflect that. 2018-06-21 20:25:57 -06:00
Zach Hilman a47f36da7b Add support for decrypted NCA files (#567)
* Start to add NCA support in loader

* More nca stuff

* More changes to nca.cpp

* Now identifies decrypted NCA cont.

* Game list fixes and more structs and stuff

* More updates to Nca class

* Now reads ExeFs (i think)

* ACTUALLY LOADS EXEFS!

* RomFS loads and games execute

* Cleanup and Finalize

* plumbing, cleanup and testing

* fix some things that i didnt think of before

* Preliminary Review Changes

* Review changes for bunnei and subv
2018-06-21 11:16:23 -04:00
Michael Scire 2a0ea82fec Kernel/Arbiters: Initialize arb_wait_address in thread struct. 2018-06-21 05:13:06 -06:00
Michael Scire 3aa03cca5a Kernel/Arbiters: Clear WaitAddress in SignalToAddress 2018-06-21 04:20:39 -06:00
Michael Scire d12af72c8f Kernel/Arbiters: Mostly implement SignalToAddress 2018-06-21 04:10:11 -06:00
Michael Scire 3119b64d86 Kernel/Arbiters: Implement WaitForAddress 2018-06-21 01:40:29 -06:00
mailwl 40eb06288c Service/Audio: update audren:u service 2018-06-21 10:26:24 +03:00
Michael Scire 6e9b11ffa0 Kernel/Arbiters: Add stubs for 4.x SignalToAddress/WaitForAddres SVCs. 2018-06-21 00:49:43 -06:00
Subv cb4ff57322 Build: Fixed some MSVC warnings in various parts of the code. 2018-06-20 11:39:10 -05:00
greggameplayer 1092153a6a Implement GetAvailableLanguageCodes2 (#575)
* Implement GetAvailableLanguageCodes2

* Revert "Implement GetAvailableLanguageCodes2"

This reverts commit caadd9eea3497ae2a13382aecb8ca29e1c02c5af.

* Implement GetAvailableLanguageCodes2

* Implement GetAvailableLanguageCodes2
2018-06-19 11:29:04 -04:00
bunnei 62f02e6bd0 Merge pull request #574 from Subv/shader_abs_neg
GPU: Perform negation after absolute value in the float shader instructions.
2018-06-18 22:24:57 -04:00
bunnei 9571906188 Merge pull request #561 from DarkLordZach/fix-odyssey-input-crash
Avoid initializing single-joycon layouts with handheld controller
2018-06-18 22:06:11 -04:00
Subv 29bddf03f7 GPU: Perform negation after absolute value in the float shader instructions. 2018-06-18 19:56:29 -05:00
Subv cd61616ddb GPU: Don't mark uniform buffers and registers as used for instructions which don't have them.
Like the MOV32I and FMUL32I instructions.
This fixes a potential crash when using these instructions.
2018-06-18 19:50:35 -05:00
Subv 62a67fbd0a Services/FS: Return the correct error code when trying to mount a nonexistent savedata. 2018-06-18 19:26:01 -05:00
bunnei f87da98ff7 Merge pull request #570 from bunnei/astc
gl_rasterizer: Implement texture format ASTC_2D_4X4.
2018-06-18 19:08:49 -04:00
bunnei 25c140c5e0 Merge pull request #562 from DarkLordZach/extracted-ncas-ui
Add UI support for extracted NCA folders
2018-06-18 16:09:46 -04:00
bunnei 149fef99a0 Merge pull request #572 from Armada651/user-except-stub
svc: Add a stub for UserExceptionContextAddr.
2018-06-18 11:37:13 -04:00
bunnei 1abca5bc0c Merge pull request #571 from Armada651/loose-blend
gl_rasterizer: Get loose on independent blending.
2018-06-18 11:36:50 -04:00
Jules Blok 5614c1329e svc: Add a stub for UserExceptionContextAddr. 2018-06-18 09:29:11 +02:00
Jules Blok 55e69c1cf2 gl_rasterizer: Get loose on independent blending. 2018-06-18 09:27:06 +02:00
bunnei 9feb7f7a63 gl_rasterizer: Implement texture format ASTC_2D_4X4. 2018-06-18 01:56:59 -04:00
bunnei 5fb04f7c6d gl_rasterizer_cache: Loosen things up a bit. 2018-06-18 00:55:59 -04:00
bunnei a72b4c358d gl_shader_decompiler: Implement LOP instructions. 2018-06-17 15:27:48 -04:00
bunnei b071232a75 gl_shader_decompiler: Refactor LOP32I instruction a bit in support of LOP. 2018-06-17 13:31:39 -04:00
bunnei dc1808fa4a gl_shader_decompiler: Implement integer size conversions for I2I/I2F/F2I. 2018-06-15 22:42:02 -04:00
bunnei 288b9170c5 Merge pull request #564 from bunnei/lop32i_passb
gl_shader_decompiler: Implement LOP32I LogicOperation PassB.
2018-06-15 22:04:03 -04:00
bunnei bb1e655f2d gl_shader_gen: Set position.w to 1. 2018-06-15 20:47:04 -04:00
bunnei fb8823d10d gl_shader_decompiler: Implement LOP32I LogicOperation PassB. 2018-06-15 20:43:33 -04:00
Zach Hilman 044ed8717e Bug fixes, testing, and review changes 2018-06-14 17:25:40 -04:00
Zach Hilman ad8d79aade Add 'Load Folder' menu option 2018-06-14 12:27:29 -04:00
Zach Hilman ba498ab930 Add support for main files in file picker 2018-06-14 12:16:56 -04:00
Zach Hilman ea7301923c Recognize main files in game list 2018-06-14 12:02:32 -04:00
Zach Hilman 3898d6b54c Narrow down filter of layout configs 2018-06-13 20:03:12 -04:00
Zach Hilman 42701153c7 Move loop condition to free function 2018-06-13 13:44:46 -04:00
Zach Hilman 93c0478c5c Avoid initializing single-joycon layouts with handheld controller 2018-06-13 13:01:05 -04:00
bunnei 6f0b2ba7cf Merge pull request #560 from Subv/crash_widget
Qt: Removed the Registers widget.
2018-06-13 10:15:00 -04:00
Subv de53649e61 Qt: Removed the Registers widget.
It was crashing and nobody actually uses this.
2018-06-12 20:33:32 -05:00
bunnei 84e9756197 Merge pull request #556 from Subv/dma_engine
GPU: Partially implemented the Maxwell DMA engine.
2018-06-12 14:25:17 -04:00
bunnei e11428e17e Merge pull request #558 from Subv/iadd32i
GPU: Implemented the iadd32i shader instruction.
2018-06-12 14:19:25 -04:00
Subv 1a0c6910ce GPU: Implemented the iadd32i shader instruction. 2018-06-12 11:46:45 -05:00
Subv df214db493 GPU: Partially implemented the Maxwell DMA engine.
Only tiled->linear and linear->tiled copies that aren't offsetted are supported for now. Queries are not supported. Swizzled copies are not supported.
2018-06-12 11:27:36 -05:00
bunnei 205556d5f0 Merge pull request #557 from shinyquagsire23/libnx-hid-fix
hid: Update all layouts and only show handheld as connected, fixes libnx input for P1_AUTO
2018-06-12 09:07:38 -04:00
bunnei 37110bbc02 gl_shader_decompiler: Implement saturate for float instructions. 2018-06-11 21:46:34 -04:00
shinyquagsire23 a02f67160c hid: Update all layouts and only show handheld as connected, fixes libnx input for P1_AUTO 2018-06-11 19:41:29 -06:00
Subv cf9e8fbc13 GPU: Convert the gl_InstanceId and gl_VertexID variables to floats when reading from them.
This corrects the invalid position values in some games when doing attribute-less rendering.
2018-06-10 13:50:19 -05:00
Subv aa4d2cac1b Rasterizer: Use UBOs instead of SSBOs for uploading const buffers.
This should help a bit with GPU performance once we're GPU-bound.
2018-06-09 18:02:05 -05:00
Subv 297a99944e GPU: Implement the iset family of shader instructions. 2018-06-09 16:19:13 -05:00
Subv f387d11882 GPU: Added decodings for the ISET family of instructions. 2018-06-09 15:56:50 -05:00
bunnei ede185a446 Merge pull request #550 from Subv/ssy
GPU: Stub the SSY shader instruction.
2018-06-09 00:42:53 -04:00
bunnei 5f2f250915 Merge pull request #551 from bunnei/shr
gl_shader_decompiler: Implement SHR instruction.
2018-06-09 00:42:44 -04:00
bunnei 9c12d989c3 gl_shader_decompiler: Implement SHR instruction. 2018-06-09 00:01:17 -04:00
Subv 6d7be6fc08 GPU: Stub the SSY shader instruction.
This instruction tells the GPU where the flow reconverges in a non-uniform control flow scenario, we can ignore this when generating GLSL code.
2018-06-08 22:46:10 -05:00
bunnei 179623a99c gl_shader_decompiler: Implement IADD instruction. 2018-06-08 23:25:22 -04:00
bunnei 54408c16a8 gl_shader_decompiler: Add missing asserts for saturate_a instructions. 2018-06-08 23:24:10 -04:00
bunnei 7ff5d3ef92 Merge pull request #533 from mailwl/array-to-buffer
Common/string_util: add StringFromBuffer() function
2018-06-08 18:51:00 -04:00
Subv 158cd05fd3 GPU: Synchronize the blend state on every draw call.
Only independent blending on render target 0 is implemented for now.

This fixes the elongated squids in Splatoon 2's boot screen.
2018-06-08 17:05:52 -05:00
Subv 3e48928bf2 GPU: Added registers for normal and independent blending. 2018-06-08 17:04:41 -05:00
bunnei 0aac4935af Merge pull request #547 from Subv/compressed_alignment
GLCache: Align compressed texture sizes to their compression ratio, and then align that compressed size to the block height for tiled textures.
2018-06-08 16:40:49 -04:00
Subv 5f3afad871 GLCache: Align compressed texture sizes to their compression ratio, and then align that compressed size to the block height for tiled textures.
This fixes issues with retrieving non-block-aligned tiled compressed textures from the cache.
2018-06-08 12:27:19 -05:00
Subv b834631438 Rasterizer: Flush the written region when writing shader uniform data before copying it to the uniform buffers.
This fixes the flip_viewport uniform having invalid values when drawing.
2018-06-08 12:22:39 -05:00
bunnei 48cb11e6b7 Merge pull request #543 from Subv/uniforms
GLRenderer: Write the shader stage configuration UBO data *before* copying it to the GPU.
2018-06-07 11:21:36 -04:00
Subv f84d419248 GLRenderer: Write the shader stage configuration UBO data *before* copying it to the GPU.
This should fix the bug with the vs_config UBO being uninitialized during shader execution.
2018-06-07 08:33:23 -05:00
mailwl b70838ca60 Common/string_util: add StringFromBuffer function
convert input buffer (std::vector<u8>) to string, stripping zero chars
2018-06-07 09:59:47 +03:00
bunnei 5d0f6acd9b Merge pull request #522 from mailwl/mm-u
Service/MM: add service and stub some functions
2018-06-07 02:00:04 -04:00
bunnei c153e1a326 Merge pull request #542 from bunnei/bfe_imm
gl_shader_decompiler: Implement BFE_IMM instruction.
2018-06-07 01:49:45 -04:00
bunnei 3a347d9be8 Merge pull request #541 from Subv/blittextures
GLCache: Fixed copying compressed textures in the rasterizer cache.
2018-06-07 01:35:01 -04:00
bunnei 221a29f0fd gl_shader_decompiler: Implement BFE_IMM instruction. 2018-06-07 00:58:12 -04:00
Subv f5ef6f5e8e GLCache: Use the full uncompressed size when blitting from one texture to another.
This avoids the problem of only copying a tiny piece of the textures when they are compressed.
2018-06-06 23:26:36 -05:00
Subv 6c016a6844 GLCache: Simplify the logic to copy from one texture to another in BlitTextures.
We now use glCopyImageSubData, this should avoid errors with trying to attach a compressed texture as a framebuffer's color attachment and then blitting to it.

Maybe in the future we can change this to glCopyTextureSubImage which only requires GL_ARB_direct_state_access.
2018-06-06 23:25:24 -05:00
bunnei 80cdb05930 Merge pull request #539 from bunnei/f2f-rounding
gl_shader_decompiler: F2F: Implement rounding modes.
2018-06-07 00:10:09 -04:00
bunnei dc43864d0a Merge pull request #503 from mailwl/nfp-stubs
Service/nfp:user : stub some functions.
2018-06-06 22:36:53 -04:00
bunnei 1586ee87ae gl_shader_decompiler: F2F: Implement rounding modes. 2018-06-06 22:21:29 -04:00
bunnei 738888debe Merge pull request #537 from bunnei/misc-shader
gl_shader_decompiler: Additional decodings, remove unused stuff from TEX
2018-06-06 21:44:37 -04:00
bunnei b315b20e8d Merge pull request #535 from Subv/gpu_swizzle
GPU: Support changing the texture swizzles for Maxwell textures.
2018-06-06 21:39:47 -04:00
bunnei ec2cad04ef gl_shader_decompiler: Remove some attribute stuff that has nothing to do with TEX/TEXS. 2018-06-06 19:47:41 -04:00
bunnei 8160467a6d shader_bytecode: Add instruction decodings for BFE, IMNMX, and XMAD. 2018-06-06 19:47:34 -04:00
bunnei 16f739f695 gl_shader_decompiler: Implement ISETP_IMM instruction. 2018-06-06 19:45:58 -04:00
Subv d97b2711ac GPU: Support changing the texture swizzles for Maxwell textures. 2018-06-06 18:36:15 -05:00
Subv 23f87f342b GLState: Support changing the GL_TEXTURE_SWIZZLE parameter of each texture unit. 2018-06-06 18:36:13 -05:00
bunnei 1a47f755f3 Merge pull request #534 from Subv/multitexturing
GPU: Implement sampling multiple textures in the generated glsl shaders.
2018-06-06 19:12:52 -04:00
bunnei 8ff7558d0c gl_shader_decompiler: Implement LD_C instruction. 2018-06-06 18:09:06 -04:00
bunnei 802a4febed gl_shader_gen: Add uniform handling for indirect const buffer access. 2018-06-06 18:09:05 -04:00
bunnei dbdf703c20 gl_shader_decompiler: Refactor uniform handling to allow different decodings. 2018-06-06 17:57:15 -04:00
Subv 411f04b5a4 GPU: Implement sampling multiple textures in the generated glsl shaders.
All tested games that use a single texture show no regression.

Only Texture2D textures are supported right now, each shader gets its own "tex_fs/vs/gs" sampler array to maintain independent textures between shader stages, the textures themselves are reused if possible.
2018-06-06 12:58:16 -05:00
mailwl 829613e51c Stub IUser::AttachAvailabilityChangeEvent 2018-06-06 19:05:11 +03:00
greggameplayer 186abe2652 nvdrv/devices/nvidia_ctrl_gpu : add IoctlCommands with their params (#524)
* add IoctlCommands with their params in nvidia_ctrl_gpu.h

* add function related to the changes done previously

* fix clang-format

* delete trailing whitespace

* correct mistake
2018-06-06 08:31:17 -05:00
Sebastian Valle 9a03ab70a9 Merge pull request #529 from bunnei/am-nifm-stubs
Stub SetConnectionConfirmationOption, GetPseudoDeviceId
2018-06-06 08:29:12 -05:00
Sebastian Valle 6dccfac7ff Merge pull request #531 from bunnei/fix-shl
gl_shader_decompiler: Fix un/signed mismatch with SHL.
2018-06-06 08:28:42 -05:00
Sebastian Valle 820cd30074 Merge pull request #530 from bunnei/wrap-mirror
maxwell_to_gl: Implement WrapMode Mirror.
2018-06-06 08:28:27 -05:00
mailwl 9071812e94 Remove unused header files 2018-06-06 09:10:48 +03:00
bunnei ed2198bec9 Merge pull request #527 from Subv/rgba32f_texcopy
GPU: Allow the usage of RGBA32_FLOAT and RGBA16_FLOAT in the texture copy engine.
2018-06-06 00:24:13 -04:00
bunnei 98df70ed5f Merge pull request #528 from Subv/rg11b10f
GPU: Implemented the R11FG11FB10F texture and rendertarget formats.
2018-06-06 00:22:54 -04:00
Hedges 6c4b650ae7 GDB Stub Improvements (#508)
* GDB Stub should work now.

* Applied clang-format.

* Replaced htonll with swap64.

* Tidy up.
2018-06-06 00:20:47 -04:00
bunnei 3ab3dd166a gl_shader_decompiler: Fix un/signed mismatch with SHL. 2018-06-05 23:58:06 -04:00
bunnei 0f76311842 maxwell_to_gl: Implement WrapMode Mirror. 2018-06-05 23:56:45 -04:00
bunnei abad9d77d7 nifm: Stub out IRequest::SetConnectionConfirmationOption. 2018-06-05 23:54:13 -04:00
bunnei d240fb32da am: Stub out IApplicationFunctions::GetPseudoDeviceId. 2018-06-05 23:54:02 -04:00
Subv d91fc15ea4 GPU: Allow the usage of RGBA16_FLOAT in the texture copy engine. 2018-06-05 22:01:20 -05:00
Subv 1ab5441d54 GPU: Implemented the R11FG11FB10F texture and rendertarget formats. 2018-06-05 21:57:16 -05:00
Subv 484b63fe34 GPU: Fixed the compression factor for RGBA16F textures.
They're not compressed.
2018-06-05 21:55:17 -05:00
Subv f13edfd80b GPU: Allow the usage of RGBA32_FLOAT in the texture copy engine. 2018-06-05 21:07:40 -05:00
bunnei ddee657fc4 Merge pull request #516 from Subv/f2i_r
GPU: Implemented the F2I_R shader instruction.
2018-06-05 22:01:29 -04:00
bunnei f7e6573241 Merge pull request #521 from Subv/bra
GPU: Corrected the branch targets for the shader bra instruction.
2018-06-05 10:09:35 -04:00
bunnei 4ec9f8d6ae Merge pull request #520 from bunnei/shader-shl
gl_shader_decompiler: Implement SHL instruction.
2018-06-05 10:08:42 -04:00
mailwl 2870d37714 Small fixes 2018-06-05 15:34:01 +03:00
mailwl 7dee92618f Service/MM: add service and stub some functions 2018-06-05 12:19:29 +03:00
Subv 18d020ae81 GPU: Corrected the branch targets for the shader bra instruction. 2018-06-04 22:56:28 -05:00
Subv 1476b79308 GPU: Implemented the F2I_R shader instruction. 2018-06-04 22:06:50 -05:00
bunnei fdb75599cc Merge pull request #518 from Subv/incomplete_shaders
GPU: Implemented predicated exit instructions in the shader programs.
2018-06-04 22:43:46 -04:00
bunnei 732dd3fa03 gl_shader_decompiler: Fix typo with ISCADD instruction. 2018-06-04 22:41:10 -04:00
bunnei 3ffb26b0a6 gl_shader_decompiler: Implement SHL instruction. 2018-06-04 22:36:49 -04:00
bunnei d9b029ff99 gl_shader_decompiler: Implement PredCondition::NotEqual. 2018-06-04 22:00:47 -04:00
Subv 368be6ae32 GPU: Implement the ISCADD shader instructions. 2018-06-04 20:17:41 -05:00
Subv 4e153d2bd6 GPU: Added decodings for the ISCADD instructions. 2018-06-04 20:17:39 -05:00
bunnei 2321fe4ec7 Merge pull request #514 from Subv/lop32i
GPU: Implemented the LOP32I instruction.
2018-06-04 20:48:15 -04:00
bunnei 6dd400647a Merge pull request #510 from Subv/isetp
GPU: Implemented the ISETP_R and ISETP_C instructions
2018-06-04 20:47:11 -04:00
Subv aa486a9eb2 GPU: Implement predicated exit instructions in the shader programs. 2018-06-04 19:18:11 -05:00
Subv 9e1ef025cb GPU: Take into account predicated exits when performing shader control flow analysis. 2018-06-04 19:14:23 -05:00
bunnei 8279e1205d Merge pull request #512 from Subv/fset
GPU: Corrected the FSET and I2F instructions.
2018-06-04 19:04:20 -04:00
bunnei 71bbea4a0d Merge pull request #501 from Subv/shader_bra
GPU: Partially implemented the bra shader instruction
2018-06-04 18:31:07 -04:00
bunnei c26ae19983 Merge pull request #515 from Subv/viewport_fix
GPU: Calculate the correct viewport dimensions based on the scale and translate registers.
2018-06-04 18:11:36 -04:00
Subv 3e3e3274c7 GPU: Use the bf bit in FSET to determine whether to write 0xFFFFFFFF or 1.0f. 2018-06-04 16:41:28 -05:00
Subv 45a000239d GPU: Corrected the I2F_R implementation. 2018-06-04 16:41:27 -05:00
Subv a58a06a218 GPU: Calculate the correct viewport dimensions based on the scale and translate registers.
This is how nouveau calculates the viewport width and height. For some reason some games set 0xFFFF in the VIEWPORT_HORIZ and VIEWPORT_VERT registers, maybe those are a misnomer and actually refer to something else?
2018-06-04 16:36:54 -05:00
bunnei f1ddf6c1ee Merge pull request #490 from BreadFish64/extension-check
Add checks for OpenGL extension support
2018-06-04 16:13:55 -04:00
bunnei 460a2abe70 Merge pull request #513 from Subv/cache_alignment
GLCache: Corrected a mismatch between storing compressed sizes and verifying the uncompressed alignment in GetSurface.
2018-06-04 16:12:55 -04:00
greggameplayer 2de6a09da6 Nvdrv/devices/nvhost_gpu : Add some IoctlCommands with their params (#511)
* Add some IoctlCommand with their params to nvhost_gpu

* fix clang-format

* delete trailing whitespace

* fix some clang-format

* delete one other trailing whitespace

* last clang-format fix
2018-06-04 16:12:02 -04:00
Subv 7caec68586 GPU: Implemented the LOP32I instruction. 2018-06-04 13:56:31 -05:00
Subv a2117df8e6 GLCache: Corrected a mismatch between storing compressed sizes and verifying the uncompressed alignment in GetSurface. 2018-06-04 13:01:53 -05:00
BreadFish64 8a956adf8c sdl: add check for GL extension support 2018-06-04 12:26:41 -05:00
BreadFish64 a7e6cadc81 qt: add check for GL extension support 2018-06-04 12:26:30 -05:00
Subv 0e337430f5 GPU: Use explicit types when retrieving the uniform values for fsetp/fset and isetp instead of the type of an invalid output register. 2018-06-04 11:22:26 -05:00
Subv c330734536 GPU: Implemented the ISETP_R and ISETP_C shader instructions. 2018-06-04 11:12:03 -05:00
mailwl 0e922be408 Correct function results 2018-06-04 14:43:02 +03:00
mailwl 18798ad061 Service/nfp:user : stub some functions.
Used by Zelda: BoTW
2018-06-04 12:39:43 +03:00
bunnei b9e0c0495a am: Implement ILibraryAppletAccessor::PopOutData. 2018-06-03 23:44:23 -04:00
bunnei 6c8ab7e431 am: ISelfController:LaunchableEvent should be sticky. 2018-06-03 23:44:22 -04:00
bunnei 96b4c99a7a am: Stub out ILibraryAppletAccessor Start and GetResult methods. 2018-06-03 23:44:22 -04:00
bunnei 8691aa8cd7 Merge pull request #499 from bunnei/am-stuff
am: Implement CreateStorage, PushInData, etc.
2018-06-03 23:43:52 -04:00
Subv 54a12f1b84 GPU: Partially implemented the shader BRA instruction. 2018-06-03 22:26:36 -05:00
Subv d75c79b61a GPU: Added decoding for the BRA instruction. 2018-06-03 22:14:00 -05:00
bunnei 129f945c77 am: Implement ILibraryAppletAccessor::PushInData. 2018-06-03 22:10:06 -04:00
bunnei 43ce8b93f0 am: Implement IStorageAccessor::Write. 2018-06-03 22:10:06 -04:00
bunnei d29b7b48eb am: Cleanup IStorageAccessor::Read. 2018-06-03 22:10:06 -04:00
bunnei 1597b12861 am: Implement ILibraryAppletCreator::CreateStorage. 2018-06-03 22:10:05 -04:00
bunnei d7b6e69400 Merge pull request #500 from Subv/long_queries
GPU: Partial implementation of long GPU queries.
2018-06-03 21:24:50 -04:00
Subv 315e5e6cf3 GPU: Partial implementation of long GPU queries.
Long queries write a 128-bit result value to memory, which consists of a 64 bit query value and a 64 bit timestamp.

In this implementation, only select=Zero of the Crop unit is implemented, this writes the query sequence as a 64 bit value, and a 0u64 value for the timestamp, since we emulate an infinitely fast GPU.

This specific type was hwtested, but more rigorous tests should be performed in the future for the other types.
2018-06-03 19:17:31 -05:00
bunnei 94b620a89e gl_shader_decompiler: Implement TEXS component mask. 2018-06-03 12:08:17 -04:00
bunnei 2ceba3716b Merge pull request #494 from bunnei/shader-tex
gl_shader_decompiler: Implement TEX, fixes for TEXS.
2018-06-03 12:05:38 -04:00
bunnei 6edd4ebde8 Merge pull request #495 from bunnei/improve-rro
gl_shader_decompiler: Implement RRO as a register move.
2018-06-03 12:05:26 -04:00
bunnei a5360ee1b9 Merge pull request #484 from mailwl/nvhost-nvdec
Services/nvdrv: add '/dev/nvhost-nvdec' device
2018-06-03 11:18:00 -04:00
bunnei d673e26129 Merge pull request #496 from Subv/waitprocesswidekey_timeout
Kernel/Threads: A thread waking up by timeout from a WaitProcessWideKey may already have an assigned lock owner.
2018-06-03 11:15:49 -04:00
bunnei 76da1f526a gl_shader_decompiler: Implement RRO as a register move. 2018-06-03 11:14:31 -04:00
Subv dd9a1fd943 Kernel/Threads: A thread waking up by timeout from a WaitProcessWideKey may already have an assigned lock owner.
This situation may happen like so:
Thread 1 with low priority calls WaitProcessWideKey with timeout.
Thread 2 with high priority calls WaitProcessWideKey without timeout.
Thread 3 calls SignalProcessWideKey
- Thread 2 acquires the lock and awakens.
- Thread 1 can't acquire the lock and is put to sleep with the lock owner being Thread 2.
Thread 1's timeout expires, with the lock owner still being set to Thread 2.
2018-06-02 14:06:35 -05:00
Subv c00fc04a65 GPU: Implemented the DXN1 (BC4) texture format. 2018-06-02 13:17:09 -05:00
mailwl caf7d55de4 Service/time: implement posix time to calendar conversion 2018-06-01 09:40:28 +03:00
bunnei 20fa6379f6 gl_shader_decompiler: Implement TEX instruction. 2018-05-31 23:36:45 -04:00
bunnei fc2f5b93c3 gl_shader_decompiler: Support multi-destination for TEXS. 2018-05-31 22:57:32 -04:00
bunnei baf0b86ac3 Merge pull request #488 from Subv/thread_masks
Kernel/SVC: Corrected the behavior of svcSetThreadCoreMask for core values -2 and -3.
2018-05-31 18:22:18 -04:00
bunnei a8c1e58d23 gl_rasterizer_cache: Assert that component type is UNorm or format is RGBA16F. 2018-05-30 22:50:41 -04:00
Subv 2a690458b5 Kernel/Thread: Corrected a typo that caused the affinity mask to never be changed. 2018-05-30 21:36:29 -05:00
Subv 40c82fc9c5 Kernel/SVC: Support special core values -2 and -3 in svcSetThreadCoreMask.
Also added some proper error handling.
2018-05-30 21:36:29 -05:00
bunnei 995f57bbc1 gl_rasterizer_cache: Implement PixelFormat RGBA16F. 2018-05-30 22:24:07 -04:00
bunnei 4b027ee9f3 Merge pull request #489 from Subv/vertexid
Shaders: Implemented reading the gl_InstanceID and gl_VertexID variables in the vertex shader.
2018-05-30 14:10:48 -04:00
greggameplayer 339fd812b3 add IPC CommandType & Some HID FunctionInfo (#487)
* add some CommandType

* add some hid FunctionInfo

* add some other HID FunctionInfo

* delete non useful comments
2018-05-30 14:09:21 -04:00
Subv bcae826522 Kernel/Thread: Corrected a typo in an assert about the processor id. 2018-05-30 11:32:46 -05:00
Subv 455e14b8e3 Shaders: Implemented reading the gl_InstanceID and gl_VertexID variables in the vertex shader. 2018-05-30 10:58:03 -05:00
Sebastian Valle 016195f9a8 Merge pull request #483 from bunnei/sonic
Several GPU fixes to boot Sonic Mania
2018-05-30 07:31:46 -05:00
mailwl c333f12eae Services/nvdrv: add '/dev/nvhost-nvdec' device 2018-05-30 12:49:28 +03:00
bunnei c99c03fe38 gl_shader_decompiler: F2F_R instruction: Implement abs. 2018-05-29 23:52:54 -04:00
bunnei ed61b578d9 gl_shader_decompiler: Partially implement F2F_R instruction. 2018-05-29 23:10:44 -04:00
Subv 9631ae2fa4 GPU: Implemented the R8 texture format (0x1D) 2018-05-29 21:49:37 -05:00
bunnei 16a06abf97 nvhost_ctrl: Stub out IocCtrlEventRegister. 2018-05-29 22:39:31 -04:00
bunnei fb8aa21fa5 nvhost_ctrl: Stub out IocCtrlEventWaitAsyncCommand. 2018-05-29 22:35:41 -04:00
bunnei 29c345982a gl_rasterize_cache: Invert order of tex format RGB565. 2018-05-29 22:16:18 -04:00
bunnei 873a266a3d Merge pull request #480 from mailwl/bcat
Service/BCAT: add module and services
2018-05-29 19:45:23 -04:00
greggameplayer 4786f69570 add all the known TextureFormat (#474) 2018-05-28 19:26:17 -04:00
mailwl 3c612dea08 Service/BCAT: add module and services 2018-05-28 16:46:56 +03:00
bunnei 5653710cf8 Merge pull request #472 from bunnei/greater-equal
gl_shader_decompiler: Implement GetPredicateComparison GreaterEqual.
2018-05-27 12:14:30 -04:00
bunnei d24bc4edf8 Merge pull request #476 from Subv/a1bgr5
GPU: Implemented the A1B5G5R5 texture format (0x14)
2018-05-27 12:14:08 -04:00
bunnei 03938c6ea5 Merge pull request #475 from ogniK5377/nvos-getconfig
NvOsGetConfigU32 should return null instead of 0 for default output value
2018-05-27 12:10:07 -04:00
bunnei 8dcf608429 Merge pull request #473 from bunnei/get-display-version
am: Stub IApplicationFunctions GetDisplayVersion.
2018-05-27 12:00:32 -04:00
Subv 110515404c GPU: Implemented the A1B5G5R5 texture format (0x14) 2018-05-27 09:02:05 -05:00
David Marcec 003023a669 NvOsGetConfigU32 should return null instead of 0 for default output 2018-05-26 17:48:09 -07:00
bunnei 678ff27162 am: Stub IApplicationFunctions GetDisplayVersion. 2018-05-26 00:21:59 -04:00
bunnei 7bbda2a975 gl_shader_decompiler: Implement GetPredicateComparison GreaterEqual. 2018-05-25 23:21:29 -04:00
bunnei 502fc1c4b3 shader_bytecode: Implement other variants of FMNMX. 2018-05-25 23:18:50 -04:00
greggameplayer 4201782cea Add & correct miscellaneous things (#470)
* add some InfoType

* correct OpenApplicationProxy cmd number

* add IDisplayController functions

* fix clang-format

* add more system languages
2018-05-25 22:31:54 -04:00
bunnei 7ed3f94905 Merge pull request #466 from mailwl/nv-timeout
Stub NVGPU_IOCTL_CHANNEL_SET_TIMEOUT
2018-05-25 22:31:06 -04:00
David a89f219336 GetAudioRendererWorkBufferSize impl (#465)
* GetAudioRendererWorkBufferSize impl

Impl of GetAudioRendererWorkBufferSize based on RE, if this can be cleaned up, please contribute!

* Naming conventions

* Removed unneeded placeholder

* lioncache changes

* fixed const

* switched to Common::AlignUp
2018-05-25 22:30:02 -04:00
bunnei 68fffea7d2 Merge pull request #468 from Subv/compound_preds
Shader: Implemented compound predicates in the fset and fsetp instructions
2018-05-25 22:28:47 -04:00
bunnei b5695873aa Merge pull request #469 from Subv/channel_rebind
GPU: Allow command lists to rebind a channel to another engine in the middle of the command list.
2018-05-25 22:27:58 -04:00
Subv 8131e8cc3a Shader: Implemented compound predicates in fset.
You can specify a predicate in the fset instruction:

Result = ((Value1 Comp Value2) OP P0) ? 1.0 : 0.0;
2018-05-24 17:39:59 -05:00
David 7787653dad Stubbed NVGPU_GPU_IOCTL_ZBC_SET_TABLE (#463)
We have no clue on what this actually does yet so stubbing it since it's just input only should be fine for now
2018-05-24 18:36:12 -04:00
Subv 91f05992e4 GPU: Allow command lists to rebind a channel to another engine in the middle of the command list. 2018-05-24 17:32:46 -05:00
Subv 216d47b066 Shader: Implemented compound predicates in fsetp.
You can specify three predicates in an fsetp instruction:

P1 = (Value1 Comp Value2) OP P0;
P2 = !(Value1 Comp Value2) OP P0;
2018-05-24 17:22:36 -05:00
mailwl 2fd168729a Stub NVGPU_IOCTL_CHANNEL_SET_TIMEOUT
Used in Nintendo Labo ToyCon 1&2
2018-05-24 16:49:34 +03:00
bunnei cd93d74b16 yuzu_cmd: Fix project for latest msvc. 2018-05-23 21:51:49 -04:00
David Marcec 8ba0ecb303 Fix deadlocks caused from HID having too many layouts
Games such as SMO deadlock if we have more than 2 layouts
2018-05-23 16:00:25 -07:00
bunnei 8247c92a8e Merge pull request #460 from greggameplayer/patch-6
Add & correct some error modules
2018-05-23 17:13:18 -04:00
bunnei b28cea1cae Merge pull request #459 from greggameplayer/patch-5
Add ioctl commands with their params and size check
2018-05-23 17:12:56 -04:00
bunnei 11597c4ab2 Merge pull request #454 from Subv/signal_processwide
Kernel/SVC: Signal the highest priority threads first in svcSignalProcessWideKey
2018-05-23 10:28:23 -04:00
greggameplayer 90fa34e30c Add & correct some error modules 2018-05-23 14:22:42 +02:00
greggameplayer bace166b2b change some functions
according to the changes made previously
2018-05-23 14:09:24 +02:00
greggameplayer 7f5e8a533a correct placement and add size check 2018-05-23 12:34:42 +02:00
greggameplayer c4f1216df1 Add ioctl commands with their params and size check 2018-05-23 12:32:37 +02:00
David ccfff97269 Implemented NVHOST_IOCTL_CHANNEL_GET_WAITBASE (#440)
* Implemented NVHOST_IOCTL_CHANNEL_GET_WAITBASE

struct + 4 seems to be hard coded at 0 and struct + 0 seems to be ignored?

* IocGetWaitbase -> IocChannelGetWaitbaseCommand

* Added super late fixes
2018-05-22 17:41:19 -04:00
bunnei c19f27c0c1 Merge pull request #456 from Subv/unmap_buffer
Implemented nvhost-as-gpu's UnmapBuffer and nvmap's Free ioctls.
2018-05-20 23:54:50 -04:00
greggameplayer f79c96c560 Correct audio command numbers & add or rename some functions (#455)
* Add unknown function at the number command 2

* correct audout:u commands numbers

* correct audrec:u cmd number & add Unknown function

* correct IAudioDevice command numbers

* correct codecctl cmd numbers & rename the 8 function

* correct place of unknown function & fix clang-format
2018-05-20 23:48:44 -04:00
bunnei 613a6d661e Merge pull request #457 from Subv/mutex_waiters
Mutex: Do not assert when the mutex waiting threads list isn't empty on mutex release.
2018-05-20 23:44:44 -04:00
bunnei 6a1c36f801 Merge pull request #458 from Subv/fmnmx
Shaders: Implemented the FMNMX shader instruction.
2018-05-20 23:44:07 -04:00
bunnei 3b6d2ee8fb Merge pull request #445 from greggameplayer/patch-2
Properly rename functions of Fatal Module & add ThrowFatal to this module
2018-05-20 23:42:57 -04:00
Sebastian Valle 3cad22b393 Merge pull request #453 from Subv/thread_callstack
Qt/WaitTree: Display the callstack for each thread in the wait tree widget
2018-05-20 20:01:08 -05:00
Sebastian Valle 0d17e04b24 Merge pull request #452 from Subv/psetp
ShadersDecompiler: Added decoding for the PSETP instruction.
2018-05-20 20:00:55 -05:00
Sebastian Valle 11b51bc488 Merge pull request #451 from Subv/gl_array_size
GLRenderer: Remove unused vertex buffer and increase the size of the stream buffer to 128 MB.
2018-05-20 20:00:40 -05:00
Subv 12d6b53e60 Shaders: Implemented the FMNMX shader instruction. 2018-05-20 17:53:06 -05:00
Subv fe463e2a1c Mutex: Do not assert when the mutex waiting threads list isn't empty on mutex release.
A thread may own multiple mutexes at the same time, and only release one of them while other threads are waiting for the other mutexes.
2018-05-20 14:41:58 -05:00
Subv 722736e4c9 GPU: Implemented the nvmap Free ioctl.
It releases a reference to an nvmap object
2018-05-20 14:25:57 -05:00
Subv 9abfc3df7b GPU: Implemented nvhost-as-gpu's UnmapBuffer ioctl.
It removes a mapping previously created with the MapBufferEx ioctl.
2018-05-20 14:25:56 -05:00
Sebastian Valle 3125d9c69f Merge pull request #450 from Subv/shader_link_error
GLRenderer: Log the shader source code when program linking fails.
2018-05-20 12:57:32 -05:00
Sebastian Valle a8f75a0224 Merge pull request #443 from ogniK5377/ipc-500
Added IPC RequestWithContext & ControlWithContext
2018-05-19 17:03:30 -05:00
greggameplayer c97505ad44 Add and correct some Error Modules (#444)
* Add and correct some Error Modules
2018-05-19 17:02:24 -05:00
Subv e3e8902d40 Kernel/SVC: Signal the highest priority threads first in svcSignalProcessWideKey. 2018-05-19 16:58:30 -05:00
Subv 8ce8160ce3 Kernel/Threads: Reschedule the proper core when operating on that core's threads. 2018-05-19 16:57:44 -05:00
Subv 8935ca8e11 SVC: Removed unused WaitSynchronization1 function 2018-05-19 16:56:33 -05:00
Subv 5647fa35ff Qt/WaitTree: Display the callstack for each thread in the wait tree widget. 2018-05-19 16:52:49 -05:00
Subv 062b1fb17c ShadersDecompiler: Added decoding for the PSETP instruction. 2018-05-19 11:41:14 -05:00
Subv 1a6aabdb1f GLRenderer: Remove unused hw_vao_enabled_attributes variable. 2018-05-19 11:36:38 -05:00
Subv 891762da58 GLRenderer: Remove unused vertex buffer and increase the size of the stream buffer to 128 MB.
The stream buffer is where all the vertex data is copied, some games require this to be much bigger than the 4 MB we used to have.
2018-05-19 11:36:09 -05:00
Subv fe167421d1 GLRenderer: Log the shader source code when program linking fails. 2018-05-19 11:19:34 -05:00
greggameplayer 357c048a07 rename fatal:u functions & add ThrowFatal 2018-05-18 23:32:22 +02:00
greggameplayer 72725e1599 Properly update fatal.h void name 2018-05-18 23:30:56 +02:00
greggameplayer 63735e7339 Properly rename fatal module functions 2018-05-18 23:28:30 +02:00
David Marcec 75bd5bf8be Added RequestWithContext & ControlWithContext 2018-05-17 14:03:52 -07:00
Hexagon12 44797f150c Updated nfp with more service names 2018-05-13 13:08:58 +03:00
bunnei 60644b9655 Merge pull request #436 from bunnei/multi-core
Initial support for multi-core
2018-05-11 12:59:23 -04:00
David Marcec 3a41706e7f More accurate GetTPCMasks impl 2018-05-10 21:01:39 -07:00
bunnei 6136866f8e core: Add several missing docstrings. 2018-05-10 19:34:54 -04:00
bunnei ce7d89cb0e thread: Rename mask to affinity_masks. 2018-05-10 19:34:53 -04:00
bunnei 4b895995ab core: Run all CPU cores separately, even in single-thread mode. 2018-05-10 19:34:53 -04:00
bunnei d96be9b56b thread: Support core change on ResumeFromWait and improve ChangeCore. 2018-05-10 19:34:53 -04:00
bunnei eabfdfe4ec scheduler: Protect scheduling functions with a global mutex. 2018-05-10 19:34:52 -04:00
bunnei f006872017 wait_tree: Add ideal core and affinity mask. 2018-05-10 19:34:52 -04:00
bunnei 82bb8701ea thread: Initialize ideal_core and mask members. 2018-05-10 19:34:52 -04:00
bunnei 5a5850af69 threading: Reschedule only on cores that are necessary. 2018-05-10 19:34:52 -04:00
bunnei 9e559ceb09 svc: Implement GetThreadCoreMask and SetThreadCoreMask. 2018-05-10 19:34:51 -04:00
bunnei 922b5c326e thread: Implement ChangeCore function. 2018-05-10 19:34:50 -04:00
bunnei 7b6dd22605 svc: SignalProcessWideKey should apply to all cores. 2018-05-10 19:34:49 -04:00
bunnei 6c4f161ba2 svc: Implement GetCurrentProcessorNumber. 2018-05-10 19:34:49 -04:00
bunnei 26a22031aa wait_tree: Show all threads on all schedulers. 2018-05-10 19:34:48 -04:00
bunnei bbd273e7ce core: Add a configuration setting for use_multi_core. 2018-05-10 19:34:47 -04:00
bunnei 6eacbd693d core: Support session close with multicore. 2018-05-10 19:34:47 -04:00
bunnei 44c565aeca core: Implement multicore support. 2018-05-10 19:34:46 -04:00
bunnei fc8b0d9d2b core: Create a thread for each CPU core, keep in lock-step with a barrier. 2018-05-10 19:34:46 -04:00
bunnei 0867e78c8a core: Move common CPU core things to its own class. 2018-05-10 19:34:46 -04:00
Hexagon12 e37fc58ae6 Stubs for QLaunch (#428)
* Stubs for QLaunch

* Wiped unrelated stuff

* Addressed comment

* Dropped GetPopFromGeneralChannelEvent
2018-05-07 11:27:30 -04:00
Max Thomas a12f45de82 hid: Tweaks, Analog Sticks (#435)
* hid: Update mouse/keyboard state

* hid: Working analog sticks

* hid: Nits

* hid: Nits

* hid: Update mystery sections

* hid: Tweaks
2018-05-07 11:06:02 -04:00
bunnei 77c9b241ce Merge pull request #434 from lioncash/vdtor
memory_hook: Default virtual destructor in the cpp file
2018-05-03 15:09:14 -04:00
Lioncash f9b42fa139 memory_hook: Default virtual destructor in the cpp file
Prevents creating multiple copies of the vtable in every translation unit that uses the class.
Also silences a -Wweak-vtables warning
2018-05-03 08:12:16 -04:00
Lioncash 2403aef8e9 core_timing: Don't include the log header in core timing's header
Avoids propagating logging macros and facilities to files that may not need them.
This also allows hiding an internal constant.
2018-05-03 08:00:15 -04:00
bunnei 618cce3172 Merge pull request #431 from lioncash/fmt
general: Make formatting of logged hex values more straightforward
2018-05-02 15:24:41 -04:00
bunnei 7d3a42dccd Merge pull request #430 from lioncash/vec
vector_math: Ensure members are always initialized
2018-05-02 09:55:32 -04:00
Lioncash 1b310cbb3a 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
bunnei 5e4d01f80c ipc: Add support for PopIpcInterface() method.
- This can be used for domain objects as inputs to service functions.
2018-05-01 21:57:44 -04:00
Lioncash 7bee2c9d13 vector_math: Ensure members are always initialized
Ensures that values are always in a well-defined state.
2018-05-01 21:25:25 -04:00
bunnei 6314eaaa8c Merge pull request #429 from Subv/ioctl_corruption
GPU: Don't write to invalid memory locations when handling ioctls that don't have an output.
2018-05-01 16:28:54 -04:00
David 3a3b58df8b GetSharedFontInOrderOfPriority (#381)
* GetSharedFontInOrderOfPriority

* Update pl_u.cpp

* Ability to use ReadBuffer and WriteBuffer with different buffer indexes, fixed up GetSharedFontInOrderOfPriority

* switched to NGLOG

* Update pl_u.cpp

* Update pl_u.cpp

* language_code is actually language code and not index

* u32->u64

* final cleanups
2018-05-01 16:28:36 -04:00
Subv a16f48e0d7 GPU: Don't write to invalid memory locations when handling ioctls that don't have an output. 2018-05-01 14:54:15 -05:00
Lioncash 3873211738 core_timing: Namespace all functions and constants in core_timing's header
All of these variables and functions are related to timings and should be within the namespace.
2018-04-30 03:32:59 -04:00
bunnei 2c2d114a15 Merge pull request #424 from lioncash/string
string_util: Remove StringFromFormat() and related functions
2018-04-29 21:49:13 -04:00
bunnei 37b67d8161 Merge pull request #422 from bunnei/shader-mov
Shader instructions MOV_C, MOV_R, and several minor GPU things
2018-04-29 21:47:42 -04:00
Lioncash d1e3e0eb42 string_util: Remove StringFromFormat() and related functions
Given we utilize fmt, we don't need to provide our own functions for formatting anymore
2018-04-29 18:52:33 -04:00
Lioncash 22b7e4fcf6 file_util: Make move constructor/assignment operator and related functions noexcept
Without this, it's possible to get compilation failures in the (rare) scenario where
a container is used to store a bunch of live IOFile instances, as they may be using
std::move_if_noexcept under the hood. Given these definitely don't throw exceptions
this is also not incorrect to add either.
2018-04-29 18:34:09 -04:00
Lioncash 1c77c732e6 file_util: Add static assertions to ReadBytes() and WriteBytes()
Ensure that the actual types being passed in are trivially copyable. The internal
call to ReadArray() and WriteArray() will always succeed, since they're passed a pointer to char*
which is always trivially copyable.
2018-04-29 18:24:12 -04:00
bunnei fc0fcbe9cc maxwell_3d: Reset vertex counts after drawing. 2018-04-29 16:23:31 -04:00
bunnei abb893aefe gl_shader_decompiler: Implement MOV_R. 2018-04-29 16:05:18 -04:00
bunnei d01e76720d maxwell_to_gl: Implement type SignedNorm, Size_8_8_8_8. 2018-04-29 16:05:17 -04:00
bunnei 1bd065fb8e shader_bytecode: Add decoding for FMNMX instruction. 2018-04-29 16:05:17 -04:00
Subv 87389ce295 Shaders: Implemented predicate condition 3 (LessEqual) in the fset and fsetp instructions. 2018-04-29 12:49:41 -05:00
bunnei 0ee1a0e698 gl_shader_decompiler: Implement MOV_C. 2018-04-29 13:13:13 -04:00
bunnei 91e7d1deb2 Merge pull request #416 from bunnei/shader-ints-p3
gl_shader_decompiler: Implement MOV32I, partially implement I2I, I2F
2018-04-29 12:56:16 -04:00
bunnei ef8fed3d3a Merge pull request #417 from bunnei/lang-codes
set/am: Fix code for getting language codes
2018-04-29 12:55:43 -04:00
bunnei 5f2d36726c am: Fix GetDesiredLanguage implementation. 2018-04-29 11:07:07 -04:00
bunnei dea2d271a9 set: Fix GetAvailableLanguageCodes implementation. 2018-04-29 11:07:06 -04:00
bunnei f2da134385 fermi_2d: Fix surface copy block height. 2018-04-28 20:40:03 -04:00
bunnei aaa3d91e7c gl_shader_decompiler: Partially implement I2I_R, and I2F_R. 2018-04-28 20:03:19 -04:00
bunnei 327e24bb8f gl_shader_decompiler: More cleanups, etc. with how we handle register types. 2018-04-28 20:03:19 -04:00
bunnei 543d4a680f GLSLRegister: Simplify register declarations, etc. 2018-04-28 20:03:19 -04:00
bunnei 8c6970d20d shader_bytecode: Add decodings for i2i instructions. 2018-04-28 20:03:18 -04:00
bunnei f252169fa6 gl_shader_decompiler: Implement MOV32_IMM instruction. 2018-04-28 20:03:18 -04:00
Lioncash 5155b90870 file_util: Remove compiler version checks around is_trivially_copyable()
The minimum clang/GCC versions we support already support this. We can also
remove is_standard_layout(), as fread and fwrite only require the type to be
trivially copyable.
2018-04-28 15:31:23 -04:00
Lioncash ea0bac3599 log: Remove old logging macros and functions
Now that the old macros are no longer used, we can remove all functionality related to them.
2018-04-27 16:18:34 -04:00
bunnei 87617c3eb8 Merge pull request #408 from bunnei/shader-ints-p2
gl_shader_decompiler: Add GLSLRegisterManager class to track register state.
2018-04-27 16:06:09 -04:00
Lioncash cfd0e7f2d9 renderer_opengl: Replace usages of LOG_GENERIC with fmt-capable equivalents 2018-04-27 12:09:35 -04:00
Lioncash 44d2f427d4 core: Replace usages of LOG_GENERIC with new fmt-capable equivalents 2018-04-27 11:57:52 -04:00
bunnei 2dbd239ed5 gl_shader_decompiler: Add GLSLRegisterManager class to track register state. 2018-04-27 11:49:26 -04:00
Lioncash 324ee31fc3 general: Convert assertion macros over to be fmt-compatible 2018-04-27 10:04:02 -04:00
bunnei 327fd2c31e Merge pull request #380 from ogniK5377/service-impl
Implemented some useful interfaces needed for games.
2018-04-27 00:49:40 -04:00
David Marcec 2810310018 Switched to NGLOG_WARNING 2018-04-26 20:03:12 -07:00
bunnei f838e665b8 Merge pull request #406 from lioncash/frontend
frontends: Move logging macros over to new fmt-capable ones
2018-04-26 22:53:42 -04:00
bunnei a5f551ff76 Merge pull request #407 from lioncash/common
common: Move logging macros over to new fmt-capable macros where applicable
2018-04-26 22:53:14 -04:00
Lioncash f4cc29c07c common: Move logging macros over to new fmt-capable macros where applicable 2018-04-26 20:09:58 -04:00
Lioncash ef3129bf7a frontends: Move logging macros over to new fmt-capable ones 2018-04-26 19:14:48 -04:00
Lioncash db4f7293fd input_common: Move old logging macros over to fmt-capable ones 2018-04-26 19:09:25 -04:00
bunnei dbf7f53899 Merge pull request #402 from lioncash/core
core: Replace remaining old non-generic logger usages with fmt-capable equivalents
2018-04-26 18:45:10 -04:00
bunnei 7fd3730e5a Merge pull request #399 from bunnei/shader-ints
Shader decompiler prep for integer instructions
2018-04-26 18:43:51 -04:00
David Marcec a210abc3c1 Merge branch 'master' of https://github.com/yuzu-emu/yuzu into service-impl 2018-04-26 14:28:54 -07:00
David Marcec 6f6cac9366 Added PREPO to logging backend, Removed comments from SaveReportWithUser 2018-04-26 14:19:34 -07:00
Lioncash 0a1e044322 core: Replace remaining old non-generic logger usages with fmt-capable equivalents
LOG_GENERIC usages will be amended in a follow-up to keep API changes separate from
interface changes, as it will require removing a parameter from the relevant function
in the VMManager class.
2018-04-26 15:37:16 -04:00
Lioncash 67e3bb3e87 common: Remove chunk_file.h and linear_disk_cache.h
These are unused (and given chunk_file references Dolphin's >SVN< I doubt they were going to be used).
2018-04-26 14:59:32 -04:00
bunnei 8e661859a8 gl_shader_decompiler: Boilerplate for handling integer instructions. 2018-04-26 14:38:42 -04:00
bunnei 02771faf4e gl_shader_decompiler: Move color output to EXIT instruction. 2018-04-26 14:38:41 -04:00
Lioncash 6d0f299ed9 core/gdbstub: Move logging macros to new fmt-compatible ones 2018-04-26 12:04:50 -04:00
Lioncash ca674a999b core/hw: Move logging macros over to fmt-capable ones 2018-04-26 09:32:45 -04:00
bunnei 3de43829ee Merge pull request #396 from Subv/shader_ops
Shaders: Implemented the FSET instruction.
2018-04-25 22:42:54 -04:00
bunnei 903505ed5f Merge pull request #398 from lioncash/kernel
kernel: Migrate logging macros to fmt-compatible ones
2018-04-25 22:42:34 -04:00
bunnei 9176319a5c Merge pull request #387 from Subv/maxwell_2d
GPU: Partially implemented the 2D surface copy engine
2018-04-25 20:40:17 -04:00
bunnei d64b6bca07 Merge pull request #395 from lioncash/file-sys
file-sys: Move logging macros over to the new fmt-capable ones
2018-04-25 20:39:08 -04:00
Lioncash 871e6c0041 kernel/shared_memory: Remove unnecessary semicolon at end of ConvertPermissions()
Functions don't need to be terminated by semicolons.
2018-04-25 20:32:16 -04:00
Lioncash bd9414dd31 kernel: Migrate logging macros to fmt-compatible ones 2018-04-25 20:32:09 -04:00
bunnei 50a4a480f0 Merge pull request #390 from mailwl/pctl-module
Service/PCTL: convert to module, add services, stub
2018-04-25 15:51:43 -04:00
bunnei baca4ecfa1 Merge pull request #397 from lioncash/core
core/memory: Move logging macros over to the new fmt-capable ones
2018-04-25 15:25:03 -04:00
Subv 0c04a308d1 GPU: Partially implemented the Fermi2D surface copy operation.
The hardware allows for some rather complicated operations to be performed on the data during the copy, this is not implemented.
Only same-format same-size raw copies are implemented for now.
2018-04-25 12:54:26 -05:00
Subv 1755d4bec3 Shaders: Added bit decodings for the I2I instruction. 2018-04-25 12:52:55 -05:00
Subv e02112db16 Shaders: Implemented the FSET instruction.
This instruction is similar to the FSETP instruction, but it doesn't set a predicate, it sets the destination register to 1.0 if the condition holds, and 0 otherwise.
2018-04-25 12:52:32 -05:00
Subv 6418127891 Memory: Added a missing shortcut for Memory::CopyBlock for the current process. 2018-04-25 11:55:30 -05:00
Subv 634620b502 GPU: Make the Textures::CopySwizzledData function accessible from the outside of the file. 2018-04-25 11:55:30 -05:00
Subv 284aad1420 GPU: Added a function to retrieve the bytes per pixel of the render target formats. 2018-04-25 11:55:29 -05:00
Subv bbb15541aa GPU: Added surface copy registers to Fermi2D 2018-04-25 11:55:29 -05:00
Subv b0b75e7ae4 GPU: Added boilerplate code for the Fermi2D engine 2018-04-25 11:55:29 -05:00
Subv 94d0d499c3 GPU: Reduce the number of registers of Maxwell3D to 0xE00.
The rest are just macro shim registers.
2018-04-25 11:55:28 -05:00
Subv 219b5d34e7 GPU: Move the Maxwell3D macro uploading code to the inside of the Maxwell3D processor.
It doesn't belong in the PFIFO handler.
2018-04-25 11:55:27 -05:00
Subv f42b93399f GPU: Corrected the upper bound of the PFIFO method ids in the command processor. 2018-04-25 11:53:54 -05:00
Lioncash 1cd301f2c0 file-sys: convert a StringFromFormat call into fmt::format in GetFullPath()
Lessens the amount to read and gets rid of the PRIX64 macro, allowing us to use a single string
for the whole path, making it easier to read.
2018-04-25 12:35:37 -04:00
Lioncash a1dc050bbf file-sys: Move logging macros over to the new fmt-capable ones 2018-04-25 12:35:33 -04:00
Lioncash 796b5c727d 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 62e427d98f 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
Lioncash f5bd2617a8 video-core: Move logging macros over to new fmt-capable ones 2018-04-25 09:13:57 -04:00
mailwl cf607e7fca Service/PCTL: convert to module, add services, stub
PCTL::CreateServiceWithoutInitialize and IParentalControlService::Initialize, required by Kirby Star Allies
2018-04-25 09:02:27 +03:00
Subv 74c89df1c8 Shaders: Added decodings for the FSET instructions. 2018-04-24 22:42:54 -05:00
bunnei 9add4dba81 Merge pull request #388 from bunnei/refactor-rasterizer-cache
Refactor rasterizer cache
2018-04-24 23:22:24 -04:00
bunnei bfb435c994 renderer_opengl: Use correct byte order for framebuffer pixel format ABGR8. 2018-04-24 22:31:46 -04:00
bunnei 1f14d07952 gl_rasterizer_cache: Use CHAR_BIT for bpp conversions instead of 8. 2018-04-24 22:31:46 -04:00
bunnei 931c447c84 gl_rasterizer_cache: Use GPU PAGE_BITS/SIZE, not CPU. 2018-04-24 22:31:46 -04:00
bunnei 4713ba7d9c gl_rasterizer_cache: Use new logger. 2018-04-24 22:31:46 -04:00
bunnei 197ea35d95 gl_rasterizer_cache: Add a function for finding framebuffer GPU address. 2018-04-24 22:31:46 -04:00
bunnei 640c943d34 gl_rasterizer_cache: Handle compressed texture sizes. 2018-04-24 22:31:46 -04:00
bunnei 31748079de gl_rasterizer_cache: Update to be based on GPU addresses, not CPU addresses. 2018-04-24 22:31:45 -04:00
Lioncash ff63e4d3fc loader: Move old logging macros over to new fmt-capable ones 2018-04-24 20:22:32 -04:00
bunnei 995cbfc15f memory_manager: Add implement CpuToGpuAddress. 2018-04-24 17:49:20 -04:00
bunnei b6bed8fd74 memory_manager: Make GpuToCpuAddress return an optional. 2018-04-24 17:49:19 -04:00
bunnei ebef12f037 memory_manager: Use GPUVAdddr, not PAddr, for GPU addresses. 2018-04-24 17:40:43 -04:00
bunnei dcd72b36ca Merge pull request #386 from Subv/gpu_query
GPU: Added asserts to our code for handling the QUERY_GET GPU command.
2018-04-24 16:13:51 -04:00
bunnei 2dd49a5bb2 Merge pull request #392 from lioncash/log
service: Move logging macros over to the new fmt-compatible ones
2018-04-24 14:13:54 -04:00
Lioncash b736a731c0 service: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:32 -04:00
Lioncash 448c7ad796 vi: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:31 -04:00
Lioncash 7505ea2612 time: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:31 -04:00
Lioncash 5077580ee7 ssl: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:31 -04:00
Lioncash 418cb174a9 spl: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:31 -04:00
Lioncash e70f5cb603 sockets: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:31 -04:00
Lioncash 3cac963a7d sm: Move logging macros over to new fmt-compatible ones 2018-04-24 12:01:31 -04:00