Commit graph

137 commits

Author SHA1 Message Date
magumagu
39d439fc48 Opcode decoding: handle missing opcodes 0x88 etc.
Hardware testing shows that they do the same thing as the 0x80 family of
opcodes: they draw quads.
2014-05-10 20:33:28 -07:00
magumagu
369c0c4ce2 Opcode decoding: 0xC0 isn't a valid command.
Fix our opcode decoders to handle this appropriately.
2014-05-08 15:49:19 -07:00
Tony Wasserka
fe65474cc4 Software renderer: Update a reference link. 2014-04-24 00:42:08 +02:00
Tillmann Karras
d523d2002b Fix "warning: unused variable 'skipFrames'" 2014-04-19 04:59:37 +02:00
magumagu
685d612c8c Software backend: don't skip red component in TEV. 2014-04-15 14:05:12 -07:00
magumagu
5e1c6aba33 Software backend: make TEV rounding match hardware.
Formulas stolen from gxtest.  (Not sure how "==" got turned into "!=", but
I'm pretty confident the patched version is correct.)
2014-04-15 14:04:46 -07:00
degasus
96ffbe345d VideoSoftware: remove const memory usage of DebugUtil 2014-04-12 13:32:53 +02:00
Tony Wasserka
306b9afd1e Merge pull request #224 from magumagu/swrender-deletepixelfork
Software backend: Delete forked PixelEngine.
2014-04-11 20:01:23 +02:00
magumagu
d0f89b2b63 SWBackend: Fix code style. 2014-04-05 13:08:00 -07:00
magumagu
bdcd5ba39b SW backend: make shaders work on Intel/Windows.
Apparently the Intel shader compiler doesn't implement "#if" correctly...
so use "#ifdef" instead.
2014-03-29 13:10:43 -07:00
magumagu
0661efea84 Software backend: Delete forked PixelEngine.
Mostly just zapping a bunch of duplicated code; the only interesting thing
going on here is the changes to the performance counter implementation.
2014-03-29 12:07:20 -07:00
Pierre Bourdon
664c8d30a0 Remove all trailing whitespaces from our codebase. 2014-03-29 11:05:44 +01:00
Tony Wasserka
1dead05cae Software renderer: Properly calculate tev combiner output.
As pointed out by dolphin-emu/hwtests@461476112.
2014-03-26 00:23:58 +01:00
Tony Wasserka
a8c8db8da7 Software renderer: Use color combiner configuration for alpha combiner compare mode inputs.
As pointed out by dolphin-emu/hwtests@f684f2498.
2014-03-26 00:23:58 +01:00
Tony Wasserka
16105db709 BPMemory: Make use of BitField in a number of structures. 2014-03-25 23:57:58 +01:00
Tony Wasserka
8941f19cdb BPMemory: Expose the pixel_format and zformat fields in PE_CONTROL as enumerations. 2014-03-25 23:57:58 +01:00
Tony Wasserka
77a7bab5ae BPMemory: Use the new BitField class in two selected structures. 2014-03-25 23:57:57 +01:00
Tillmann Karras
2fcaca0603 More range-based loops and overrides 2014-03-17 02:55:55 +01:00
Pierre Bourdon
8d679e76d2 Merge pull request #164 from lioncash/cstr-cull
Kill off some usages of c_str.
2014-03-15 00:57:56 +01:00
Tony Wasserka
3a6389992e PixelShaderGen: Treat UV coordinates like S17.7 integers (they're still stored as float, though). 2014-03-14 22:31:30 +01:00
Tony Wasserka
0238a56816 PixelShaderGen: Change indirect texture matrix uniforms to use integers. 2014-03-14 22:31:18 +01:00
Tony Wasserka
cff952c397 PixelShaderGen: Use integer math for indirect tev stage texcoord calculation. 2014-03-14 22:30:27 +01:00
Lioncash
a82675b7d5 Kill off some usages of c_str.
Also changes some function params, but this is ok.
Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
2014-03-14 13:51:23 -04:00
Matthew Parlane
31cfc73a09 Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
2014-03-11 00:35:07 +13:00
Tillmann Karras
d802d39281 clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-03-09 21:14:26 +01:00
Tillmann Karras
c89f04a7c5 clang-modernize -loop-convert
and some manual adjustments
2014-03-09 21:11:59 +01:00
Tillmann Karras
d461b3f33c SW renderer: add missing ClearCurrent()
courtesy of degasus
2014-03-06 01:53:29 +01:00
Ryan Houdek
4f02132f93 Make our architecture defines less stupid.
Our defines were never clear between what meant 64bit or x86_64
This makes a clear cut between bitness and architecture.
This commit also has the side effect of bringing up aarch64 compiling support.
2014-03-04 09:36:59 -06:00
Tony Wasserka
1bdf232fed videosoftware: More coding style fixes. 2014-03-03 19:03:15 +01:00
Tony Wasserka
c6c6d20014 videosoftware: Provide a more elaborate comment on the FifoPlayer support hack. 2014-03-01 18:52:19 +01:00
Scott Mansell
17231418ef videosoftware: Added hack to bypass xfb just so fifoplayer works.
Fifoplayer depends on the old behaviour of videosoftware (and the other
hardware backends in non virtual/real xfb modes) where the framebuffer
gets rendered directly to the screen.

Really fifoplayer should call BeginFrame/EndFrame when it finished
rendering a frame, but adding this hack back in is simpler.
2014-03-01 18:45:24 +01:00
Tillmann Karras
315a8ba1c0 Various changes suggested by cppcheck
- remove unused variables
- reduce the scope where it makes sense
- correct limits (did you know that strcat()'s last parameter does not
  include the \0 that is always added?)
- set some free()'d pointers to NULL
2014-02-28 12:43:20 +01:00
Pierre Bourdon
83b7bb64aa Make Common/ mostly IWYU clean (and fix errors in rest of the project detected by this change). 2014-02-22 23:37:29 +01:00
Pierre Bourdon
6d8df311a3 Merge pull request #88 from lioncash/relative-includes
Relative includes
2014-02-20 02:08:44 +01:00
Pierre Bourdon
425f9dcd51 Fix more header sorting issues in VideoBackends/ (now check-includes clean). 2014-02-20 01:01:11 +01:00
Pierre Bourdon
a18e8249a4 Merge pull request #79 from Tilka/nits
Silence some Windows compiler warnings
2014-02-18 14:19:38 +01:00
Lioncash
2afe215271 Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
Lioncash
3fd87a7636 Second and final pass of clearing out tabs. 2014-02-17 02:19:41 -05:00
Lioncash
6c4ee1753a Fix some vertical alignments
ie. uses spaces for alignment.
2014-02-16 20:12:05 -05:00
Pierre Bourdon
92f8d93e96 Remove the old MMIO access "interface". 2014-02-16 19:22:40 +01:00
Pierre Bourdon
f8f14c83a3 MMIO: Port the SW CP/PE MMIOs to the new interface.
Migration is now complete.
2014-02-16 19:22:40 +01:00
Pierre Bourdon
4129b30494 MMIO: Port the VideoCommon CP MMIOs to the new interface (and provide framework for other video related mappings). 2014-02-16 19:22:40 +01:00
Tillmann Karras
0d6ab2c658 Silence some Windows compiler warnings
by adding explicit type casts.
2014-02-16 16:59:45 +01:00
lioncash
d2038049f5 Replace all include guard ifdefs with "#pragma once" 2014-02-10 18:07:16 -05:00
Ryan Houdek
8d25e12085 Merge pull request #54 from lioncash/cleanup
Cleanup mismatching struct/enum indentations.
2014-02-09 19:26:15 -06:00
Lioncash
fc30597f7a Remove function Xchg from SWStatistics.cpp. Like the one previous, this can be replaced with std::swap 2014-02-09 19:55:44 -05:00
Lioncash
ebb48d019e Clean up some struct indentations
Also cleaned up the indentations of some variable declarations.
2014-02-09 19:40:11 -05:00
Lioncash
40182a48a5 Cleanup enum indentations. 2014-02-09 16:16:10 -05:00
Pierre Bourdon
8ab6ed4b49 SWCommandProcessor: fix the CPReg structure fields
This structure fields should match byte-to-byte the layout of MMIO registers:
it is addressed using the MMIO reg address when doing a CP MMIO read. This was
unfortunately not the case, causing CP reads to be mostly broken with the
software renderer.
2014-02-04 01:16:14 +01:00
Scott Mansell
dd42af9a7c Videosoftware: Fix memory cleanup code. 2014-01-25 11:06:18 +13:00
Scott Mansell
8b2c540544 Finally Merge branch 'videosoftware-xfb'
This adds xfb support to the videosoftware backend, which increases it's
accuracy and more imporantly, enables the usage of many homebrew apps
which write directly to the xfb on the videosoftware backend.

Conflicts:
	Source/Core/VideoBackends/Software/SWRenderer.cpp
	Source/Core/VideoBackends/Software/SWmain.cpp
2014-01-21 00:10:00 +13:00
Ryan Houdek
683dbc09ac Stop building GLExtensions.cpp twice(One in GL, one in software). We don't need to build it twice, this'll save a bit of time in the build process.
Also a bit of spacing cleanup.
2014-01-19 11:37:37 -06:00
Ryan Houdek
839df31347 Merge of GL-AutoChoose.
This branch is the final step of fully supporting both OpenGL and OpenGL ES in the same binary.
This of course only applies to EGL and won't work for GLX/AGL/WGL since they don't really support GL ES.
The changes here actually aren't too terrible, basically change every #ifdef USE_GLES to a runtime check.

This adds a DetectMode() function to the EGL context backend.
EGL will iterate through each of the configs and check for GL, GLES3_KHR, and GLES2 bits
After that it'll change the mode from _DETECT to whichever one is the best supported.
After that point we'll just create a context with the mode that was detected
2014-01-18 04:11:59 +00:00
Ryan Houdek
fc1f8291d6 [GLExtensions] Make sure to initialize our function pointers with VideoSoftware as well. 2014-01-17 16:05:07 +01:00
Ryan Houdek
17955fa025 [GLExtensions] Still had a GLEW lib hanging out in the CMake file for the software renderer. 2014-01-17 16:01:49 +01:00
Ryan Houdek
71681de81a [GLExtensions] Initial code drop for GLExtensions. This drops GLEW entirely from the codebase. This has been tested on Android and Linux+ATI. Of course untested on Windows and Apple. Also untested with Linux + EGL but should be fine there. There are most likely a couple of extensions I'm missing which would result in null pointer runs but not bad for the initial commit.
Conflicts:
	CMakeLists.txt
	Externals/GLew/glew.vcxproj
	Externals/GLew/glew.vcxproj.filters
	Source/Core/VideoBackends/OGL/CMakeLists.txt
	Source/Core/VideoBackends/OGL/GLFunctions.cpp
	Source/Core/VideoBackends/OGL/GLFunctions.h
	Source/Core/VideoBackends/OGL/GLUtil.h
	Source/Core/VideoBackends/OGL/Render.cpp
	Source/VSProps/Base.props
2014-01-17 15:50:51 +01:00
Jasper St. Pierre
34692ab826 Remove unnecessary Src/ folders 2013-12-31 14:03:19 -05:00
Jasper St. Pierre
43e618682e Convert all vcxproj files to UNIX line endings 2013-12-31 14:03:18 -05:00
Tony Wasserka
bbde075420 Software renderer: Add a zfreeze related TODO. 2013-12-30 20:18:53 +01:00
Tony Wasserka
07820aaa9e Software renderer: Add linear interpolation of fog range adjustment factors. 2013-12-16 18:42:46 +01:00
Ryan Houdek
f9ff0bc55d Have our OpenGL/ES context creation be less stupid. 2013-12-12 12:43:49 -06:00
Ryan Houdek
eb3b933dd0 Remove all instances of OpenCL in the Dolphin Project. A brief history of OpenCL in Dolphin. OpenCL was originally added to the Dolphin codebase 1 month after it was released with OS X Snow Leopard in 2009. OpenCL was one of the largest group projects that Dolphin ever has had. The OpenCL texture decoder was originally aded with version 1.0 of the OpenCL spec; This version didn't have the capability of a OpenCL-OpenGL interop which would allow for uploading textures once and have it decoded directly to a OpenGL texure. This was to be worked out when the OpenCL 1.1 spec was released and allowed the interop. This work has never been done, and no one in the team is willing to work on it for various reasons. OpenCL has had the unreasonable expectation that it increases the performance of video games that require a large amount of EFB copies like NSMBW. In reality, enabling OpenCL just put the graphics card in a higher power mode which increased the game speed. This is due to the unfortunate effect of Dolphin tending to not push GPUs out of their lower frequency power savings modes. Thanks to everyone that had contributed to the OpenCL texture decoder. 2013-12-11 15:15:55 -06:00
Scott Mansell
43d1678fb2 Dynamically allocate color textures.
Saves ram when the video software backend isn't being used.
2013-11-24 00:52:17 +13:00
Scott Mansell
afe47ff847 Increase res of color texture to match PAL Super Smash Bros: Brawl
The pal version of SSBB has a 640x568 xfb, which is larger than the efb.
Increase the size of the static textures and put in some runtime checks
to prevent buffer overruns.
2013-11-24 00:15:08 +13:00
Scott Mansell
e720ea7837 Remove c++11 feature so VC2010 can be happy. 2013-11-23 23:44:05 +13:00
Scott Mansell
786e49ed48 Merge branch 'master' into videosoftware-xfb
Conflicts:
	Source/Core/VideoBackends/Software/Src/EfbCopy.cpp
	Source/Core/VideoBackends/Software/Src/SWRenderer.cpp
	Source/Core/VideoBackends/Software/Src/SWRenderer.h
	Source/Core/VideoBackends/Software/Src/SWVideoConfig.cpp
	Source/Core/VideoBackends/Software/Src/SWmain.cpp
2013-11-23 23:20:45 +13:00
Matthew Parlane
f4a1f183b9 std::string can't be passed to ... format. 2013-11-17 11:28:11 +13:00
Matthew Parlane
ea3990a41b Don't pass char* to std::string.
Windows was fine with this :(
2013-11-17 11:25:12 +13:00
Matthew Parlane
33d8166620 Use IOFile for TextureToPng to support non-ascii
Changed save texture/screenshot uses to std::string
Removed unneeded new/delete calls when dealing with temp data.
2013-11-17 11:14:38 +13:00
Ryan Houdek
4a9c8e6f55 Change software rasterizer screenshot code due to change in api just now. 2013-11-16 15:37:40 -06:00
Matthew Parlane
71d70d896f Api was too confusing for people. 2013-11-17 10:34:34 +13:00
Ryan Houdek
2025f00f88 Woops, vim copy and paste issue with a double include. 2013-11-16 09:41:01 -06:00
Ryan Houdek
e8a4cc0f71 Screenshot capability of Software rasterizer for feature completness. 2013-11-15 22:08:08 -06:00
Matthew Parlane
3a13dfdd9b [OGL] Textures now save to PNG not TGA 2013-11-16 15:59:59 +13:00
Jordan Cristiano
2703cae8d3 Fixed ZComploc and Zfreeze values being incorrectly saved. 2013-11-14 03:15:03 -05:00
comex
21610c2e54 Run code through clang-modernize -add-override to add 'override' decls. 2013-11-03 20:54:05 -05:00
comex
c579637eaf Run code through the advanced tool 'sed' to remove trailing whitespace. 2013-11-03 20:54:05 -05:00
comex
965b32be9c Run code through clang-modernize -loop-convert to create range-based for loops, and manually fix some stuff up. 2013-11-03 20:54:01 -05:00
Shawn Hoffman
ccd30024b3 Update to VS2013 and a slew of build-related updates. Notes:
* Currently there is no DEBUGFAST configuration. Defining DEBUGFAST as a preprocessor definition in Base.props (or a global header) enables it for now, pending a better method. This was done to make managing the build harder to screw up. However it may not even be an issue anymore with the new .props usage.
* D3DX11SaveTextureToFile usage is dropped and not replaced.
* If you have $(DXSDK_DIR) in your global property sheets (Microsoft.Cpp.$(PlatformName).user), you need to remove it. The build will error out with a message if it's configured incorrectly.
* If you are on Windows 8 or above, you no longer need the June 2010 DirectX SDK installed to build dolphin. If you are in this situation, it is still required if you want your built binaries to be able to use XAudio2 and XInput on previous Windows versions.
* GLew updated to 1.10.0
* compiler switches added: /volatile:iso, /d2Zi+
* LTCG available via msbuild property: DolphinRelease
* SDL updated to 2.0.0
* All Externals (excl. OpenAL and SDL) are built from source.
* Now uses STL version of std::{mutex,condition_variable,thread}
* Now uses Build as root directory for *all* intermediate files
* Binary directory is populated as post-build msbuild action
* .gitignore is simplified
* UnitTests project is no longer compiled
2013-10-26 17:55:38 -07:00
Lioncash
97cd42f5c3 Remove some unnecessary includes as well as simplifying exisiting ones if possible. 2013-10-19 19:58:56 -04:00
comex
de1773affb Basic precompiled header support for Linux/OS X. Shaves 20-30% off full rebuild time on my system. 2013-10-17 00:07:35 -04:00
comex
cffe6ba3fd Fix TextureEncoder.h 2013-10-16 23:20:51 -04:00
Matthew Parlane
414ed6ef63 C.K. should fix his website before throwing stones at obsolete xml. 2013-10-09 23:56:16 +13:00
Matthew Parlane
fbcc41c18e Fix references for OGL, SW and D3D. 2013-10-09 23:49:00 +13:00
Matthew Parlane
eb480a406c Fix Windows vcxproj files. 2013-10-08 17:52:18 +13:00
Jasper St. Pierre
9920362581 Fix MSVC project files
yay relative paths
2013-10-07 18:50:21 -04:00
Jasper St. Pierre
a7c7208103 Put Plugins/ in Core/, rename to VideoBackends 2013-10-07 10:37:01 -04:00