Commit graph

439 commits

Author SHA1 Message Date
shuffle2
0576046fdd Merge pull request #972 from Sonicadvance1/fix-intel-windows
Work around Intel's failings with buffer_storage
2014-09-05 11:06:49 -07:00
Fiora
07e0c917c6 Revert "JIT64: optimize CA calculations" 2014-09-05 10:26:30 -07:00
comex
97420c6ec6 Merge pull request #852 from FioraAeterna/optimizeca
JIT64: optimize CA calculations
2014-09-05 11:52:02 -04:00
comex
e7f03dd066 Merge pull request #948 from comex/vao-fix
Don't switch to a vertex array object of 0.
2014-09-05 11:46:28 -04:00
Jasper St. Pierre
ea1245d191 TextureDecoder: Pass the TLUT address straight into the texture decoder
This removes the requirement for the TextureDecoder to have access to
global texture memory.
2014-09-04 18:36:57 -07:00
Jasper St. Pierre
fcd4ecc942 TextureDecoder: Add an enum for the TLUT formats
Quick code cleanup. The enum names and values come from libogc.
2014-09-04 18:36:56 -07:00
Jasper St. Pierre
a8e591dc73 VideoCommon: Remove support for decoding to ARGB textures
The D3D / OGL backends only ever used RGBA textures, and the Software
backend uses its own custom code for sampling. The ARGB path seems to
just be dead code.

Since ARGB and RGBA formats are similar, I don't think this will make
the code more difficult to read or unable to be used as
reference. Somebody who wants to use this code to output ARGB can simply
modify the MakeRGBA function to put the shift at the other end.
2014-09-04 18:36:56 -07:00
Sonicadvance1
e32b2e1771 Work around Intel's failings with with buffer_storage 2014-09-04 19:03:49 -05:00
Lioncash
cf390ba537 OGL: Make rasters 2D array static in RasterFont 2014-09-03 22:59:13 -04:00
Lioncash
89557f6c2f OGL: Fix constant casing in RasterFont 2014-09-03 22:59:05 -04:00
comex
b48e059173 Don't switch to a vertex array object of 0.
This causes glDrawArrays to fail in core profile, and thus on OS X, see:

http://renderingpipeline.com/2012/03/attribute-less-rendering/

There must be something bound, even though it is not used.

Fixes #7599.  I'm not sure this is actually the best way to fix it,
since AFAICT it makes a nonobvious assumption that *something* will be
bound before the first attributeless rendering in
TextureConverter::DecodeToTexture, but it's what degasus suggested and
seems to work.
2014-09-03 00:10:45 -04:00
Shawn Hoffman
266992684d msvc: remove some remnants of SDL and DSound from projects and general cleanup. 2014-09-01 21:27:44 -07:00
Fiora
b51aa4fa89 Rename Log2 and add IsPow2 to MathUtils for future use
Also remove unused pow2/pow2f functions.
2014-09-01 20:41:07 -07:00
Pierre Bourdon
494a60e41b VertexLoader: Change VtxDesc to use u64 instead of u32
This is required to make packing consistent between compilers: with u32, MSVC
would not allocate a bitfield that spans two u32s (it would leave a "hole").
2014-09-01 11:18:02 +02:00
Lioncash
844d45b26e D3D: Clean up brace placements 2014-08-30 18:06:47 -04:00
Lioncash
1d706b2311 Get rid of C-style empty function parameter indicators 2014-08-30 15:23:48 -04:00
Ryan Houdek
c908a1e212 Merge pull request #882 from Sonicadvance1/fix-pp-blackness
Fix PostProcessing shader garbage on screen.
2014-08-28 10:29:03 -05:00
Ryan Houdek
ca68526ec7 Clear the texture used by PP shaders prior to use.
We were generating a texture without ever setting the data to a known value.
This happened on the old code as well, just that PP shaders are receiving some love and people are using it and noticing some of its issues.
2014-08-28 10:16:39 -05:00
comex
e31d6feaa2 Unify three types of non-FIFO requests to the GPU thread around Common::Event and Common::Flag.
The only possible functionality change is that s_efbAccessRequested and
s_swapRequested are no longer reset at init and shutdown of the OGL
backend (only; this is the only interaction any files other than
MainBase.cpp have with them).  I am fairly certain this was entirely
vestigial.

Possible performance implications: efbAccessReady now uses an Event
rather than spinning, which might be slightly slower, but considering
the slow loop the flags are being checked in from the GPU thread, I
doubt it's noticeable.

