Commit Graph

123 Commits

Author SHA1 Message Date
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
Yuri Kunde Schlesner
e1fbac3ca1 Common: Remove common.h 2015-05-07 15:45:22 -03:00
archshift
cae89fb315 Allow the user to set the background clear color during emulation
The background color can be seen at the sides of the bottom screen or when the window is wider than normal.
2015-04-03 15:35:51 -07:00
bunnei
b56829df02 Merge pull request #629 from archshift/lcdfb
Implement SetLcdForceBlack and add implementation for color filling in the GPU code
2015-03-10 18:08:55 -04:00
archshift
041e99b613 Added LCD registers, and implementation for color filling in OGL code. 2015-03-09 15:51:41 -07:00
bunnei
06bf471581 Merge pull request #636 from bunnei/refactor-screen-win
Set framebuffer layout from EmuWindow.
2015-03-07 18:18:40 -05:00
bunnei
9960c49c21 Set framebuffer layout from EmuWindow. 2015-03-07 17:21:19 -05:00
Yuri Kunde Schlesner
cd1fbfcf1b Add profiling infrastructure and widget 2015-03-01 21:47:13 -03:00
Emmanuel Gil Peyrot
c439b3074d video_core: Implement the remaining framebuffer formats in the OpenGL renderer. 2015-02-15 14:08:12 +00:00
archshift
ef24e72b26 Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)

Also removed some GEKKO cruft.
2015-02-10 18:30:31 -08:00
Yuri Kunde Schlesner
5961a2852d GSP: Update framebuffer info on all interrupts
Hardware testing determined that the GSP processes shared memory
framebuffer update info even when no memory transfer or filling GX
commands are used. They are now updated on every interrupt, which isn't
confirmed correct but matches hardware behaviour more closely.

