Commit Graph

12764 Commits

Author SHA1 Message Date
Mat M cb5b8ca886
Merge pull request #3733 from ambasta/patch-2
Initialize quad_indexed_pass before uint8_pass
2020-04-20 20:36:46 -04:00
bunnei 9c12aef2f8 loader: nro: Fix process initialization using ProgramMetadata default. 2020-04-20 18:19:45 -04:00
bunnei 68039addbc loader: elf: Fix process initialization using ProgramMetadata default. 2020-04-20 18:19:45 -04:00
bunnei f0a7f05070 file_sys: program_metadata: Add a helper function for generating reasonable default metadata.
- We need this for homebrew process initialization.
2020-04-20 18:19:45 -04:00
Lioncash 99eaa2e6f2 service: Update function tables
Keeps the service function tables up to date.

Updated based off information on SwitchBrew.
2020-04-20 15:53:49 -04:00
Mat M 200f69d2ff
Merge pull request #3739 from MerryMage/disable_cpu_opt
dynarmic: Add option to disable CPU JIT optimizations
2020-04-20 14:19:18 -04:00
FearlessTobi 4e99a06c70 npad: Lower log level for VibrateController to Debug 2020-04-20 18:44:57 +02:00
FearlessTobi 6ce0f3575a audren: Lower log level for RequestUpdateImpl to Debug 2020-04-20 18:44:41 +02:00
Fernando Sahmkow ec2f8f4272
Merge pull request #3700 from ReinUsesLisp/stream-buffer-sizes
vk_stream_buffer: Fix out of memory on boot on recent Nvidia drivers
2020-04-20 09:37:42 -04:00
MerryMage a3a12deecc dynarmic: Add option to disable CPU JIT optimizations 2020-04-20 13:36:26 +01:00
bunnei 6de36f0b61
Merge pull request #3712 from lioncash/remove
service: Remove unused RequestParser instances
2020-04-20 01:04:04 -04:00
bunnei e3977243e2
Merge pull request #3709 from lioncash/am
am: Resolve ineffective moves
2020-04-20 00:15:00 -04:00
Amit Prakash Ambasta 5324b1d01e
Initialize quad_indexed_pass before uint8_pass
Fixes Werror=reorder in gcc
2020-04-20 04:53:52 +05:30
Rodrigo Locatti 4932010c6f
Merge pull request #3729 from lioncash/globals
dma_pusher: Remove reliance on the global system instance
2020-04-19 19:12:40 -03:00
bunnei 85c17a2c35
Merge pull request #3694 from ReinUsesLisp/indexed-quads
vk_compute_pass: Implement indexed quads
2020-04-19 16:52:40 -04:00
Lioncash bfee33cce3 service/time: Remove reliance on the global system accessor
Eliminates usages of the global system accessor and instead passes the
existing system instance into the interfaces.
2020-04-19 16:31:28 -04:00
Lioncash 44e959157b dma_pusher: Remove reliance on the global system instance
With this, the video core is now has no calls to the global system
instance at all.
2020-04-19 16:12:08 -04:00
bunnei 2ea7a70da0
Merge pull request #3686 from lioncash/table
texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indices
2020-04-19 15:33:33 -04:00
bunnei 10fb26f69c
Merge pull request #3696 from lioncash/cast-size
hle_ipc: Remove std::size_t casts where applicable
2020-04-19 14:24:15 -04:00
MerryMage 2bfac7b61d thread: FPCR.FZ is likely not 1 2020-04-19 08:37:20 +01:00
bunnei 779a3b222a
Merge pull request #3655 from FearlessTobi/ui-retext-yuzu
yuzu/main: Add better popup texts and remove duplicated actions
2020-04-19 02:16:50 -04:00
bunnei 73db83c0ab
Merge pull request #3679 from lioncash/track
track: Eliminate redundant copies
2020-04-19 01:22:47 -04:00
bunnei 74c27fd1b5 core: arm_unicorn: Fix interpret fallback by temporarily mapping instruction page. 2020-04-19 00:53:23 -04:00
Jan Beich afcc84a172 renderer_vulkan: assume X11 if not Windows/macOS after bf1d66b7c0
Render.Vulkan <Error> video_core/renderer_vulkan/renderer_vulkan.cpp:CreateInstance:131: Presentation not supported on this platform
Render.Vulkan <Error> video_core/renderer_vulkan/renderer_vulkan.cpp:CreateSurface:378: Presentation not supported on this platform
Core <Critical> core/core.cpp:Load:199: Failed to initialize system (Error 5)!
2020-04-19 00:32:23 +00:00
ReinUsesLisp c81bf06d03 vulkan/wrapper: Sort physical devices
Sort discrete GPUs over the rest, Nvidia over AMD, AMD over Intel, Intel
over the rest. This gives us a somewhat consistent order when Optimus
is removed (renderdoc does this when it's attached).

This can break the configuration of users with an Intel GPU that
manually remove Optimus on yuzu. That said, it's a very unlikely to
happen.
2020-04-18 21:31:15 -03:00
ReinUsesLisp d62f57cf5a fixed_pipeline_state: Hash and compare the whole structure
Pad FixedPipelineState's size to 384 bytes to be a multiple of 16.

Compare the whole struct with std::memcmp and hash with CityHash. Using
CityHash instead of a naive hash should reduce the number of collisions.
Improve used type traits to ensure this operation is safe.

With these changes the improvements to the hashable pipeline state are:

Optimized structure
Hash:            89 ns
Comparison:     103 ns
Construction*:  164 ns
Struct size:    384 bytes

Original structure
Hash:           148 ns
Equal:          174 ns
Construction*:  281 ns
Size:          1384 bytes

* Attribute state initialization is not measured

These measures are averages taken with std::chrono::high_accuracy_clock
on MSVC shipped on Visual Studio 16.6.0 Preview 2.1.
2020-04-18 19:57:26 -03:00
ReinUsesLisp b571c92dfd fixed_pipeline_state: Pack blending state
Reduce FixedPipelineState's size to 364 bytes.
2020-04-18 19:23:35 -03:00
ReinUsesLisp 548dd27f45 fixed_pipeline_state: Pack rasterizer state
Reduce FixedPipelineState's size to 600 bytes.
2020-04-18 19:22:57 -03:00
ReinUsesLisp 7790144a55 fixed_pipeline_state: Pack depth stencil state
Reduce FixedPipelineState's size to 632 bytes.
2020-04-18 19:22:11 -03:00
ReinUsesLisp ab6704f20c fixed_pipeline_state: Pack attribute state
Reduce FixedPipelineState's size from 1384 to 664 bytes
2020-04-18 19:21:19 -03:00
Mat M 5305806071
Merge pull request #3716 from bunnei/fix-another-impl-fallthrough
video_core: gl_shader_decompiler: Fix implicit fallthrough errors.
2020-04-18 15:17:52 -04:00
bunnei 03726fb7f5 video_core: gl_shader_decompiler: Fix implicit fallthrough errors. 2020-04-18 15:15:21 -04:00
bunnei 89e512ca8d
Merge pull request #3710 from lioncash/nso
loader/nso: Resolve moves not occurring in DecompressSegment
2020-04-18 14:44:42 -04:00
Mat M 45964e6fec
Merge pull request #3715 from bunnei/fix-impl-fallthrough
service: hid: npad: Fix implicit fallthrough errors.
2020-04-18 14:44:20 -04:00
bunnei a8d5d08e2e service: hid: npad: Fix implicit fallthrough errors. 2020-04-18 14:41:08 -04:00
bunnei 907ba8794e
Merge pull request #3713 from lioncash/time
service/time: Minor changes
2020-04-17 21:04:43 -04:00
bunnei 90ddb13372
Merge pull request #3711 from lioncash/cast
memory/slab_heap: Make use of static_cast over reinterpret_cast
2020-04-17 21:04:11 -04:00
Lioncash bf328ed35a gl_shader_decompiler: Avoid copies where applicable
Avoids unnecessary reference count increments where applicable and also
avoids reallocating a vector.

Unlikely to make a huge difference, but given how trivial of an
amendment it is, why not?
2020-04-17 20:48:52 -04:00
Lioncash 7714b02d95 time/system_clock_core: Remove unnecessary initializer
This is already initialized within the class body.
2020-04-17 20:04:06 -04:00
Lioncash b533f18ab9 service/time: Mark IsStandardNetworkSystemClockAccuracySufficient as const
This doesn't modify internal member state.
2020-04-17 20:02:45 -04:00
Lioncash 0cfd3b94db service/time: Add virtual destructors where applicable
Many of these implementations are used to implement a polymorphic
interface. While not directly used polymorphically, this prevents
virtual destruction from ever becoming an issue.
2020-04-17 19:59:31 -04:00
Lioncash 4d8a8a8033 service: Remove unused RequestParser instances
These aren't used, so they should be removed to reduce compilation
warnings.
2020-04-17 19:47:43 -04:00
bunnei 7438d36d0e
Merge pull request #3630 from benru/open-windows-network-files
common/file_util: Allow access to files on network shares
2020-04-17 19:47:11 -04:00
Lioncash 7e585bce28 memory/slab_heap: Make use of static_cast over reinterpret_cast
Casting from void* with static_cast is permitted by the standard, so we
can just make use of that instead.
2020-04-17 19:38:59 -04:00
Lioncash 441a2812ed loader/nso: Resolve moves not occurring in DecompressSegment
Given the std::vector was const, an automatic move out of the function
could not occur.

We can allow automatic return value optimizations to occur by making the
buffer non-const.
2020-04-17 19:26:50 -04:00
Lioncash 64f226889c am: Resolve ineffective moves
Previously const objects were being std::moved, which results in no move
actually occurring. This resolves that.
2020-04-17 19:22:46 -04:00
Markus Wick 07fbef1776 video_code: Fix implicit switch fallthrough.
Since yesterday, this breaks the build on linux.
So let's fix it.
2020-04-17 23:43:35 +02:00
ReinUsesLisp a7b6bd56d7 vk_stream_buffer: Fix out of memory on boot on recent Nvidia drivers
Nvidia recently introduced a new memory type for data streaming
(awesome!), but yuzu was assuming that all heaps had enough memory
for the assumed stream buffer size (256 MiB).

This worked fine on AMD but Nvidia's new memory heap was smaller than
256 MiB. This commit changes this assumption and allocates a bit less
than the size of the preferred heap, with a maximum of 256 MiB (to avoid
allocating all system memory on integrated devices).

- Fixes a crash on NVIDIA 450.82.0.0
2020-04-17 18:12:48 -03:00
Fernando Sahmkow 2133482a17
Merge pull request #3703 from yuzu-emu/revert-3656-glsl-full-decompile
Revert "gl_shader_cache: Use CompileDepth::FullDecompile on GLSL"
2020-04-17 17:08:41 -04:00
Fernando Sahmkow 775ecc7d05
Merge pull request #3672 from lioncash/null
file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero
2020-04-17 17:02:35 -04:00
Rodrigo Locatti 990c0b184f
Revert "gl_shader_cache: Use CompileDepth::FullDecompile on GLSL" 2020-04-17 17:41:48 -03:00
bunnei b8f5c71f2d
Merge pull request #3666 from bunnei/new-vmm
Implement a new virtual memory manager
2020-04-17 16:33:08 -04:00
bunnei ca3af2961c
Merge pull request #3682 from lioncash/uam
gl_query_cache: Resolve use-after-move in CachedQuery move assignment operator
2020-04-17 01:24:08 -04:00
bunnei 8bbe74a8dc core: hle: Address various feedback & code cleanup.
- Should be no functional changes.
2020-04-17 00:59:36 -04:00
bunnei 92caa003a8 core: device_memory: Remove incorrect usage of constexpr. 2020-04-17 00:59:36 -04:00
bunnei 6f3266e98b memory: Add copyright notice for Atmosphere where applicable. 2020-04-17 00:59:35 -04:00
bunnei 02547a0cb4 kernel: Remove old VMManager class. 2020-04-17 00:59:35 -04:00
bunnei bebfb05c1b loader: nso: Fix loader size and arguments. 2020-04-17 00:59:35 -04:00
bunnei 83761d5316 loader: elf/kip/nro: Updates for new VMM. 2020-04-17 00:59:35 -04:00
bunnei 37b79ebe85 service: ldr: Updates for new VMM.
- Includes removing some service impls. that are untested.
2020-04-17 00:59:35 -04:00
bunnei a8292f6cd9 kernel: memory: page_table: Simplify GetPhysicalAddr impl. 2020-04-17 00:59:35 -04:00
bunnei c629e544a7 kernel: svc: Updates for new VMM.
- Includes removing some SVC impls. that are untested.
2020-04-17 00:59:34 -04:00
bunnei ff5d5b6f41 core: memory: Fix memory access on page boundaries.
- Fixes Super Smash Bros. Ultimate.
2020-04-17 00:59:34 -04:00
bunnei 32fc2aae3c video_core: memory_manager: Updates for Common::PageTable changes. 2020-04-17 00:59:34 -04:00
bunnei f7c03610e1 core: memory: Updates for new VMM. 2020-04-17 00:59:34 -04:00
bunnei 4c1812ae37 common: page_table: Update to use VirtualBuffer and simplify. 2020-04-17 00:59:34 -04:00
bunnei 1d5923e150 core: gdbstub: Updates for new VMM. 2020-04-17 00:59:34 -04:00
bunnei c7bc7986bb core: reporter: Updates for new VMM. 2020-04-17 00:59:33 -04:00
bunnei 18c4bb6f5c memory: cheat_engine: Updates for new VMM. 2020-04-17 00:59:33 -04:00
bunnei d95ceaa8ec arm_test_common: Updates for new VMM. 2020-04-17 00:59:33 -04:00
bunnei 108564df57 kernel: process: Updates for new VMM. 2020-04-17 00:59:33 -04:00
bunnei 77382ac2b2 service: pl_u: Update for new shared memory layout. 2020-04-17 00:59:33 -04:00
bunnei 67b3df683b service: time: Update for new shared memory layout. 2020-04-17 00:59:33 -04:00
bunnei 8eca0f9cd2 service: hid: Update for new shared memory layout. 2020-04-17 00:59:33 -04:00
bunnei 8bbc38a7bd service: irs: Update for new shared memory layout. 2020-04-17 00:59:32 -04:00
bunnei fc61cb44ee kernel: resource_limit: Reserve physical memory. 2020-04-17 00:59:32 -04:00
bunnei 8f75524e55 kernel: Initialize memory layout for new VMM. 2020-04-17 00:59:32 -04:00
bunnei 11c02a50e9 core: system: Rename GetDeviceManager -> DeviceManager.
- More consistent with other system components.
2020-04-17 00:59:32 -04:00
bunnei 3fcc4cab4f kernel: transfer_memory: Refactor for new VMM. 2020-04-17 00:59:32 -04:00
bunnei c53454ff46 core: Construct/Destruct DeviceMemory on Init/Shutdown. 2020-04-17 00:59:32 -04:00
bunnei d0162fc3d7 kernel: shared_memory: Refactor for new VMM. 2020-04-17 00:59:32 -04:00
bunnei a040a15246 core: device_memory: Update to use VirtualBuffer class. 2020-04-17 00:59:31 -04:00
bunnei 4ba2428c86 common: Add VirtualBuffer class, to abstract memory virtualization. 2020-04-17 00:59:31 -04:00
bunnei a238d08f71 kernel: errors: Add ERR_OUT_OF_RESOURCES. 2020-04-17 00:59:31 -04:00
bunnei ffc3de762b kernel: process_capability: Update to use Memory::PageTable. 2020-04-17 00:59:31 -04:00
bunnei 84f1b6d530 kernel: memory: Add PageTable class, to manage process address space. 2020-04-17 00:59:31 -04:00
bunnei cfae8a1c1a kernel: memory: Add MemoryLayout class, to build physical memory layout. 2020-04-17 00:59:31 -04:00
bunnei 5d6e8a5b44 kernel: memory: Add MemoryManager class, to manage page heaps. 2020-04-17 00:59:30 -04:00
bunnei 548ef190ab kernel: memory: Add MemoryBlockManager class, to manage memory blocks. 2020-04-17 00:59:30 -04:00
bunnei 3927012734 kernel: memory: Add PageHeap class, to manage a heap of pages. 2020-04-17 00:59:30 -04:00
bunnei dc720311cc kernel: memory: Add PageLinkedList class, to manage a list of pages. 2020-04-17 00:59:30 -04:00
bunnei 81cb4d3c7f kernel: memory: Add system_control code, which will be used for ASLR support. 2020-04-17 00:59:30 -04:00
bunnei fc040b5b70 physical_memory: Add missing include for <vector>. 2020-04-17 00:59:30 -04:00
bunnei c2f4dcb1e3 kernel: memory: Add MemoryBlock class, for managing memory blocks and their state. 2020-04-17 00:59:29 -04:00
bunnei ea5ee9918e kernel: memory: Add memory_types.h, for things that are commonly used in memory code. 2020-04-17 00:59:29 -04:00
bunnei d364e7cf09 kernel: memory: Add SlabHeap class, for managing memory heaps.
- This will be used for TLS pages, among other things.
2020-04-17 00:59:29 -04:00
bunnei 14aa65ce00 kernel: memory: Add AddressSpaceInfo class, for managing the memory address space. 2020-04-17 00:59:29 -04:00
bunnei dc25c86556 core: device_manager: Add a simple class to manage device RAM. 2020-04-17 00:59:29 -04:00
bunnei f1b607829e dynarmic: Enable strict alignment checks.
- Also add a missing include.
2020-04-17 00:59:29 -04:00
bunnei 4df6ef04ac common: scope_exit: Implement mechanism for canceling a scope exit. 2020-04-17 00:59:28 -04:00
bunnei 4caff51710 core: memory: Move to Core::Memory namespace.
- helpful to disambiguate Kernel::Memory namespace.
2020-04-17 00:59:28 -04:00
bunnei b838e58d63 common: alignment: Add a helper function for generic alignment checking. 2020-04-17 00:59:28 -04:00
bunnei ad48ebb2c8 core: kernel: Add svc_types header to include SVC-specific types. 2020-04-17 00:59:28 -04:00
bunnei 82d457af37 core: kernel: Move SVC to its own namesapce. 2020-04-17 00:59:28 -04:00
bunnei b0e3cbef7a kernel: resource_limit: Improvements to implementation. 2020-04-17 00:59:27 -04:00
bunnei 7aa0e4a7ca loader: nso: Fix loading of static objects to be properly sized and aligned. 2020-04-17 00:59:27 -04:00
bunnei b11b424a2d common: common_funcs: Add a macro for defining enum flag operators. 2020-04-17 00:59:27 -04:00
bunnei f2676efe23 process: SetupMainThread: Zero out argument on process start. 2020-04-17 00:11:50 -04:00
bunnei 0f4f90cd04 arm_interface: Ensure ThreadContext is zero'd out. 2020-04-17 00:11:50 -04:00
Lioncash dcbb39cdae CMakeLists: Make missing declarations a compile-time error
Ensures that our code always has its linkage explicit.
2020-04-16 23:43:41 -04:00
Lioncash e2d8be1ca2 General: Resolve warnings related to missing declarations 2020-04-16 23:43:34 -04:00
MerryMage 1cc9507bc5 gdbstub: Fix some gdbstub jankiness
1. Ensure that register information available to gdbstub is most up-to-date.
2. There's no reason to check for current_thread == thread when emitting a trap.
   Doing this results in random hangs whenever a step happens upon a thread switch.
2020-04-17 05:41:43 +02:00
bunnei 86f9c9aa1c
Merge pull request #3671 from lioncash/switch
kernel/thread: Resolve -Wswitch warnings
2020-04-16 23:30:32 -04:00
Lioncash 8f9c599c9f key_manager: Resolve missing field initializer warning 2020-04-16 22:45:44 -04:00
Lioncash 678ac54749 decode/memory: Resolve unused variable warning
Only the first element of the returned pair is ever used.
2020-04-16 22:45:44 -04:00
Lioncash d159643fd7 decode/texture: Resolve unused variable warnings.
Some variables aren't used, so we can remove these.

Unfortunately, diagnostics are still reported on structured bindings
even when annotated with [[maybe_unused]], so we need to unpack the
elements that we want to use manually.
2020-04-16 22:45:41 -04:00
Lioncash f522abd8ab decode/texture: Collapse loop down into std::generate
Same behavior, less code.
2020-04-16 22:29:07 -04:00
Lioncash 7e2d60de26 decode/texture: Eliminate trivial missing field initializer warnings
We can just specify the initializers.
2020-04-16 22:27:21 -04:00
Lioncash 337f2dc11f time_zone_manager: Resolve sign conversion warnings
ttis and ats will never exceed the length of INT32_MAX in our case, so
this is safe.
2020-04-16 22:23:59 -04:00
Lioncash fc5df84581 CMakeLists: Enable -Wmissing-declarations on Linux builds
Allows catching cases where internal linkage isn't specified for helper
functions when they should be marked as such.
2020-04-16 22:07:16 -04:00
Lioncash 77356731a9 hle_ipc: Remove std::size_t casts where applicable
These were added in the change that enabled -Wextra on linux builds so
as not to introduce interface changes in the same change as a
build-system flag addition.

Now that the flags are enabled, we can freely change the interface to
make these unnecessary.
2020-04-16 22:02:10 -04:00
bunnei 79c1269f0f
Merge pull request #3673 from lioncash/extra
CMakeLists: Specify -Wextra on linux builds
2020-04-16 21:12:33 -04:00
ReinUsesLisp 238c6016f9 maxwell_3d: Initialize format attributes constant as one
nouveau expects this to be true but it doesn't set it.
2020-04-16 21:15:07 -03:00
ReinUsesLisp c961770900 vk_compute_pass: Implement indexed quads
Implement indexed quads (GL_QUADS used with glDrawElements*) with a
compute pass conversion.

The compute shader converts from uint8/uint16/uint32 indices to uint32.
The format is passed through push constants to avoid having different
variants of the same shader.

- Used by Fast RMX
- Used by Xenoblade Chronicles 2 (it still has graphical due to
synchronization issues on Vulkan)
2020-04-16 21:12:32 -03:00
Fernando Sahmkow c81f256111
Merge pull request #3600 from ReinUsesLisp/no-pointer-buf-cache
buffer_cache: Return handles instead of pointer to handles
2020-04-16 19:58:13 -04:00
Markus Wick fedf750e1b externals: Move LibreSSL linking to httplib.
Neither core nor web_services use OpenSSL nor LibreSSL.
However they need to link them as it's a requirement of httplib.
So let's declare this within httplib instead of core and web_services.
2020-04-16 16:46:33 +02:00
Markus Wick 94c2c828a5 input_common: Use the CMake target instead of the variable. 2020-04-16 16:42:59 +02:00
Rodrigo Locatti db67e017cb
Merge pull request #3659 from bunnei/time-calc-standard-user
service: time: Implement CalculateStandardUserSystemClockDifferenceByUser.
2020-04-16 02:51:57 -03:00
ReinUsesLisp 090fd3fefa buffer_cache: Return handles instead of pointer to handles
The original idea of returning pointers is that handles can be moved.
The problem is that the implementation didn't take that in mind and made
everything harder to work with. This commit drops pointer to handles and
returns the handles themselves. While it is still true that handles can
be invalidated, this way we get an old handle instead of a dangling
pointer.

This problem can be solved in the future with sparse buffers.
2020-04-16 02:33:34 -03:00
Rodrigo Locatti a5a2ee8766
Merge pull request #3689 from lioncash/unused-var
decode/shift: Remove unused variable within Shift()
2020-04-16 02:05:54 -03:00
Rodrigo Locatti d196ce0f71
Merge pull request #3688 from lioncash/nequal
surface_view: Add missing operator!= to ViewParams
2020-04-16 01:39:51 -03:00
Rodrigo Locatti 4209dba1f6
Merge pull request #3680 from lioncash/static
gl_device: Mark stage_swizzle as constexpr
2020-04-16 01:26:23 -03:00
Rodrigo Locatti 60e8de7c95
Merge pull request #3687 from lioncash/constness
surface_base: Make IsInside() a const member function
2020-04-16 01:22:50 -03:00
Rodrigo Locatti 612966399b
Merge pull request #3685 from lioncash/copies
control_flow: Make use of std::move in TryInspectAddress()
2020-04-16 01:22:40 -03:00
Lioncash cd2a12e78f decode/shift: Remove unused variable within Shift()
Removes a redundant variable that is already satisfied by the IsFull()
utility function.
2020-04-16 00:16:06 -04:00
Lioncash 5fbe8785d2 surface_view: Add missing operator!= to ViewParams
Provides logical symmetry to the interface.
2020-04-16 00:03:12 -04:00
Lioncash d551c910bb surface_base: Make IsInside() a const member function
This doesn't modify internal state, so this can be made const.
2020-04-15 23:59:35 -04:00
bunnei 319df1db77
Merge pull request #3683 from lioncash/docs
video_core: Amend doxygen comment references
2020-04-15 23:54:58 -04:00
Lioncash 636c8ab85b texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indices
Previously these were all using the red component to derive the indices,
which is definitely not intentional.
2020-04-15 23:50:46 -04:00
Lioncash 72a224d3fc control_flow: Make use of std::move in TryInspectAddress()
Eliminates redundant atomic reference count increments and decrements.
2020-04-15 23:31:22 -04:00
Lioncash 11837e8f13 video_core: Amend doxygen comment references
Fixes broken documentation references.
2020-04-15 22:33:29 -04:00
Lioncash 3a60f19eaf gl_query_cache: Resolve use-after-move in CachedQuery move assignment operator
Avoids potential invalid junk data from being read.
2020-04-15 22:20:06 -04:00
Lioncash 71fb156611 gl_device: Mark stage_swizzle as constexpr
Previously this was mutable even though it shouldn't be.
2020-04-15 21:59:13 -04:00
Lioncash e15ec2705c track: Eliminate redundant copies
Two variables can be references, while two others can be std::moved.
Makes for 4 less atomic reference count increments and decrements.
2020-04-15 21:50:09 -04:00
Lioncash 1c340c6efa CMakeLists: Specify -Wextra on linux builds
Allows reporting more cases where logic errors may exist, such as
implicit fallthrough cases, etc.

We currently ignore unused parameters, since we currently have many
cases where this is intentional (virtual interfaces).

While we're at it, we can also tidy up any existing code that causes
warnings. This also uncovered a few bugs as well.
2020-04-15 21:33:46 -04:00
Rodrigo Locatti 65cbb122ea
Merge pull request #3649 from FernandoS27/3d-fix
Texture Cache: Read current data when flushing a 3D segment.
2020-04-15 17:06:55 -03:00
Fernando Sahmkow e33196d4e7
Merge pull request #3612 from ReinUsesLisp/red
shader/memory: Implement RED.E.ADD and minor changes to ATOM
2020-04-15 15:03:49 -04:00
Lioncash e77337588e file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero
It's undefined behavior to pass a null pointer to std::fread and
std::fwrite, even if the length passed in is zero, so we must perform
the precondition checking ourselves.

A common case where this can occur is when passing in the data of an
empty std::vector and size, as an empty vector will typically have a
null internal buffer.

While we're at it, we can move the implementation out of line and add
debug checks against passing in nullptr to std::fread and std::fwrite.
2020-04-15 14:43:37 -04:00
Lioncash 213fff67bc CMakeLists: Make -Wreorder a compile-time error
This can result in silent logic bugs within code, and given the amount
of times these kind of warnings are caused, they should be flagged at
compile-time so no new code is submitted with them.
2020-04-15 14:14:41 -04:00
Lioncash 521c4c33b5 kernel/thread: Resolve -Wswitch warnings 2020-04-15 13:48:14 -04:00