Commit Graph

47 Commits

Author SHA1 Message Date
GPUCode 2bb7f89c30
video_core: Refactor GPU interface (#7272)
* video_core: Refactor GPU interface

* citra_qt: Better debug widget lifetime
2023-12-28 11:46:57 +01:00
GPUCode 7edc86a9bc
code: Remove outdated comment style (#6640) 2023-06-25 15:22:41 +05:30
Vitor K 34de77d429
Various miscelaneous changes (#6496) 2023-05-03 17:24:10 +02:00
GPUCode 227926c1fa
Remove remnants of separable shader setting (#6403) 2023-04-26 00:19:02 +02:00
GPUCode ffc95eb59b
Frontend PR fixes (#6378)
* citra_qt: Check if renderer is null

* core: Fix dynarmic use-after-free error

* bootmanager: Add current context check in DoneCurrent

* Loading a save state would destroy the frame dumper class, which contains a shared context. That context would call DoneCurrent without checking if it was actually bound or not, resulting in crashes when calling opengl functions

* externals: Correct glad readme

* common: Log renderer debug setting

* citra: Make lambda lower case

* Consistency with review comments on the PR

* video_core: Kill more global state

* GetResolutionScaleFactor would be called somewhere in the renderer constructor chain but it relies on the yet unitialized g_renderer, resulting in crashes when the resolution scale is set to auto. Rather than adding a workaround, let's kill this global state to fix this for good
2023-03-30 14:24:49 +03:00
GPUCode b5d6f645bd
Prepare frontend for multiple graphics APIs (#6347)
* externals: Update dynarmic

* settings: Introduce GraphicsAPI enum

* For now it's OpenGL only but will be expanded upon later

* citra_qt: Introduce backend agnostic context management

* Mostly a direct port from yuzu

* core: Simplify context acquire

* settings: Add option to create debug contexts

* renderer_opengl: Abstract initialization to Driver

* This commit also updates glad and adds some useful extensions which we will use in part 2

* Rasterizer construction is moved to the specific renderer instead of RendererBase.
  Software rendering has been disable to achieve this but will be brought back in the next commit.

* video_core: Remove Init/Shutdown methods from renderer

* The constructor and destructor can do the same job

* In addition move opengl function loading to Qt since SDL already does this. Also remove ErrorVideoCore which is never reached

* citra_qt: Decouple software renderer from opengl part 1

* citra: Decouple software renderer from opengl part 2

* android: Decouple software renderer from opengl part 3

* swrasterizer: Decouple software renderer from opengl part 4

* This commit simply enforces the renderer naming conventions in the software renderer

* video_core: Move RendererBase to VideoCore

* video_core: De-globalize screenshot state

* video_core: Pass system to the renderers

* video_core: Commonize shader uniform data

* video_core: Abstract backend agnostic rasterizer operations

* bootmanager: Remove references to OpenGL for macOS

OpenGL macOS headers definitions clash heavily with each other

* citra_qt: Proper title for api settings

* video_core: Reduce boost usage

* bootmanager: Fix hide mouse option

Remove event handlers from RenderWidget for events that are
already handled by the parent GRenderWindow.
Also enable mouse tracking on the RenderWidget.

* android: Remove software from graphics api list

* code: Address review comments

* citra: Port per-game settings read

* Having to update the default value for all backends is a pain so lets centralize it

* android: Rename to OpenGLES

---------

Co-authored-by: MerryMage <MerryMage@users.noreply.github.com>
Co-authored-by: Vitor Kiguchi <vitor-kiguchi@hotmail.com>
2023-03-27 14:29:17 +03:00
Ameer J f44c95d638
Add "Separate Windows" LayoutOption (#6177) 2022-11-17 16:37:30 +01:00
emufan4568 926d604312 Run clang format once more 2022-08-29 21:37:38 +03:00
emufan4568 12f84e18dc externals: Upgrade glad to latest version
* Also change some mentions to OpenGL 3.3 to 4.3
2022-08-22 23:44:03 +03:00
B3n30 922a5f738a fix typo; updated comment about apples bad driver 2020-04-18 15:55:19 +02:00
B3n30 1e54f27cde Add flag to disable seperable shaders for osx Intel GPUs. Default is false 2020-04-18 13:37:58 +02:00
Hamish Milne 828f88d20a Merge branch 'master' into feature/savestates-2 2020-04-12 11:24:06 +01:00
Hamish Milne 7ff985cef9 Fixed TAS movie serialization 2020-04-06 21:23:39 +01:00
Marshall Mohror f14e973a27
Texture Filtering v2 (#5166)
* video_core/renderer_opengl: Move SurfaceParams into its own file

Some of its enums are needed outside of the rasterizer cache
and trying to use it caused circular dependencies.

* video_core/renderer_opengl: Overhaul the texture filter framework

This should make it less intrusive.
Now texture filtering doesn't have any mutable global state.
The texture filters now always upscale to the internal rendering resolution.
This simplifies the logic in UploadGLTexture and it simply takes the role of BlitTextures at the end of the function.
This also prevent extra blitting required when uploading to a framebuffer surface with a mismatched size.

* video_core/renderer_opengl: Use generated mipmaps for filtered textures

The filtered guest mipmaps often looked terrible.

* core/settings: Remove texture filter factor

* sdl/config: Remove texture filter factor

* qt/config: Remove texture filter factor
2020-04-02 22:42:50 -05:00
Hamish Milne 7b846ffa98 clang-format fixes 2020-02-13 17:39:15 +08:00
Hamish Milne 6f00976ab5 video_core serialization 2020-02-13 17:34:16 +08:00
James Rowe 4e9ec4efd0 Add shader disk caching 2020-01-15 19:58:33 -07:00
tywald aad8261534 Remove 'Accurate Geometry Shader' setting, default behavior is as it was turned on. 2019-08-12 02:55:14 +02:00
xperia64 8131bd32e3 renderer_opengl: Add support for custom shaders (#4578)
* Add Anaglyph 3D

Change 3D slider in-game

Change shaders while game is running

Move shader loading into function

Disable 3D slider setting when stereoscopy is off

The rest of the shaders

Address review issues

Documentation and minor fixups

Forgot clang-format

Fix shader release on SDL2-software rendering

Remove unnecessary state changes

Respect 3D factor setting regardless of stereoscopic rendering

Improve shader resolution passing

Minor setting-related improvements

Add option to toggle texture filtering

Rebase fixes

* One final clang-format

* Fix OpenGL problems
2019-08-09 20:00:47 +02:00
Lioncash 6e22891761 core: Namespace EmuWindow
Gets the class out of the global namespace.
2019-04-21 14:16:16 +02:00
Weiyi Wang 7e8ba6ed8e Memory: move memory chunk into pImpl and make them dynamically allocated
Otherwise MSVC would give out-of-memory error on compile time
2018-12-06 13:30:47 -05:00
Weiyi Wang 8bb404c82a VideoCore: pass in memory system
currently set as global. Will change when videocore itself is wrapped as a class
2018-12-05 20:16:42 -05:00
zhupengfei 071b41cb61
citra_qt, video_core: Screenshot functionality
Allows capturing screenshot at the current internal resolution (native for software renderer), but a setting is available to capture it in other resolutions. The screenshot is saved to a single PNG in the current layout.
2018-11-30 14:14:41 +08: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
Merry 0a5621fafc
Merge pull request #3970 from FearlessTobi/more-popup-madness
citra_qt: Add more verbose popups for video_core errors
2018-08-24 19:21:35 +01:00
Lioncash d944d1120f video_core: Remove unimplemented Start() function prototype
Given this has no definition, we can just remove it entirely.
2018-08-23 16:58:30 +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 06815ec905 video_core: receive hardware shader settings 2018-05-14 10:17:35 +03:00
James Rowe b002511df0
citra-qt: Add customizable speed limit target (#3353)
citra-qt: Add customizable speed limit target

* Update SDL config for the new frame_limit option
* Made max lag time a function of target speed percent.
* Added a checkbox to enable/disable frame limiter
* UI: Prevent frame_limit from under/overflowing
* UI: Hide target speed percent when frame limiter is off
* Disable frame limit spin box when framelimit isn't enabled
2018-01-25 22:24:40 -07:00
Yuri Kunde Schlesner eb10f25025 Move screen size constants from video_core to core
video_core didn't even properly use them, and they were the source of
many otherwise-unnecessary dependencies from core to video_core.
2017-05-27 18:41:24 -07:00
bunnei 22ad9094e6 config: Add option for specifying screen resolution scale factor. 2017-01-07 03:23:22 -05:00
emmauss c4e4fa53d9 Implement Frame rate limiter (#2223)
* implement frame limiter

* fixes
2016-12-06 14:33:19 -05:00
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
tfarley e46d086189 Config: Add scaled resolution option 2016-04-21 17:27:48 -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
Lioncash 5e17a586da video_core: Make the renderer global a unique_ptr 2015-12-30 08:52:01 -05:00
bunnei 094ae6fadb Shader: Initial implementation of x86_x64 JIT compiler for Pica vertex shaders.
- Config: Add an option for selecting to use shader JIT or interpreter.
- Qt: Add a menu option for enabling/disabling the shader JIT.
2015-08-15 18:01:07 -04:00
Emmanuel Gil Peyrot 22ae87530b Common: Cleanup emu_window includes. 2015-06-28 00:36:54 +01:00
tfarley 05dc633a8c OpenGL renderer 2015-05-22 15:51:18 -07:00
Yuri Kunde Schlesner e1fbac3ca1 Common: Remove common.h 2015-05-07 15:45:22 -03:00
bunnei 9960c49c21 Set framebuffer layout from EmuWindow. 2015-03-07 17:21:19 -05:00
purpasmart96 ebfd831ccb License change 2014-12-20 21:20:24 -08:00
Yuri Kunde Schlesner 11642fd3a2 Rework OpenGL renderer.
The OpenGL renderer has been revised, with the following changes:
 - Initialization and rendering have been refactored to reduce the number of
   redundant objects used.
 - Framebuffer rotation is now done directly, using texture mapping.
 - Vertex coordinates are now given in pixels, and the projection matrix
   isn't hardcoded anymore.
2014-10-12 14:38:53 +02:00
Kevin Hartman 02fd19b2f6 Added support for multiple input device types for KeyMap and connected Qt. 2014-09-12 01:15:14 -07:00
bunnei de0a034a84 fixed project includes to use new directory structure 2014-04-08 20:15:08 -04:00
bunnei 63e46abdb8 got rid of 'src' folders in each sub-project 2014-04-08 19:25:03 -04:00