Commit graph

407 commits

Author SHA1 Message Date
bunnei
bb7eb5c574 Merge pull request #1006 from yuriks/fb-commit-profile
OpenGL: Add a profiler category measuring framebuffer readback
2015-07-30 10:39:38 -04:00
bunnei
31c1bb901b Merge pull request #963 from yuriks/gpu-fixes
Misc. GPU vertex loading fixes
2015-07-29 16:45:17 -04:00
Yuri Kunde Schlesner
428154da45 OpenGL: Add a profiler category measuring framebuffer readback 2015-07-28 17:37:46 -03:00
bunnei
e1a3fed6ff Merge pull request #991 from yuriks/globjects
OpenGL: Make OpenGL object resource wrappers fully inline
2015-07-26 16:37:33 -04:00
bunnei
cb76453ec4 Merge pull request #992 from yuriks/hot-path-debug
VideoCore: #ifdef out some debugging routines
2015-07-26 11:45:51 -04:00
Lectem
facb2555a9 citra-qt/debug_utils: Use lock_guard everywhere
unique_lock were being used as lock_guards.
Also replaced manual lock/unlock by lock_guard for harmonization.
2015-07-26 16:28:44 +02:00
Lectem
e663751f8b citra-qt/command list: Add mask column 2015-07-26 16:23:12 +02:00
Yuri Kunde Schlesner
1762267de4 OpenGL: Make OpenGL object resource wrappers fully inline
The functions are so simple that having them separate only bloats the
code and hinders optimization.
2015-07-26 10:58:58 -03:00
Tony Wasserka
72237a9305 Merge pull request #987 from yuriks/regnames
Videocore: Don't reinitialize register name map on every query.
2015-07-26 15:56:56 +02:00
Yuri Kunde Schlesner
e130dac7de Videocore: Don't reinitialize register name map on every query
This greatly speeds up the command list debug widget.
2015-07-26 10:10:10 -03:00
Yuri Kunde Schlesner
4909a1486e Videocore: Simplify variables in vertex shader interpreter
Simplifies the code and gives a tiny speed-up.
2015-07-26 08:49:35 -03:00
Yuri Kunde Schlesner
877d2a0e48 Videocore: Replace std::stack in shader interpreter with static_vector
Shaves off 1/3rd of the vertex shader time in Fire Emblem
2015-07-26 08:49:35 -03:00
Yuri Kunde Schlesner
13347997ba VideoCore: #ifdef out some debugging routines
Some disabled debugging functionality was being called from rendering
routines in VideoCore. Although disabled, many of them still allocated
memory or did some extra work that was enough to show up in a profiler.
Gives a slight (~2ms) speedup.
2015-07-26 06:55:47 -03:00
Yuri Kunde Schlesner
00529c71d4 Address error that remained in last merge 2015-07-25 16:54:51 -03:00
Yuri Kunde Schlesner
9a0f9f12cd Merge pull request #892 from zawata/another-warning-fixes
Yet More Warning Fixes
2015-07-25 12:50:32 -07:00
Tony Wasserka
1760eb5ca6 Merge pull request #980 from Subv/more_breakpoints
Qt/GPU Breakpoints: Added three more breakpoint types.
2015-07-24 01:58:11 +02:00
Yuri Kunde Schlesner
1fe9b0b82e VideoCore: Fix values of unset components in input attribute arrays
If an input attribute array had a field with less than 4 components, the
remaining components were left unset if not specified by a default
vertex attribute. If neither mechanism would set a component, it would
assume a garbage value.

It has been verified that the hardware behavior is to instead to set the
missing components from the fixed default of (0 0 0 1). The default
vertex attribute values aren't used at all if a vertex array is
specified for that attribute.

Fixes UI graphics on Fire Emblem: Awakening, a small texturing glitch
when selecting a character in Cubic Ninja, as well as eliminating the
unset-W hack which was required for Ocarina of Time to not have
garbled triangles.

This change has been tested against hardware.
2015-07-23 16:51:25 -03:00
Yuri Kunde Schlesner
4e09202226 VideoCore: Saturate vertex colors before interpolating
During testing, it was discovered that hardware does not interpolate
colors output by the vertex shader as-is. Rather, it drops the sign and
saturates the value to 1.0. This is done before interpolation, such that
(e.g.) interpolating outputs 1.5 and -0.5 is equivalent to as if the
shader had output the values 1.0 and 0.5 instead, with the interpolated
value never crossing 0.0.

