Commit Graph

149 Commits

Author SHA1 Message Date
bunnei 3f69c2039d Shader: Define a common interface for running vertex shader programs. 2015-08-15 17:33:44 -04: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 9a0f9f12cd Merge pull request #892 from zawata/another-warning-fixes
Yet More Warning Fixes
2015-07-25 12:50:32 -07: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
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
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 f7050021de Video_Core: Finally fix pesky warning 2015-07-19 04:08:44 -07:00
Tony Wasserka 33568494af Pica/Shader: Add geometry shader definitions. 2015-07-15 17:31:57 +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 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 22ae87530b Common: Cleanup emu_window includes. 2015-06-28 00:36:54 +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
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 e6ace38815 Pica: Implement LogicOp function. 2015-05-31 01:52:41 -04:00
bunnei 02c9fe202c Pica: Implement command buffer execution registers. 2015-05-31 01:52:39 -04: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
bunnei 1b42d55a9d Pica: Create 'State' structure and move state memory there. 2015-05-22 22:59:42 -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
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
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 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
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
Subv 0e5ca080a8 GPU: Implemented default vertex shader attributes.
Fixes some games crashing.
2015-05-06 18:11:46 -05:00
Subv 1248e291f0 GPU: Added the stencil test structure to the Pica Regs struct. 2015-03-09 20:13:21 -05:00
Subv 414b0741c4 GPU: Implemented more depth buffer formats.
This fixes the horizontal lines in Picross E, Cubic Ninja, Cave Story 3D and possibly others
2015-03-09 20:12:39 -05:00
bunnei 34c31db14a GPU: Added RGB565/RGB8 framebuffer support and various cleanups.
- Centralizes color format encode/decode functions.
- Fixes endianness issues.
- Implements remaining framebuffer formats in the debugger.
2015-03-03 18:26:03 -05:00
archshift 7f9ee69a2b Added RGBA5551 compatibility in the rasterizer
This allows Virtual Console games to display properly.
2015-02-27 19:15:08 -08:00
archshift 302f0b32f5 Remove duplication of INSERT_PADDING_WORDS between pica.h and gpu.h 2015-02-19 22:26:25 -08:00
Tony Wasserka 1561204342 Pica/BlendUnit: Implement separate color/alpha blend equations. 2015-02-18 14:50:28 +01:00
Tony Wasserka e11fb96408 Pica/TextureEnvironment: Treat texture combiner source 1 as the PrimaryColor.
Not really sure where the difference is, but some applications seem to use this 1:1 the same way...
2015-02-18 14:50:28 +01:00
Tony Wasserka 04cd06d5c2 Pica/TextureEnvironment: Add support for the MAD-like texture combiners and clean up texture environment logic. 2015-02-18 14:50:28 +01:00
Tony Wasserka 6ca752ccbc Pica/TextureUnit: Implement mirrored repeating texture wrapping. 2015-02-18 14:50:28 +01:00
Tony Wasserka 8bd7a896ea Pica: Fix a bug in the register definitions, relating to texture wrapping. 2015-02-18 14:50:28 +01:00
Tony Wasserka aaf30ca4ee Pica/OutputMerger: Implement color format checking. 2015-02-18 14:50:28 +01:00
Tony Wasserka 6c26ec72a5 Pica/CommandProcessor: Properly implement shader load destination offset registers. 2015-02-18 14:02:59 +01:00
Darius Goad 536958fb29 Add more blend equations from 3dbrew 2015-02-09 20:41:06 -06:00
bunnei 1eb591d6fd Rasterizer: Implement the other color and alpha modifiers. 2015-02-04 22:15:51 -05:00
bunnei 72cc512b1e Pica: Implement blend factors. 2015-01-31 01:40:05 -05:00
bunnei b522cf4e6a Pica: Implement color/alpha channel enable. 2015-01-27 22:03:34 -05:00
bunnei b2c55bf772 Rasterizer: Implemented alpha testing. 2015-01-27 14:39:17 -05:00
bunnei ff83d23ed5 GPU: Implement the remaining depth testing functions. 2015-01-25 23:34:14 -05:00
Tony Wasserka f2b74b4fb3 Pica/Rasterizer: Add ETC1 texture decompression support. 2015-01-13 14:42:40 -08:00
Tony Wasserka 0f49424022 Pica/Rasterizer: Implement backface culling. 2014-12-31 16:32:55 +01:00
Tony Wasserka e229ff8c83 Pica/Rasterizer: Implement depth testing. 2014-12-31 16:32:55 +01:00
Tony Wasserka 36291bc3f6 Pica: Add output merger definitions. 2014-12-31 15:35:54 +01:00
Tony Wasserka b7a48c422a Pica/CommandProcessor: Add support for integer uniforms. 2014-12-31 15:33:09 +01:00
Yuri Kunde Schlesner 8369ee5803 Rasterizer: Pre-divide vertex attributes by W
Execute the division-by-W for perspective-correct interpolation of
values in the clipper, moving them out of the rasterization inner loop.
2014-12-29 02:08:11 -02:00
bunnei 2188af4a65 Merge pull request #322 from chinhodado/master
More warning cleanups
2014-12-22 00:12:43 -05:00
bunnei 0de6a08d75 Merge pull request #291 from purpasmart96/license
License change
2014-12-21 16:05:44 -05:00
Chin 0199a7d9ef More warning cleanups 2014-12-21 10:58:55 -05:00
purpasmart96 ebfd831ccb License change 2014-12-20 21:20:24 -08: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 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 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
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
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 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 8db65723d2 Build fix for something which shouldn't have compiled successfully to begin with. 2014-12-09 16:37:34 +01:00
Lioncash eb5054e6eb Fix warnings in video_core 2014-10-07 20:35:13 -04:00
Lioncash 6cc7c73b80 Core: Fix warnings in gpu.cpp 2014-09-13 22:55:41 -04:00
Tony Wasserka 9679d231df Pica/Rasterizer: Add texturing support. 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 f37e39deb9 Pica: Add debug utilities for dumping shaders. 2014-08-25 22:03:18 +02:00
archshift 662a1993e6 float24: Remove private default constructor
Fixes building with clang.
2014-08-13 02:54:16 -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
Tony Wasserka 1a43f69477 Pica: Add register definition for vertex loading and rendering. 2014-08-12 13:47:31 +02:00
Tony Wasserka 76a586de49 Pica: Add command processor. 2014-08-12 13:47:30 +02:00
Tony Wasserka 98ad16a45b Pica: Add float24 structure.
24-bit floating points are used internally for calculations on the GPU, however the current code will still emulate that with 32-bit floating points.
In the future we might want to accurately perform the calculations with correct bitness in the future, but for now we just wrap the calculations around this class.
2014-08-12 13:46:24 +02: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 4c2bff61e5 Pica: Use some template magic to define register structures efficiently. 2014-06-12 06:10:54 -04:00
Tony Wasserka f82410e633 Further refine GPU command list debugging. 2014-06-12 06:10:53 -04:00
Tony Wasserka b0051b2203 Refine command list debugging functionality and its qt interface. 2014-06-12 06:10:52 -04:00
Tony Wasserka 50b2b73be4 video core: added PICA definitions file. 2014-06-12 06:10:51 -04:00