Commit graph

205 commits

Author SHA1 Message Date
Tony Wasserka
88e9efe4b8 Pica/DebugUtils: Fix two warnings. 2014-12-20 18:06:56 +01:00
Tony Wasserka
6e275778c9 Pica/DebugUtils: Better document LookupTexture. 2014-12-20 18:06:55 +01:00
Tony Wasserka
e4e9710d18 Pica/Rasterizer: Get rid of C-style casts. 2014-12-20 18:06:55 +01:00
Tony Wasserka
d81370682f Pica/DebugUtils: Make a number of variables static.
Makes for cleaner and faster code.
2014-12-20 18:06:55 +01:00
Tony Wasserka
6bd41de276 Pica/VertexShader: Cleanup flow control logic and implement CMP/IFU instructions. 2014-12-20 18:06:55 +01:00
Tony Wasserka
22afb9d830 Pica/VertexShader: Run instruction handlers according to the effective opcode.
This allows for proper emulation of the different CMP/LRP/MAD instructions.
2014-12-20 18:06:55 +01:00
Tony Wasserka
cd163fb59a Pica/VertexShader: Implement MAX instructions. 2014-12-20 18:06:55 +01:00
Tony Wasserka
aff808b2fd Pica: Add support for boolean uniforms. 2014-12-20 18:06:55 +01:00
Tony Wasserka
67618a2c55 Pica/VertexShader: Add support for MOVA, CMP and IFC. 2014-12-20 18:06:55 +01:00
Tony Wasserka
cb1804e0ab Pica/VertexShader: Move code around a bit. 2014-12-20 18:06:55 +01:00
Tony Wasserka
b85524c760 Pica/VertexShader: Some cleanups using std::array. 2014-12-20 18:06:55 +01:00
Tony Wasserka
ce36ad454e Pica/VertexShader: Support negating src2. 2014-12-20 18:06:55 +01:00
Tony Wasserka
cc5746abfe Pica/DebugUtils: Replace duplicated SHBIN structures in favor of nihstro's ones. 2014-12-20 18:06:55 +01:00
Tony Wasserka
8ce1d32460 Pica/VertexShader: Remove (now) duplicated shader bytecode definitions in favor of nihstro's ones. 2014-12-20 18:06:55 +01:00
Tony Wasserka
79c29243ed Pica/DebugUtils: Add an event triggered after loading a vertex. 2014-12-20 18:06:55 +01:00
Tony Wasserka
cd322e328e Pica/PrimitiveAssembly: Implement triangle strips. 2014-12-20 18:06:54 +01:00
Tony Wasserka
346012f29e Pica/CommandProcessor: Add a safety check for invalid (?) GPU configurations. 2014-12-20 18:06:54 +01:00
Tony Wasserka
1e960e9ee2 Pica/CommandProcessor: Fix vertex decoding if multiple memory areas are accessed for different attributes. 2014-12-20 18:06:54 +01:00
Tony Wasserka
1c972ef3b9 Add support for a ridiculous number of texture formats. 2014-12-20 18:06:54 +01:00
Tony Wasserka
40f123b7c0 Pica: Unify ugly address translation hacks. 2014-12-20 18:06:53 +01:00
Tony Wasserka
7e210e0229 Pica: Further improve Tev emulation. 2014-12-20 18:05:53 +01:00
Tony Wasserka
3df88d59b0 Pica: Merge texture lookup logic for DebugUtils and Rasterizer.
This effectively adds support for a lot texture formats in the rasterizer.
2014-12-20 18:05:53 +01:00
Tony Wasserka
0fba1d48a6 Pica: Implement texture wrapping. 2014-12-20 18:05:53 +01:00
Tony Wasserka
c81f1a9ebc Pica/DebugUtils: Add support for RGBA8, RGBA5551, RGBA4 and A8 texture formats. 2014-12-20 18:05:53 +01:00
Tony Wasserka
fd2539121c Pica: Initial support for multitexturing. 2014-12-20 18:05:53 +01:00
Chin
e795692614 Clean up some warnings 2014-12-20 10:03:36 -05:00
chinhodado
d31c23e958 Properly erase/remove an observer 2014-12-19 14:24:44 -05:00
Yuri Kunde Schlesner
0600e2d8b5 Convert old logging calls to new logging macros 2014-12-13 02:08:02 -02:00
bunnei
a6791e4fc7 Merge pull request #267 from bunnei/apt-shared-font
APT shared font loading
2014-12-12 22:12:12 -05:00
Tony Wasserka
33e61ef514 Merge pull request #261 from neobrain/boost
Add Boost as a submodule and add some minor cleanups using Boost.Range
2014-12-12 17:32:57 +01:00
bunnei
4cb7a44d4e MemMap: Renamed "GSP" heap to "linear", as this is not specific to GSP.
- Linear simply indicates that the mapped physical address is always MappedVAddr+0x0C000000, thus this memory can be used for hardware devices' DMA (such as the GPU).
2014-12-12 00:15:47 -05:00
bunnei
f94d8f9603 GSP: Trigger GPU interrupts at more accurate locations. 2014-12-09 19:07:14 -05:00
bunnei
170123982d GPU: Fixed bug in command list size decoding. 2014-12-09 19:07:13 -05:00
Tony Wasserka
0305435edd Pica: Re-enable command names on MSVC.
The affected code is no longer limited by compiler support on that platform.
2014-12-09 16:37:34 +01:00
Tony Wasserka
79bb403089 More coding style fixes. 2014-12-09 16:37:34 +01:00
Tony Wasserka
0cd27a511e Some code cleanup. 2014-12-09 16:37:34 +01:00
Tony Wasserka
2793619dce citra_qt: Add enhanced texture debugging widgets.
Double-clicking a texture parameter command in the pica command lists will spawn these as a new tab in the pica command list dock area.
2014-12-09 16:37:34 +01:00
Tony Wasserka
fd194d95b0 citra-qt: Add texture viewer to Pica command list.
The texture viewer is enabled when selecting a write command to one of the texture config registers.
2014-12-09 16:37:34 +01:00
Tony Wasserka
2c71ec7052 Pica/DebugUtils: Add breakpoint functionality. 2014-12-09 16:37:34 +01:00
Tony Wasserka
8db65723d2 Build fix for something which shouldn't have compiled successfully to begin with. 2014-12-09 16:37:34 +01:00
Tony Wasserka
4d4572c697 Integrate Boost into build system and perform a trivial cleanup in vertex_shader.cpp. 2014-12-07 23:52:17 +01:00
Rohit Nirmal
8a62423970 Change NULLs to nullptrs. 2014-12-03 12:57:57 -06: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
Emmanuel Gil Peyrot
f5d38649c7 Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated 2014-11-19 09:03:07 +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
Tony Wasserka
8717c79fe4 Merge pull request #195 from lioncash/control
vertex_shader: Fix control reaches end of function warning
2014-11-16 22:50:00 +01:00
Lioncash
bd76783d91 vertex_shader: Fix control reaches end of function warning 2014-11-16 16:44:14 -05:00
Lioncash
ac58b76e71 Fix two format strings. 2014-11-14 12:08:26 -05:00
bunnei
01e37962e7 Merge pull request #162 from SeannyM/warning-fixes
Fix some warnings
2014-10-29 21:07:27 -04:00
Sean
9a012ff007 Fix some warnings 2014-10-29 20:26:15 -04:00
Gareth Poole
38df9e96dd Renamed souce files of services to match port names 2014-10-29 15:55:51 -04:00
Yuri Kunde Schlesner
d72708c1f5 Add override keyword through the code.
This was automated using `clang-modernize`.
2014-10-26 16:18:05 -02:00
Yuri Kunde Schlesner
15c59f3974 Only check OpenGL shader log if size is >1.
This prevents a crash when the buffer size returned by the driver is 0,
in which case no space is allocated to store even the NULL byte and
glGetShaderInfoLog errors out.