This change has been tested against hardware.
2015-07-23 16:51:24 -03:00
Subv
6c0ea5f5e8 Qt/GPU Breakpoints: Added three more breakpoint types:
* IncomingDisplayTransfer: Triggered just before a display transfer is performed.
* GSPCommandProcessed: Triggered right after a GSP command is processed.
* BufferSwapped: Triggered when the frames flip
2015-07-23 11:47:34 -05:00
bunnei
cea45af64d Merge pull request #977 from yuriks/glenable-tex2d
GL Renderer: Remove erroneous glEnable(GL_TEXTURE_2D) calls
2015-07-23 10:07:35 -04:00
Subv
7b4961e968 Rasterizer/GL: Set the border color when binding a texture. 2015-07-22 18:41:37 -05:00
Yuri Kunde Schlesner
e5c4fe0098 GL Renderer: Remove erroneous glEnable(GL_TEXTURE_2D) calls
In OpenGL 3, texturing is always enabled, and this call is invalid.
While it produced no effect in the rest of the execution, it wouldn't
have the intended effect of disabling texturing for that unit. Instead
bind a null texture to the unit.
2015-07-22 01:22:09 -03:00
bunnei
3a5352baf8 Merge pull request #968 from Subv/texture_filtering
GPU: Added registers for min and mag texture filters
2015-07-21 18:27:50 -04:00
Subv
009e34f08a GPU: Added registers for min and mag texture filters and implemented them in the hw renderer. 2015-07-21 16:26:09 -05:00
Tony Wasserka
aa6dfdb827 Merge pull request #929 from neobrain/geoshader_definitions
Pica/Shader: Add geometry shader definitions.
2015-07-21 15:24:48 +02:00
bunnei
9a3b21bcf9 Merge pull request #944 from Subv/spam
GLRasterizer: Don't try to get a pointer to the depth buffer if it doesn't exist.
2015-07-19 22:40:57 -04:00
Yuri Kunde Schlesner
ae985bf500 Pica: Correct switched S/T texture wrapping registers
This was found and hwtested by Lectem
2015-07-19 19:27:23 -03:00
Yuri Kunde Schlesner
5a75cf8fd2 Pica: Fix DP3 instruction, which wasn't assigning to the w component 2015-07-19 19:01:59 -03:00
Subv
a694caeee0 GLRasterizer: Don't try to get a pointer to the depth buffer if it doesn't exist. 2015-07-19 14:09:23 -05:00
Subv
3600c32483 Rasterizer/Textures: Fixed a bug where the I4 format would get twice the real stride.
Also added its name to the texture viewer widget
2015-07-19 13:15:23 -05:00
zawata
6933a50aeb Vertex Shader : Undo casting 2015-07-19 04:12:42 -07:00
zawata
04756bdaf6 Video_Core : Type fixes 2015-07-19 04:12:40 -07:00
zawata
f7050021de Video_Core: Finally fix pesky warning 2015-07-19 04:08:44 -07:00
zawata
017437e8d7 Video_Core : Change Tabs to Spaces
This really should be universalized, I keep getting errors creating
commits because lines I've edited use tabs instead of spaces(and yes I
did read the contributing guide and i know they are supposed to be
spaces)
2015-07-19 03:59:50 -07:00
zawata
716120da3d Video_Core : Fix Conversion Warnings 2015-07-19 03:59:49 -07:00
Tony Wasserka
33568494af Pica/Shader: Add geometry shader definitions. 2015-07-15 17:31:57 +02:00
Tony Wasserka
0ea2319f3c Merge pull request #931 from neobrain/move_default_attr_handler
Pica/CommandProcessor: Move default attribute setup to the proper position.
2015-07-15 17:22:50 +02:00
Tony Wasserka
aeec12dc33 Pica/CommandProcessor: Move default attribute setup to the proper position. 2015-07-15 17:56:38 +02:00
Tony Wasserka
d2c3ecc8d8 Pica/Clipper: Output proper number of triangles in debugging logs. 2015-07-15 18:01:43 +02:00
Lectem
d08e9b29e2 VideoCore: Implement the DOT3_RGB combiner 2015-07-14 02:16:10 -03:00
Tony Wasserka
5e79706db2 Pica: Implement stencil testing. 2015-07-13 23:54:39 +02:00
Tony Wasserka
0799b40caa Clean up command_processor.cpp. 2015-07-13 22:27:21 +02: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
Tony Wasserka
ae7120f5d9 Merge pull request #907 from Lectem/clamp_to_border
Add GL_CLAMP_TO_BORDER support.
2015-07-12 03:19:46 +02:00
Lectem
58d1c6398e Added GL_CLAMP_TO_BORDER support 2015-07-09 22:23:26 +02:00
Emmanuel Gil Peyrot
4964a359e1 Core: Cleanup hw includes. 2015-06-28 00:46:39 +01:00
Emmanuel Gil Peyrot
f48b28ad27 Core, VideoCore: Replace or fix exit() calls. 2015-06-28 00:36:55 +01:00
Emmanuel Gil Peyrot
45c4781544 CitraQt: Cleanup includes. 2015-06-28 00:36:54 +01:00
Emmanuel Gil Peyrot
22ae87530b Common: Cleanup emu_window includes. 2015-06-28 00:36:54 +01:00
Emmanuel Gil Peyrot
596b7c4f63 Common: Cleanup key_map includes. 2015-06-28 00:36:54 +01:00
zawata
92bfec0566 VideoCore: Fix floating point warning 2015-06-26 21:38:04 -07:00
Emmanuel Gil Peyrot
94fc644430 VideoCore: Log the GL driver’s vendor and renderer. 2015-06-16 00:02:23 +01:00
Yuri Kunde Schlesner
9b7d85a4f5 video_core: add extra braces around initializer
Trivial change and fixes several warnings in the clang build.
2015-06-14 00:33:08 -03:00
tfarley
26bc816d7a Renderer formatting edits 2015-06-08 19:19:15 -04:00
tfarley
66b0d799ee Render-to-texture flush, interval math fix 2015-06-08 19:18:20 -04:00
tfarley
5025b35563 Liberal texture unbind (clout menu) 2015-06-08 19:18:19 -04:00
tfarley
fa2c92a3ac Depth format fix (crush3d intro/black screens) 2015-06-08 19:18:18 -04:00
tfarley
d42275f11c Implemented glColorMask 2015-06-08 19:18:17 -04:00
archshift
0414ad20cb Merge pull request #811 from archshift/commonify
Commonify video_core utility headers
2015-05-31 09:55:29 -07:00
bunnei
33b9abb91e Pica: Use zero for the SecondaryFragmentColor source.
- This is a workaround until we support fragment lighting.
2015-05-31 01:52:42 -04:00
bunnei
dcbc653b90 rasterizer: Remove unnecessary 'using' for BlendEquation. 2015-05-31 01:52:42 -04:00
bunnei
e6ace38815 Pica: Implement LogicOp function. 2015-05-31 01:52:41 -04:00
bunnei
3b5ff61201 rasterizer: Implement AddSigned combiner function for alpha channel. 2015-05-31 01:52:40 -04:00
bunnei
1574c44586 vertex_shader: Use address offset on src2 in inverted mode. 2015-05-31 01:52:40 -04:00
bunnei
02c9fe202c Pica: Implement command buffer execution registers. 2015-05-31 01:52:39 -04:00
bunnei
4ac6c1a3b5 vertex_shader: Implement SLT/SLTI instructions. 2015-05-31 01:27:50 -04:00
bunnei
875bd29766 vertex_shader: Implement MIN instruction. 2015-05-31 01:27:49 -04:00
archshift
76690392bf Move video_core/color.h to common/color.h 2015-05-30 11:17:37 -07:00
archshift
5df2d1b5f7 Move video_core/math.h to common/vector_math.h
The file only contained vector manipulation code, and such widely-useable code doesn't belong in video_core.
2015-05-30 11:17:36 -07:00
Emmanuel Gil Peyrot
b1503b2020 Remove every trailing whitespace from the project (but externals). 2015-05-29 21:59:29 +01:00
Lioncash
951353558e gl_state: Remove unnecessary const specifier on Apply 2015-05-23 00:58:32 -04:00
Lioncash
dc587fa295 video_core/utils: Remove unused variables in GetMortonOffset 2015-05-23 00:38:37 -04:00
bunnei
1b42d55a9d Pica: Create 'State' structure and move state memory there. 2015-05-22 22:59:42 -04:00
Lioncash
23d5df9d9c gl_state: Fix a condition typo in Apply 2015-05-22 19:49:12 -04:00
tfarley
05dc633a8c OpenGL renderer 2015-05-22 15:51:18 -07:00
bunnei
f0365f28c2 Merge pull request #772 from lioncash/warn
core/video_core: Fix a few warnings when compiling on MSVC.
2015-05-18 08:08:49 -04:00
Subv
24d9416930 GPU/DefaultAttributes: Clear up a comment in command_processor 2015-05-17 14:13:11 -05:00
Subv
658c44af5c GPU/DefaultAttributes: Let the attribute data from the loaders overwrite the default attributes, if set.
closes #735
2015-05-17 11:52:17 -05: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
Lioncash
497f4bee0c pica: Add the ULL specifier in IsDefaultAttribute
This is necessary otherwise there are warnings about a 32-bit result being casted to a 64-bit value.
2015-05-14 14:23:23 -04:00
Yuri Kunde Schlesner
def5913d19 GPU: Add more fine grained profiling for vertex shader and rasterization 2015-05-12 15:59:52 -03:00
archshift
40310e2132 Implement I4 texture format
@neobrain, could you confirm that this is correct?