This also reverts the hack introduced in #404. It made a few games
behave better, but I believe it's incorrect and also breaks other games.
2015-01-14 05:20:12 -02:00
bunnei
f7a3f45f1e GSP: Toggle active framebuffer each frame 2015-01-07 18:06:00 -05:00
bunnei
0de6a08d75 Merge pull request #291 from purpasmart96/license
License change
2014-12-21 16:05:44 -05:00
purpasmart96
ebfd831ccb License change 2014-12-20 21:20:24 -08:00
Chin
e795692614 Clean up some warnings 2014-12-20 10:03:36 -05:00
Yuri Kunde Schlesner
0600e2d8b5 Convert old logging calls to new logging macros 2014-12-13 02:08:02 -02:00
bunnei
63b1453dd8 Merge pull request #236 from rohit-n/sign-compare
Silence a few -Wsign-compare warnings.
2014-12-03 10:04:47 -05:00
Rohit Nirmal
f9b53c3e94 Silence a few -Wsign-compare warnings. 2014-11-30 22:29:23 -06:00
vaguilar
95b33ee0a7 Fixed viewport error caused by rounding 2014-11-30 09:53:50 -08:00
Emmanuel Gil Peyrot
739bb58c3a Remove tabs in all files except in skyeye imports and in generated GL code 2014-11-19 09:04:03 +00:00
Tony Wasserka
c5c6e095f0 OpenGL Renderer: Cleanup viewport extent calculation. 2014-11-18 13:09:01 +01:00
Tony Wasserka
bd8f491e4c Fixup EmuWindow interface and implementations thereof. 2014-11-18 13:09:01 +01:00
Kevin Hartman
221a9b023d Viewport scaling and display density independence
The view is scaled to be as large as possible, without changing the aspect, within the bounds of the window.
On "retina" displays, or other displays where window units != pixels, the view should no longer draw incorrectly.
2014-11-18 13:06:05 +01: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
Yuri Kunde Schlesner
5f598a5e2c OpenGL renderer: Shuffle initialization code around and rename functions. 2014-10-12 14:37:24 +02:00
bunnei
5481115e71 Merge pull request #97 from archshift/cleanup
Small, general code cleanup
2014-09-13 22:58:58 -04:00
archshift
8fe5f2e2fe Moved common_types::Rect from common to Common namespace 2014-09-08 15:43:36 -07:00
archshift
81baa477b5 renderer_opengl.cpp: improved alignment for readability 2014-09-07 12:09:02 -07:00
Yuri Kunde Schlesner
478289140d Replace GLEW with a glLoadGen loader.
This should fix the GL loading errors that occur in some drivers due to
the use of deprecated functions by GLEW. Side benefits are more accurate
auto-completion (deprecated function and symbols don't exist) and faster
pointer loading (less entrypoints to load). In addition it removes an
external library depency, simplifying the build system a bit and
eliminating one set of binary libraries for Windows.
2014-09-01 17:41:56 -03:00
Yuri Kunde Schlesner
9d172ab550 Downgrade GLSL version to 1.50 (compatible with GL 3.2) 2014-08-28 05:38:13 -03:00
bunnei
20d169e4a1 VideoCore: Fixes rendering issues on Qt and corrects framebuffer output size. 2014-08-26 17:34:52 -04:00
Kevin Hartman
cbfd6b6e52 Rewrite of OpenGL renderer, including OS X support
Screen contents are now displayed using textured quads. This can be updated to expose an FBO once an OpenGL backend for when Pica rendering is being worked on. That FBO's texture can then be applied to the quads.

Previously, FBO blitting was used in order to display screen contents, which did not work on OS X. The new textured quad approach is less of a compatibility risk.
2014-08-25 20:56:59 -07:00
Tony Wasserka
7b6a7d7dfb Pica/GPU: Change hardware registers to use physical addresses rather than virtual ones.
This cleans up the mess that address reading/writing had become and makes the code a *lot* more sensible.
This adds a physical<->virtual address converter to mem_map.h. For further accuracy, we will want to properly extend this to support a wider range of address regions. For now, this makes simply homebrew applications work in a good manner though.
2014-08-12 13:32:56 +02:00
Tony Wasserka
9c781a6c76 Remove the fancy RegisterSet class introduced in 4c2bff61e.
While it was some nice and fancy template usage, it ultimately had many practical issues regarding length of involved expressions under regular usage as well as common code completion tools not being able to handle the structures.
Instead, we now use a more conventional approach which is a lot more clean to use.
2014-08-12 02:17:21 +02:00
Tony Wasserka
9fd2537e93 Use uniform formatting when printing hexadecimal numbers. 2014-07-23 00:44:31 +02:00
Tony Wasserka
246cb75584 RegisterSet: Simplify code by using structs for register definition instead of unions. 2014-07-23 00:33:08 +02:00
Tony Wasserka
75775e9ef4 GPU: Make use of RegisterSet. 2014-07-23 00:33:08 +02:00
Tony Wasserka
c6fdeb7b23 Renderer: Fix component order in bottom framebuffer. 2014-07-23 00:33:08 +02:00
Tony Wasserka
cb6f97b2eb Renderer: Respect the active_fb GPU register. 2014-07-23 00:33:08 +02:00
Tony Wasserka
9b96407e8e Renderer: Add a few TODOs. 2014-07-23 00:33:08 +02:00
Tony Wasserka
1dfa392824 Rename LCD to GPU. 2014-06-12 06:10:49 -04:00
archshift
5a8ed196e6 common_types: Changed BasicRect back to Rect, in the common namespace
Only Rect is in the namespace for now; the rest of common should be added in the future
2014-05-19 17:57:35 -07:00
archshift
b8c8d0903e Merge remote-tracking branch 'upstream/master' into issue-7-fix 2014-05-16 23:21:03 -07:00
Sethpaien
e1fcb2fdfb Update FlipFramebuffer
Less calculations + fix
2014-05-08 18:05:30 +02:00
archshift
948cfe6d37 Reverse debugging changes 2014-04-30 20:00:44 -07:00
archshift
fb47258af7 TGA dumps work, courtesy of @bunnei 2014-04-30 18:34:49 -07:00
archshift
ff48c8bed3 Rect to BasicRect
Somewhere along the line an OSX header had already taken the name Rect.
2014-04-27 22:21:46 -07:00
bunnei
1142ccba03 fixed renderer to use correct framebuffer location 2014-04-27 12:42:01 -04:00
bunnei
7a080551ac fixed GL context acquire (applies to Qt GUI only) 2014-04-21 22:00:32 -04:00
bunnei
70c2cce963 renamed hw_lcd module to just lcd 2014-04-17 23:48:23 -04:00
bunnei
9d5a561c1b fixed framebuffer color order 2014-04-17 17:47:34 -04:00
bunnei
d4411acfd0 removed hard-coded framebuffer addresses from renderer_opengl.cpp 2014-04-16 21:30:10 -04: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