Thanks to @Relys for the bug report.
2014-10-21 16:07:39 -02: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
Yuri Kunde Schlesner
787a1b047c Remove virtual inheritance from RendererOpenGL
Also make destructor virtual so that instances are properly destructed.
2014-10-12 14:37:24 +02:00
Lioncash
eb5054e6eb Fix warnings in video_core 2014-10-07 20:35:13 -04:00
Emmanuel Gil Peyrot
6b7b36a874 Common: Rename the File namespace to FileUtil, to match the filename and prevent collisions. 2014-09-17 14:35:45 +00:00
bunnei
31d9cf4d17 Merge pull request #110 from lioncash/warnings
Core: Fix warnings in gpu.cpp
2014-09-14 21:28:44 -04:00
bunnei
5481115e71 Merge pull request #97 from archshift/cleanup
Small, general code cleanup
2014-09-13 22:58:58 -04:00
Lioncash
6cc7c73b80 Core: Fix warnings in gpu.cpp 2014-09-13 22:55:41 -04:00
Kevin Hartman
02fd19b2f6 Added support for multiple input device types for KeyMap and connected Qt. 2014-09-12 01:15:14 -07: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
archshift
1c02c03e32 Dead code removal: video_core.cpp, load_symbol_map.cpp 2014-09-07 12:09:02 -07:00
archshift
0167e9140e utils: cleaned up DumpTGA, removing redundancies 2014-09-07 12:09:02 -07:00
Yuri Kunde Schlesner
c57de3e404 Remove hand-crafted Visual Studio solution. 2014-09-01 18:06:30 -03:00
Yuri Kunde Schlesner
45976da975 CMake cleanup
Several cleanups to the buildsystem:
 - Do better factoring of common libs between platforms.
 - Add support to building on Windows.
 - Remove Qt4 support.
 - Re-sort file lists and add missing headers.