It's been tested with various different games and fixes different textures, including in Animal Crossing, Kirby Triple Deluxe, and SMB3D.
2015-05-10 18:59:22 -07:00
bunnei
23e8be573e rasterizer: Implemented combiner output scaling. 2015-05-09 22:26:17 -04:00
bunnei
ff767eeb40 rasterizer: Implemented AddSigned combiner op. 2015-05-09 22:12:39 -04:00
bunnei
547da374b8 rasterizer: Fixed a depth testing bug. 2015-05-09 22:12:38 -04:00
bunnei
a806b420a6 rasterizer: Implement combiner buffer input. 2015-05-09 22:12:36 -04:00
bunnei
44927f0306 rasterizer: Return zero'd vectors on error conditions. 2015-05-09 22:12:35 -04:00
bunnei
692a74c09e vertex_shader: Implement FLR instruction. 2015-05-09 22:12:34 -04:00
bunnei
f935130a0f vertex_shader: Implement MADI instruction.
nihstro: Update submodule to latest upstream/master to support MADI instruction decoding.
2015-05-09 22:12:34 -04:00
Yuri Kunde Schlesner
17a8cae003 Memory: Add GetPhysicalPointer helper function 2015-05-09 04:02:32 -03:00
Yuri Kunde Schlesner
28a9e4c1d5 Memory: Support more regions in the VAddr-PAddr translation functions
Also adds better documentation and removes the one-off reimplementation
of the function in pica.h.
2015-05-09 03:08:11 -03:00
Yuri Kunde Schlesner
1c0b87edc2 Memory: Re-organize and rename memory area address constants 2015-05-09 01:29:52 -03:00
Yuri Kunde Schlesner
4f4d230dac Merge pull request #721 from yuriks/more-cleanups
More cleanups
2015-05-07 11:45:45 -07:00
Yuri Kunde Schlesner
e1fbac3ca1 Common: Remove common.h 2015-05-07 15:45:22 -03:00
bunnei
337f1e1b96 Merge pull request #695 from Subv/crash_f
GPU: Implemented default vertex shader attributes.
2015-05-06 19:33:03 -04:00
Subv
0e5ca080a8 GPU: Implemented default vertex shader attributes.
Fixes some games crashing.
2015-05-06 18:11:46 -05:00
Emmanuel Gil Peyrot
36b48082d5 VideoCore: Remove a superfluous auto variable declaration in debug_utils. 2015-04-29 13:37:12 +02:00
Rohit Nirmal
f15c142c5e Silence some -Wsign-compare warnings. 2015-04-09 18:55:01 -05:00
Gareth Higgins
8060c519a6 Changed occurences of colour to color for consistency 2015-04-05 02:36:43 -04: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