Commit Graph

103 Commits

Author SHA1 Message Date
Weiyi Wang 7d8f115185 Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
bunnei ffdc27351a renderer_opengl: Treat OpenGL errors as critical. 2018-08-31 01:56:38 +02:00
fearlessTobi f61c9c3eb7 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-25 15:20:40 +02:00
fearlessTobi d1c5f01afe Add more verbose popups for video_core errors 2018-08-19 15:48:40 +02:00
zhupengfei 0c37140690 video_core: Allow changing background color while emulation is running
As @jroweboy stated, this is just one more atomic in VideoCore.
2018-08-04 15:11:51 +08:00
wwylele 0eab948728 reformat all files with clang-format 2018-06-29 16:56:12 +03:00
wwylele 7c5a76e58b log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
NarcolepticK 9ae70e733f video-core: Migrate logging macros (#3878)
* video-core: Migrate logging macros

* video-core: Fixed missed clang format

* video-core: Migrated LOG_GENERIC macro
2018-06-29 00:13:30 +03:00
N00byKing 523c52c708 renderer_opengl: Add Universal 3D Layout Adaption 2018-06-01 18:24:26 +02:00
jmorriz124 8c0ede544f 3dtv botenable improved (#1)
* Fixed crash when right eye isn't available

* Enabled swap screens in stereo views.  Fixed window alignment in stereo
views to handle all screen aspect ratios.

* Minor code cleanup and clang fomat updates.

* Minor cleanup of swapped and aspect ratio code
2018-06-01 17:05:29 +02:00
N00byKing 2814bbc3da renderer_opengl: Allow usage of Stereoscopic 3D 2018-06-01 17:01:06 +02:00
bunnei df8b9863f9 telemetry: Log performance, configuration, and system data. 2017-07-17 21:32:28 -04:00
Yuri Kunde Schlesner 6665557ff7 OpenGL: Remove unused RendererOpenGL fields 2017-05-27 18:02:46 -07:00
Yuri Kunde Schlesner fb1979d7e2 Core: Re-write frame limiter
Now based on std::chrono, and also works in terms of emulated time
instead of frames, so we can in the future frame-limit even when the
display is disabled, etc.

The frame limiter can also be enabled along with v-sync now, which
should be useful for those with displays running at more than 60 Hz.
2017-02-26 17:22:04 -08:00
Yuri Kunde Schlesner b285c2a4ed Core: Make PerfStats internally locked
More ergonomic to use and will be required for upcoming changes.
2017-02-26 17:22:03 -08:00
Yuri Kunde Schlesner 3b4e400333 Remove built-in (non-Microprofile) profiler 2017-02-26 17:22:03 -08:00
Yuri Kunde Schlesner c75ae6c585 Add performance statistics to status bar 2017-02-26 17:22:03 -08:00
MerryMage 64f98f4d0f core: Move emu_window and key_map into core
* Removes circular dependences (common should not depend on core)
2016-12-23 13:42:39 +00:00
James Rowe d9305b0a07 Add default hotkey to swap primary screens.
Also minor style changes
2016-11-05 03:46:43 -06:00
James Rowe 2b1654ad9b Support additional screen layouts.
Allows users to choose a single screen layout or a large screen layout.
Adds a configuration option to change the prominent screen.
2016-11-05 02:55:41 -06:00
Yuri Kunde Schlesner 84fbbe2629 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Yuri Kunde Schlesner 396a8d91a4 Manually tweak source formatting and then re-run clang-format 2016-09-18 21:14:25 -07:00
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
mailwl 07cc781163 gsp::gpu: Reset g_thread_id in UnregisterInterruptRelayQueue 2016-06-01 09:40:15 +03:00
Alexander Laties 0a31e373f1 fixup simple type conversions where possible 2016-05-07 11:41:55 -04:00
Emmanuel Gil Peyrot aa4d4ff23c Frontends, VideoCore: Move glad initialisation to the frontend
On SDL2 this allows it to use SDL_GL_GetProcAddress() instead of the
default function loader, and fixes a crash when using apitrace with an
EGL context.

On Qt we will need to migrate from QGLWidget to QOpenGLWidget and
QOpenGLContext before we can use gladLoadGLLoader() instead of
gladLoadGL(), since the former doesn’t expose a function loader.
2016-05-06 03:10:14 +01:00
Emmanuel Gil Peyrot 691a42fe98 VideoCore: Run include-what-you-use and fix most includes. 2016-04-30 17:02:41 +01:00
tfarley 22f3a7e94c HWRasterizer: Texture forwarding 2016-04-21 17:27:56 -04:00
LittleWhite 4be68dddfb Improve error report from Init() functions
Add error popup when citra initialization failed
2016-03-08 22:05:25 +01:00
bunnei aaa7beeda8 renderer_opengl: Use GLvec3/GLvec4 aliases for commonly used types. 2016-02-05 17:20:23 -05:00
Yuri Kunde Schlesner 05356543d9 OpenGL: Downgrade GL_DEBUG_SEVERITY_NOTIFICATION to Debug logging level
The nVidia driver is *extremely* spammy on this category, sending a
message on every buffer or texture upload, slowing down the emulator and
making the log useless.
2016-02-02 22:44:13 -08:00
bunnei 6a261e825c Merge pull request #1196 from linkmauve/khr_debug
Add optional GL_KHR_debug support
2016-01-12 22:54:52 -05:00
Yuri Kunde Schlesner 195fedccf0 VideoCore: Unify interface to OpenGL and SW rasterizers
This removes explicit checks sprinkled all over the codebase to instead
just have the SW rasterizer expose an implementation with no-ops for
most operations.
2015-12-07 20:20:38 -08:00
Subv 823ce62f2f FragShader: Use an UBO instead of several individual uniforms 2015-11-18 21:03:56 -05:00
Emmanuel Gil Peyrot 53df67376d OpenGL: Log GL_KHR_debug messages we receive
This allows the driver to communicate errors, warnings and improvement
suggestions about our usage of the API.
2015-10-24 02:30:51 +01:00
bunnei c86b9d4242 renderer_opengl: Refactor shader generation/caching to be more organized + various cleanups. 2015-10-21 21:53:14 -04:00
Lioncash 751fbfdcc3 general: Silence some warnings when using clang 2015-09-16 08:51:53 -04:00
Lioncash aec28ed91e video_core: Reorganize headers 2015-09-11 07:31:15 -04:00
Lioncash 1fa772393b video_core: Remove unnecessary includes from headers 2015-09-11 00:10:03 -04:00
Yuri Kunde Schlesner a1a5570e97 Replace the previous OpenGL loader with a glad-generated 3.3 one
The main advantage of switching to glad from glLoadGen is that, apart
from being actively maintained, it supports a customizable entrypoint
loader function, which makes it possible to also support OpenGL ES.
2015-08-30 08:45:56 -03:00
Yuri Kunde Schlesner ff68db61bc OpenGL: Remove redundant texture.enable_2d field from OpenGLState
All uses of this field where it's false can just set the texture id to 0
instead.
2015-08-05 22:55:22 -03:00
Tony Wasserka 902fa4da52 Add CiTrace recording support.
This is exposed in the GUI as a new "CiTrace Recording" widget.

Playback is implemented by a standalone 3DS homebrew application (which only runs reliably within Citra currently; on an actual 3DS it will often crash still).
2015-07-13 22:27:20 +02:00
Emmanuel Gil Peyrot f48b28ad27 Core, VideoCore: Replace or fix exit() calls. 2015-06-28 00:36:55 +01:00
Emmanuel Gil Peyrot 94fc644430 VideoCore: Log the GL driver’s vendor and renderer. 2015-06-16 00:02:23 +01:00
tfarley 5025b35563 Liberal texture unbind (clout menu) 2015-06-08 19:18:19 -04:00
Emmanuel Gil Peyrot b1503b2020 Remove every trailing whitespace from the project (but externals). 2015-05-29 21:59:29 +01:00
tfarley 05dc633a8c OpenGL renderer 2015-05-22 15:51:18 -07:00
Yuri Kunde Schlesner 7ada357b2d Memmap: Re-organize memory function in two files
memory.cpp/h contains definitions related to acessing memory and
configuring the address space
mem_map.cpp/h contains higher-level definitions related to configuring
the address space accoording to the kernel and allocating memory.
2015-05-15 00:04:38 -03:00
Yuri Kunde Schlesner 17a8cae003 Memory: Add GetPhysicalPointer helper function 2015-05-09 04:02:32 -03:00