2014-09-01 18:06:30 -03: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
a79644c9ba Pica/Rasterizer: Clarify a TODO. 2014-08-25 22:03:19 +02:00
Tony Wasserka
697b50c3ff Pica/VertexShader: Fix a bug in the call stack handling. 2014-08-25 22:03:19 +02:00
Tony Wasserka
b5b3aeb576 Math: Warning fixes. 2014-08-25 22:03:19 +02:00
Tony Wasserka
2f1c129f64 Pica: Consolidate the primitive assembly code in PrimitiveAssembly and GeometryDumper. 2014-08-25 22:03:19 +02:00
Tony Wasserka
9679d231df Pica/Rasterizer: Add texturing support. 2014-08-25 22:03:18 +02:00
Tony Wasserka
34fa0b6d9c Pica/DebugUtils: Add convenient tev setup printer. 2014-08-25 22:03:18 +02:00
Tony Wasserka
27cab6477e Pica/Rasterizer: Add initial implementation of texture combiners. 2014-08-25 22:03:18 +02:00
Tony Wasserka
c4691b784b Pica: Add support for dumping textures. 2014-08-25 22:03:18 +02:00
Tony Wasserka
162d641a30 Pica/Math: Improved the design of the Vec2/Vec3/Vec4 classes and simplified rasterizer code accordingly.
- Swizzlers now return const objects so that things like "first_vec4.xyz() = some_vec3" now will fail to compile (ideally we should support some vector holding references to make this actually work).
- The methods "InsertBeforeX/Y/Z" and "Append" have been replaced by more versions of MakeVec, which now also supports building new vectors from vectors.
- Vector library now follows C++ type promotion rules (hence, the result of Vec2<u8> with another Vec2<u8> is now a Vec2<int>).
2014-08-25 22:03:18 +02:00
Tony Wasserka
62c36a4ef0 Pica/VertexShader: Fix a bug in the bitfield definitions and add the "negate" field for swizzlers. 2014-08-25 22:03:18 +02:00
Tony Wasserka
26ade98411 Pica/citra-qt: Replace command list view and command list debugging code with something more sophisticated. 2014-08-25 22:03:18 +02:00
Tony Wasserka
0465adf206 Pica/CommandProcessor: Implement parameter masking. 2014-08-25 22:03:18 +02:00
Tony Wasserka
f37e39deb9 Pica: Add debug utilities for dumping shaders. 2014-08-25 22:03:18 +02:00
Tony Wasserka
6ea003c7b5 Pica: Add debug utility functions for dumping geometry data. 2014-08-25 22:03:18 +02:00
Sacha
a3a70e56ac Fix the threading for GL Context in Qt5.
Connect the emu_thread start/finish to a moveContext slot.
2014-08-25 00:47:00 +10:00
bunnei
388356f629 Merge pull request #42 from archshift/glexp
Use glewExperimental to fix crashes with citra-glfw
2014-08-13 13:10:45 -04:00
archshift
662a1993e6 float24: Remove private default constructor
Fixes building with clang.
2014-08-13 02:54:16 -07:00
archshift
d71af1bd20 Use glewExperimental on Linux in order to fix GLFW-mode 2014-08-12 13:42:04 -07:00
Tony Wasserka
94d742fe17 Pica: Add basic rasterizer. 2014-08-12 13:50:07 +02:00
Tony Wasserka
94aa9da562 Pica: Add triangle clipper. 2014-08-12 13:49:33 +02:00
Tony Wasserka
9a76a2d061 Pica: Add primitive assembly stage. 2014-08-12 13:48:56 +02:00
Tony Wasserka
c526512619 Pica: Add vertex shader implementation. 2014-08-12 13:48:10 +02:00
Tony Wasserka
d443f0a921 Pica: Implement vertex loading. 2014-08-12 13:47:31 +02:00