Also, this uses sequentially consistent rather than release/acquire
memory order, which might be slightly slower, especially on ARM...
something to improve in Event/Flag, really.
2014-08-26 12:43:39 -04:00
comex
e0f35e0e59 Remove unused declarations. 2014-08-23 15:26:59 -04:00
Lioncash
f17dcd2019 Merge pull request #764 from magcius/new-nogui-2
Rewrite GLInterface
2014-08-21 14:14:54 -04:00
Shawn Hoffman
5471c71819 msvc: resolve all warnings in VideoBackends/OGL. 2014-08-19 22:33:47 -07:00
Shawn Hoffman
fd16065979 msvc: resolve all warnings in VideoBackends/Software. 2014-08-19 22:33:47 -07:00
Jasper St. Pierre
63f1a16969 Core: Remove UpdateFPSDisplay
This is effectively unused, as the window handles that we pass to the
GLInterface are window handles for the frame which isn't ever a real
toplevel window. Host_UpdateTitle is what actually sets the proper title
on the render window.
2014-08-19 10:05:58 -04:00
Jasper St. Pierre
7ca8d8dfc7 Core: Don't pass through a reference to the window handle
Now that MainNoGUI is properly architected and GLX doesn't need to
sometimes craft its own windows sometimes which we have to thread back
into MainNoGUI, we don't need to thread the window handle that GLX
creates at all.

This removes the reference to pass back here, and the g_pWindowHandle
always be the same as the window returned by Host_GetRenderHandle().

A future cleanup could remove g_pWindowHandle entirely.
2014-08-19 10:05:58 -04:00
Ryan Houdek
32fb61816b Fixes PP-shaders on !Mesa targets.
Seems mesa has a quirk where
define THING(x) (#x)
is the same as
define THING(x) (##x)

Didn't realize I messed it up since it just worked since I only tested on Mesa.
2014-08-17 21:28:59 -05:00
Pierre Bourdon
9e2fbaf405 Merge pull request #823 from KScorp/depthmatrixshaders
Fixed depth matrix shaders in OpenGL and Direct3D to be more precise.
2014-08-17 22:08:42 +02:00
Lioncash
15a3b30e27 Merge pull request #790 from lioncash/ogl-cleanup
Small OGL cleanup
2014-08-17 15:17:04 -04:00
KScorp
97dce14368 Fixed depth matrix shaders in OpenGL and Direct3D to be more precise. Fixes some graphical glitches in some games. 2014-08-17 04:43:11 -05:00
Lioncash
f0743e2571 OGL: Removed some unnecessary preprocessor directives from Render.cpp.
scrshotThread was also unused so that is removed as well.

Also added the algorithm header, since we use min and max here.
2014-08-16 23:57:06 -04:00
shuffle2
2270c3e90a Merge pull request #797 from shuffle2/msvc-pch
Windows: Use a shared precompiled header for dolphin code under Source/
2014-08-16 14:58:28 -07:00
Lioncash
f11e587fa4 OGL: Get rid of an unnecessary WIN32 ifdef in main.cpp 2014-08-15 16:16:53 -04:00
Lioncash
7e3d1050f0 OGL: Add static to a function in NativeVertexFormat 2014-08-15 14:16:04 -04:00
Lioncash
32953fd968 OGL: Clean up parameters for some functions. 2014-08-15 14:15:23 -04:00
Lioncash
960b54670c OGL: Fix brace and body placements
Also got rid of void argument specifiers. These are a carryover from C.
2014-08-15 14:12:29 -04:00
Shawn Hoffman
f1b82a34b2 Windows: Use a shared precompiled header for dolphin code under Source/ 2014-08-14 23:51:13 -07:00
Ryan Houdek
cced3b4a18 Change OpenGL's post processing to use the new VideoCommon PP object.
Let's OpenGL's PostProcessing namespace be changed to a class inheriting from VideoCommon's PostProcessing class.
2014-08-13 01:05:15 -05:00
Ryan Houdek
6bdc32c54a Add the VideoCommon PostProcessing class.
This class loads all the common PP shader configuration options and passes those options through to a inherited class that OpenGL or D3D will have.
Makes it so all the common code for PP shaders is in VideoCommon instead of duplicating the code across each backend.
2014-08-13 01:05:10 -05:00
Lioncash
bcd10bfda6 Software: Fix function casing in SWRenderer 2014-08-10 22:28:18 -04:00
Lioncash
f9f46f33d6 Software: Fix some if-statement body placements 2014-08-10 22:28:17 -04:00
Lioncash
34eb0c6e1c Software: Fix over-indentation of SetupQuad() 2014-08-10 22:28:16 -04:00
Lioncash
4129cdeb4d Software: Apply static to some functions 2014-08-10 22:28:15 -04:00
Lioncash
568bdec598 Software: Fix function casing in TextureEncoder 2014-08-10 22:28:14 -04:00
Lioncash
2918f46d8b Software: Fix the formatting and function casing in Vec3.h 2014-08-10 22:28:04 -04:00
Lioncash
6625d9cba5 Software: Fix various brace styling errors 2014-08-10 21:18:38 -04:00
Lioncash
b95d9b43de Software: Make an enum into a static constant in DebugUtil.cpp 2014-08-10 20:51:10 -04:00
Lioncash
b050657322 Software: Make constants char_width and char_height private in RasterFont 2014-08-10 20:48:28 -04:00
Lioncash
6b49ddfec9 Software: Get rid of an unnecessary format string in SWmain.cpp 2014-08-10 04:38:12 -04:00
Lioncash
2b341bb267 D3D: Remove an unnecessary call to Host_GetRenderWindowSize() 2014-08-08 19:21:41 -04:00
Lioncash
a66a7e1344 Isolate D3D and Software Renderer from wxWidgets code 2014-08-03 20:28:50 -04:00