summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-09-11audio_core/sink_details: Change std::string parameter into std::string_viewLioncash
The given string is only ever used for lookup and comparison, so we can just utilize a non-owning view to string data here
2018-09-11Merge pull request #1291 from lioncash/defaultbunnei
hle/service: Default constructors and destructors in the cpp file where applicable
2018-09-11Merge pull request #1292 from ogniK5377/renderdoc-fixbunnei
Fixed renderdoc input/output textures not working due to multiple render targets
2018-09-11externals: Place font data within cpp filesLioncash
This places the font data within cpp files, which mitigates the possibility of the font data being duplicated within the binary if it's referred to in more than one translation unit in the future. It also stores the data within a std::array, which is more flexible when it comes to operating with the standard library. Furthermore, it makes the data arrays const. This is what we want, as it allows the compiler to store the data within the read-only segment. As it is, having several large sections of mutable data like this just leaves spots in memory that we can accidentally write to (via accidental overruns, what have you) and actually have it work. This ensures the font data remains the same no matter what.
2018-09-10hle/service: Default constructors and destructors in the cpp file where ↵Lioncash
applicable When a destructor isn't defaulted into a cpp file, it can cause the use of forward declarations to seemingly fail to compile for non-obvious reasons. It also allows inlining of the construction/destruction logic all over the place where a constructor or destructor is invoked, which can lead to code bloat. This isn't so much a worry here, given the services won't be created and destroyed frequently. The cause of the above mentioned non-obvious errors can be demonstrated as follows: ------- Demonstrative example, if you know how the described error happens, skip forwards ------- Assume we have the following in the header, which we'll call "thing.h": \#include <memory> // Forward declaration. For example purposes, assume the definition // of Object is in some header named "object.h" class Object; class Thing { public: // assume no constructors or destructors are specified here, // or the constructors/destructors are defined as: // // Thing() = default; // ~Thing() = default; // // ... Some interface member functions would be defined here private: std::shared_ptr<Object> obj; }; If this header is included in a cpp file, (which we'll call "main.cpp"), this will result in a compilation error, because even though no destructor is specified, the destructor will still need to be generated by the compiler because std::shared_ptr's destructor is *not* trivial (in other words, it does something other than nothing), as std::shared_ptr's destructor needs to do two things: 1. Decrement the shared reference count of the object being pointed to, and if the reference count decrements to zero, 2. Free the Object instance's memory (aka deallocate the memory it's pointing to). And so the compiler generates the code for the destructor doing this inside main.cpp. Now, keep in mind, the Object forward declaration is not a complete type. All it does is tell the compiler "a type named Object exists" and allows us to use the name in certain situations to avoid a header dependency. So the compiler needs to generate destruction code for Object, but the compiler doesn't know *how* to destruct it. A forward declaration doesn't tell the compiler anything about Object's constructor or destructor. So, the compiler will issue an error in this case because it's undefined behavior to try and deallocate (or construct) an incomplete type and std::shared_ptr and std::unique_ptr make sure this isn't the case internally. Now, if we had defaulted the destructor in "thing.cpp", where we also include "object.h", this would never be an issue, as the destructor would only have its code generated in one place, and it would be in a place where the full class definition of Object would be visible to the compiler. ---------------------- End example ---------------------------- Given these service classes are more than certainly going to change in the future, this defaults the constructors and destructors into the relevant cpp files to make the construction and destruction of all of the services consistent and unlikely to run into cases where forward declarations are indirectly causing compilation errors. It also has the plus of avoiding the need to rebuild several services if destruction logic changes, since it would only be necessary to recompile the single cpp file.
2018-09-11Fixed renderdoc input/output textures not working due to render targetsDavid Marcec
2018-09-10Use open-source shared fonts if no dumped file is available (#1269)Tobias
* Add open-source shared fonts * Address review comments
2018-09-10Port #4141 from citra: Joystick hotplug support (#1275)Tobias
* Joystick hotplug support (#4141) * use SDL_PollEvent instead of SDL_JoystickUpdate Register hot plugged controller by GUID if they were configured in a previous session * Move SDL_PollEvent into its own thread * Don't store SDLJoystick pointer in Input Device; Get pointer on each GetStatus call * Fix that joystick_list gets cleared after SDL_Quit * Add VirtualJoystick for InputDevices thats never nullptr * fixup! Add VirtualJoystick for InputDevices thats never nullptr * fixup! fixup! Add VirtualJoystick for InputDevices thats never nullptr * Remove SDL_GameController, make SDL_Joystick* unique_ptr * fixup! Remove SDL_GameController, make SDL_Joystick* unique_ptr * Adressed feedback; fixed handling of same guid reconnects * fixup! Adressed feedback; fixed handling of same guid reconnects * merge the two joystick_lists into one * make SDLJoystick a member of VirtualJoystick * fixup! make SDLJoystick a member of VirtualJoystick * fixup! make SDLJoystick a member of VirtualJoystick * fixup! fixup! make SDLJoystick a member of VirtualJoystick * SDLJoystick: Addressed review comments * Address one missed review comment
2018-09-10Merge pull request #1286 from bunnei/multi-clearbunnei
gl_rasterizer: Implement clear for non-zero render targets.
2018-09-10Merge pull request #1285 from bunnei/depth-fixbunnei
gl_rasterizer_cache: Only use depth for applicable texture formats.
2018-09-10Merge pull request #1284 from bunnei/bgra8_srgbbunnei
gl_rasterizer_cache: Implement RenderTargetFormat::BGRA8_SRGB.
2018-09-10Merge pull request #1288 from MysticExile/remove-multicoreJames Rowe
Remove the multi-core option from the UI
2018-09-10video_core: Refactor command_processor.Markus Wick
Inline the WriteReg helper as it is called ~20k times per frame.
2018-09-10video_core: Move command buffer loop.Markus Wick
This moves the hot loop into video_core. This refactoring shall reduce the CPU overhead of calling ProcessCommandList.
2018-09-10Remove multicore configure_general.uiMysticExile
2018-09-10remove multicore in configure_general.cppMysticExile
2018-09-10rasterizer: Drop unused handler.Markus Wick
This virtual function is called in a very hot spot, and it does nothing. If this kind of feature is required, please be more specific and add callbacks in the switch statement within Maxwell3D::WriteReg. There is no point in having another switch statement within the rasterizer.
2018-09-10gl_rasterizer_cache: Only use depth for applicable texture formats.bunnei
- Fixes an issue with Octopath Traveler leaving stale data here.
2018-09-10gl_rasterizer: Implement clear for non-zero render targets.bunnei
- Several misc. changes to ConfigureFramebuffers in support of this.
2018-09-10gl_rasterizer_cache: Implement RenderTargetFormat::BGRA8_SRGB.bunnei
- Used by Octopath Traveler (with multiple render targets).
2018-09-09gl_rasterizer: Implement multiple color attachments.bunnei
2018-09-09Merge pull request #1258 from tgsm/fix-sdl-loggingbunnei
yuzu-cmd: fix SDL logging
2018-09-09Merge pull request #1282 from lioncash/compatbunnei
yuzu: Move compatibility list specifics to their own source files
2018-09-09Merge pull request #1276 from FearlessTobi/fix-stupid-stubbunnei
hid: Implement ReloadInputDevices
2018-09-09Merge pull request #1283 from lioncash/unusedbunnei
service: Remove unused g_kernel_named_ports variable
2018-09-09service: Remove unused g_kernel_named_ports variableLioncash
With the named port functionality all migrated over to the kernel, there's no need to keep this around anymore.
2018-09-09Merge pull request #1268 from FernandoS27/tmmlbunnei
shader_decompiler: Implemented TMML
2018-09-09Implemented TMMLFernandoS27
2018-09-09Merge pull request #1272 from Subv/dma_2dbunnei
GPU/DMA: Partially implemented the 'enable_2d' bit in the DMA engine.
2018-09-09Merge pull request #1280 from zero334/improvementsbunnei
video_core: fixed arithmetic overflow warnings & improved code style
2018-09-09game_list: Make CompatibilityList parameter of ↵Lioncash
NavigateToGamedbEntryRequested() a const reference The compatibility list isn't modified within any of the slots connected to this signal, so we can make it const to enforce immutability.
2018-09-09yuzu: Move compatibility list specifics to their own source filesLioncash
Lets us keep the generic portions of the compatibility list code together, and allows us to introduce a type alias that makes it so we don't need to type out a very long type declaration anymore, making the immediate readability of some code better.
2018-09-09Implemented TXQ dimension query type, used by SMO.FernandoS27
2018-09-09video_core: fixed arithmetic overflow warnings & improved code stylePatrick Elsässer
- Fixed all warnings, for renderer_opengl items, which were indicating a possible incorrect behavior from integral promotion rules and types larger than those in which arithmetic is typically performed. - Added const for variables where possible and meaningful. - Added constexpr where possible.
2018-09-09hid: Implement ReloadInputDevicesfearlessTobi
2018-09-08Change name of TEXQ to TXQ, in order to match NVIDIA's namingFernandoS27
2018-09-08GPU/DMA: Partially implemented the 'enable_2d' bit in the DMA engine.Subv
When not set, this tells the GPU to only use the X size when performing a DMA copy. This is only implemented for linear->linear and tiled->tiled copies. Conversion copies still retain the assert. This bit is unset by some games for various purposes, and by nouveau when copying the vertex buffers.
2018-09-08Merge pull request #1256 from bunnei/tex-target-supportbunnei
Initial support for non-2D textures
2018-09-08Merge pull request #1265 from zhaowenlan1779/patch-1bunnei
yuzu: fix title bar display
2018-09-08audio_renderer: Rename AudioOut instance to audio_outMerryMage
2018-09-08yuzu: fix title bar displayPengfei Zhu
Previously the version number got hidden after starting a game.
2018-09-08Merge pull request #1246 from degasus/instanced_renderingbunnei
gl_rasterizer: Use baseInstance instead of moving the buffer points.
2018-09-08Merge pull request #1259 from lioncash/relocatebunnei
yuzu: Move GameListWorker to its own source files
2018-09-08gl_rasterizer: Use baseInstance instead of moving the buffer points.bunnei
This hopefully helps our cache not to redundant upload the vertex buffer. # Conflicts: # src/video_core/renderer_opengl/gl_rasterizer.cpp
2018-09-08yuzu-cmd: fix SDL loggingtgsm
2018-09-08video_core: Arithmetic overflow warning fix for gl_rasterizer (#1262)Patrick Elsässer
* video_core: Arithmetic overflow fix for gl_rasterizer - Fixed warnings, which were indicating incorrect behavior from integral promotion rules and types larger than those in which arithmetic is typically performed. - Added const for variables where possible and meaningful. * Changed the casts from C to C++ style Changed the C-style casts to C++ casts as proposed. Took also care about signed / unsigned behaviour.
2018-09-08gl_rasterizer_cache: Improve accuracy of RecreateSurface for non-2D textures.bunnei
2018-09-08maxwell_3d: Remove assert that no longer applies.bunnei
2018-09-08gl_rasterizer_cache: Partially implement several non-2D texture types.bunnei
2018-09-08gl_shader_decompiler: Partially implement several non-2D texture types (Subv).bunnei