Commit graph

2761 commits

Author SHA1 Message Date
Markus Wick
0d0f7ec662 Merge pull request #1894 from Armada651/exclusive-fix
D3D: Fix Dolphin immediately exiting exclusive fullscreen.
2015-01-19 23:29:43 +01:00
Jules Blok
332d5888eb VideoConfig: Add exclusive mode flag.
Allows the UI to easily check the current exclusive mode state.
This simplifies a few checks and prevents the user from ever getting stuck in fullscreen.
2015-01-19 22:55:21 +01:00
Tillmann Karras
804341d4fe VertexLoader: fix position offset bug 2015-01-19 17:38:40 +01:00
Tillmann Karras
4b323096ec VertexLoader_Position: remove old JIT ideas 2015-01-19 17:36:24 +01:00
Ryan Houdek
7e64869185 Merge pull request #1887 from Tilka/vertex_loader_jit
VertexLoader: rewrite x64 JIT
2015-01-18 19:48:14 -06:00
mimimi085181
0d3343d093 Make efb to texture less broken for paletted textures that are efb copies
Don't change the texID depending on the tlut_hash for paletted textures that are efb copies and don't have an entry in the cache for texID ^ tlut_hash. This makes those textures less broken when using efb to texture.

This is not really fixing those textures, but it's a step forward. The mini map in Twilight Princess for example is in grayscales with this and is more or less usable.
2015-01-19 01:31:41 +01:00
Tillmann Karras
d3f49097c5 VertexLoaderX64: register symbol for code page 2015-01-18 23:20:44 +01:00
degasus
9f13a77799 TexCache: don't try to aggressive reuse the entry
As we pool them now, freeing and reallocating them is quite fast.
2015-01-18 19:58:33 +01:00
degasus
8565f02699 TexCache: use an unordered_multimap for the tex pool 2015-01-18 19:58:33 +01:00
degasus
4639d3b1bc TexCache: also incude textures within the render target pool 2015-01-18 19:47:48 +01:00
degasus
6cd6e6546f TexCache: merge texture and rendertarget factory function 2015-01-18 19:47:48 +01:00
degasus
615ae9f106 TexCache: remove PC_TexFormat
We only support rgba32 for a while now, so there is no need to have everything in common configureable.
2015-01-18 19:47:48 +01:00
Tillmann Karras
bc5cf10ad5 VertexLoaderX64: optimize color conversions 2015-01-18 17:47:18 +01:00
Tillmann Karras
7d0cff05e9 VertexLoaderX64: make table lookup deterministic 2015-01-18 16:22:21 +01:00
Tillmann Karras
1855d56f1a VertexLoaderX64: fix a bunch of stuff
Suggestions by @degasus and @FioraAeterna.
2015-01-18 13:31:28 +01:00
Tillmann Karras
dc01e261d1 VertexLoaderX64: fix duplicate register allocation
Thanks to @shuffle2 for noticing this.
2015-01-18 13:30:21 +01:00
Tillmann Karras
f5545477e3 VertexLoaderX64: suggestions by @magumagu
- avoid register merges
- avoid redundant MOV
2015-01-18 13:30:19 +01:00
Tillmann Karras
b27ba3802e VertexLoaderX64: implement pre-Haswell fallbacks 2015-01-18 13:29:34 +01:00
Tillmann Karras
e82e9f97f5 VertexLoader: add new JIT 2015-01-18 13:29:34 +01:00
Tillmann Karras
20ded4c1e5 VertexLoader: remove old JIT 2015-01-18 12:59:33 +01:00
Tillmann Karras
bec30068a6 VertexLoader_TextCoord: reorder function list 2015-01-18 12:59:33 +01:00
Tillmann Karras
d86957944a VertexLoader_Color: clean up 2015-01-18 12:59:33 +01:00
Tillmann Karras
6a26771cd5 VertexLoader_Normal: use shorter notation 2015-01-18 12:59:33 +01:00
Tillmann Karras
20bc18cd5d VertexLoaderManager: make it nicer to read 2015-01-18 12:59:33 +01:00
Tillmann Karras
b0df4b08ec VertexLoaderTester: fix a few problems 2015-01-18 12:59:33 +01:00
Tillmann Karras
2cedc0034d DataReader: turn WritePointer into GetPointer 2015-01-18 12:59:33 +01:00
mimimi085181
96bcb09fb2 Fix another small bug with the efb2ram cache
Textures that are directly next to each other were falsely detected as overlapping.
2015-01-17 19:10:00 +01:00
Markus Wick
7069450ce5 Merge pull request #1872 from degasus/texcache
Texcache cleanup 2
2015-01-13 22:45:49 +01:00
Markus Wick
980ce440ef Merge pull request #1813 from Armada651/convergence
Add UI for per-game stereoscopy settings.
2015-01-13 00:25:38 +01:00
Markus Wick
5be85cf928 Merge pull request #1814 from phire/worldspace_untangling
Move worldpos into it's own varying.
2015-01-12 22:59:21 +01:00
Stevoisiak
cb86db7b68 Minor consistency changes
Mostly small changes, like capitalization and spelling
2015-01-12 15:18:18 -05:00
skidau
14ced85d85 Made the CPU thread wait for the GPU thread to swap, when XFB is enabled. May fix some of the "FIFO is overflowed by GatherPipe ! CPU thread is too fast!" errors. 2015-01-12 19:40:43 +11:00
degasus
22e06daf5c TexCache: recreate the entry on level missmatch 2015-01-11 23:11:04 +01:00
degasus
a9eb08b85d TexCache: Choose texture based on mipmap count 2015-01-11 22:41:04 +01:00
degasus
744b1c1624 TexCache: rewrite level calculation 2015-01-11 22:23:35 +01:00
degasus
d95e5e2b6f TexCache: create a const Config struct 2015-01-11 22:23:35 +01:00
degasus
d640453274 TexCache: cleanup max texture level 2015-01-11 22:23:35 +01:00
degasus
1261f5f7f4 TextureCache: inline arguments into texture cache 2015-01-11 22:23:35 +01:00
degasus
2b47df07b6 TexCache: use c++11 syntax for std::map::erase 2015-01-11 22:23:35 +01:00
degasus
1c98a43203 TexCache: clean up frameCount handling 2015-01-11 22:23:35 +01:00
degasus
6ba613fbd3 TexCache: unify global variables 2015-01-11 22:23:35 +01:00
degasus
774596dbed TexCache: rename OverlapsMemoryRange 2015-01-11 22:23:35 +01:00
degasus
dddcea5a9a TexCache: don't invalidate efb copys because of config changes
We'll loose data on invalidating them. So just keep them until a new copy is done.
A wrong scaled copy is better than no copy if the game doesn't creates a new one.
2015-01-11 22:23:35 +01:00
degasus
38f42da55a TexCache: remove expanded_width
This variable isn't use any more.
2015-01-10 12:22:03 +01:00
degasus
614d058db1 TexCache: don't load tex level 0 on creation
This reverts an optimization which isn't worth imo. Every texture uploads have to alloc vram and a staging buffer, so there is no need to do both in the same call.
2015-01-10 12:21:33 +01:00
degasus
8bdbe37c91 TexCache: Wipe pal hash 2015-01-10 11:55:16 +01:00
Markus Wick
f0f8384639 Merge pull request #1785 from degasus/custom_texture
VideoCommon: Custom texture handling
2015-01-08 13:29:45 +01:00
Tillmann Karras
4d1face540 Fix indentation 2015-01-07 21:51:47 +01:00
Markus Wick
d8d4c94e07 Merge pull request #1819 from Tilka/cmake
CMake: simplify some expressions
2015-01-06 09:27:59 +01:00
degasus
110d494070 VideoCommon: fix deterministic dual core 2015-01-03 21:50:51 +01:00
Tillmann Karras
6bcdb10eee CMake: simplify some expressions 2015-01-03 13:17:57 +01:00
Scott Mansell
1b771deb56 Move worldpos into it's own varying.
Previously it was packed into spare slots in clippos.xy and normal.w,
but it's ugly and more importantly it's causing bugs.

This was discovered during the debugging of a zfreeze branch, which
expected clippos.xy to be xy position coordinates in clipspace (as
the name suggested).

Turns out the stereoscopy shader had also run into this trap, modifying
clippos.x (introducing errors with per-pixel lighting).

This commit has been moved outside of the zfreeze PR for fast merging.
2015-01-03 09:23:09 +13:00
Jules Blok
b816ee1f79 VideoConfig: Define a per-game minimum convergence value instead of a percentage boost. 2015-01-02 17:07:08 +01:00
skidau
9c6795c7b7 Merge pull request #1778 from JMC47/ReadIdleFix
Remove AtBreakpoint() from ReadIdle. Fixes Rogue Squadron 2 without breaking Gladius
2015-01-02 12:00:00 +11:00
Markus Wick
ec4dfae333 Merge pull request #1747 from Armada651/intel-workaround
OGL: Work around Intel structures bug.
2015-01-01 21:41:09 +01:00
Markus Wick
f5cddd4020 Merge pull request #1790 from Armada651/master
VideoConfig: Don't disable stereoscopy if Real XFB is enabled but not in use.
2014-12-30 12:30:23 +01:00
Jules Blok
0860c02258 VideoConfig: Don't disable stereoscopy if Real XFB is enabled but not in use. 2014-12-29 19:15:31 +01:00
Jules Blok
b474c4229d VertexShaderManager: Turn off the epsilon hack for Nvidia 3D Vision. 2014-12-29 17:05:39 +01:00
Jules Blok
da058b3078 VideoConfig: Fix convergence parameter.
Looks like a rebase failed somewhere.
2014-12-29 12:03:59 +01:00
degasus
c6dd5044d6 VideoCommon: make hash independet from hires textures 2014-12-29 10:24:27 +01:00
degasus
f8184858da VideoCommon: Merge code to generate texture names on dumping 2014-12-29 10:24:27 +01:00
degasus
51bfc4c52a VideoCommon: rewrite custom textures 2014-12-29 10:24:21 +01:00
Jules Blok
3ed777b0f9 PixelShaderGen: Don't assign to input variables. 2014-12-28 23:37:05 +01:00
Jules Blok
8676891f77 VertexShaderGen: Don't read from output variables. 2014-12-28 23:28:00 +01:00
Jules Blok
3f763e6999 DriverDetails: Remove Intel Structs bug since it doesn't affect us anymore. 2014-12-28 23:28:00 +01:00
Jules Blok
7eb353b3bd VideoCommon: Don't pass structs between shaders, use the interface blocks instead. 2014-12-28 23:28:00 +01:00
Jules Blok
2c0bee5da9 DriverDetails: Update Intel bug description. 2014-12-28 23:28:00 +01:00
Markus Wick
0f87d9b669 Merge pull request #1781 from Armada651/xfb-fixes
D3D: Fix Virtual XFB viewport.
2014-12-28 22:22:27 +01:00
Ryan Houdek
15f074dd21 Merge pull request #1766 from Armada651/enable-stereo
Enable stereoscopy settings.
2014-12-28 15:14:53 -06:00
Jules Blok
e1dc033113 Renderer: Cosmetics. 2014-12-28 18:35:23 +01:00
Justin Chadwick
51b26f3397 Remove AtBreakpoint() from ReadIdle. Fixes Rogue Squadron 2 without
Breaking Gladius
2014-12-27 19:16:50 -05:00
Jules Blok
86120bfc97 GeometryShaderManager: Set viewport in SetConstants().
Setting it in the callback is too early.
2014-12-26 17:58:59 +01:00
Jules Blok
af8ac328e5 Renderer: Use old method of calculating the source rectangle. 2014-12-25 02:37:22 +01:00
Jules Blok
46bb4fd364 FramebufferManagerBase: Remove obsolete parameters. 2014-12-25 00:58:16 +01:00
Jules Blok
31a55384b3 VideoConfig: Rename "StereoMonoEFBDepth" to "StereoEFBMonoDepth"
Makes a little bit more sense.
2014-12-24 23:30:40 +01:00
Jules Blok
c424aa1ac6 GeometryShaderManager: Boost convergence value.
Most game don't require much granularity regarding the convergence value.
The default convergence was also too low, this commit increases it tenfold.
2014-12-24 23:29:40 +01:00
Jules Blok
70b898e2c6 VideoConfig: Rename Separation to Depth and update descriptions.
More accurate since it's not a real IPD and Nvidia also calls it depth.
2014-12-24 23:28:23 +01:00
Jules Blok
9590ea0cf6 VideoConfig: Turn off stereoscopy when Real XFB is enabled. 2014-12-24 18:45:24 +01:00
Jules Blok
4a86234a79 D3D: Support stereoscopic XFB blit to screen. 2014-12-24 18:45:24 +01:00
Jules Blok
b109b31f61 FramebufferManagerBase: Only allocate one layer for Real XFB. 2014-12-24 17:22:23 +01:00
degasus
01cd11a835 OGL: fix ssbo based bbox support 2014-12-22 19:10:35 +01:00
degasus
1efd00227d VertexLoader: Skip vertices with position index = -1 2014-12-21 14:29:44 +01:00
degasus
325e8e370e VertexLoader: Merge dummy functions 2014-12-21 14:13:04 +01:00
degasus
7c486a8c24 VertexLoader: Add a VertexLoader pointer to each function call 2014-12-21 14:13:04 +01:00
degasus
7edf6ec4e4 VertexLoader: Add a test loader which compares two vertex loaders 2014-12-21 14:13:04 +01:00
degasus
809117102e VideoCommon: split VertexLoaderBase from VertexLoader 2014-12-21 14:12:43 +01:00
degasus
a71c8158d9 VertexLoader: remove inlined getters
They just blow up the code.
2014-12-21 13:47:43 +01:00
degasus
6e3b2712d2 VideoCommon: Move NativeVertexFormat cache to VertexLoaderManager 2014-12-21 13:47:43 +01:00
degasus
1281798992 VertexLoaderUid: remove operator<
Not needed for unordered map.
2014-12-21 13:47:43 +01:00
degasus
ec28a80e00 VideoLoader: remove VAT_*_FRACBITS
They are used to remove the flush amounts, but as we don't
flush anymore on vertex loader changes (only on native
vertex format right now), this optimization is now unneeded.

This will allow us to hard code the frac factors within the
vertex loaders.
2014-12-21 13:47:42 +01:00
Ryan Houdek
59e1a8a1a0 Merge pull request #1736 from degasus/osd
OSD
2014-12-20 23:21:24 -06:00
degasus
a858db1d27 OGL: move osd warning for not supported stereo mode into config validation 2014-12-20 19:54:00 +01:00
degasus
ed9c14e0d5 OGL: Fix OGL3 with stereo enabled 2014-12-20 19:13:34 +01:00
degasus
3f9b52e555 OGL: draw shadows within rasterfont itself 2014-12-20 13:31:41 +01:00
Jules Blok
d09af2dbba GeometryShaderManager: Set stereo parameters in a SetConstants() call.
Doing it in SetProjectionChanged() is too early because the projection type is not set yet.
2014-12-20 13:16:26 +01:00
degasus
fb177ca04e VideoCommon: merge debug test generators 2014-12-20 13:06:29 +01:00
degasus
ffa014dd48 VideoCommon: merge debug info generators 2014-12-20 12:25:10 +01:00
Dolphin Bot
a560d8f150 Merge pull request #1716 from Armada651/geom-wireframe
VideoCommon: Handle wireframe mode in the geometry shader.
2014-12-20 12:22:40 +01:00
Jules Blok
bc3ed44050 OGL: Disable geometry shaders on Intel's Windows drivers due to broken interface blocks. 2014-12-19 23:56:02 +01:00
Ryan Houdek
b30802e2f0 Merge pull request #1721 from Sonicadvance1/fix_adreno_400
Fixes Adreno 400 performance.
2014-12-19 15:55:50 -06:00
Jules Blok
0d79e8f32b VideoCommon: Don't specify the redundant in/out qualifier if GL_ARB_shading_language_420pack is supported.
Some driver developers interpreted "can" as "must" in the OpenGL specs. (I'm looking at you AMD)
2014-12-19 22:45:39 +01:00
Ryan Houdek
8c0e26d969 Minor changes to DriverDetails
Fixes a typo where the official IMGTec drivers were said to be the OSS driver support.
Removes Mali GPU family detection just like I removed the Adreno family detection.
We don't support Mali Utgard anyway.
If we need family detection we can properly add it, right now it isn't needed.
2014-12-19 21:41:12 +00:00
Ryan Houdek
0fec69001b Fixes Adreno 400 slow performance.
Adreno 300 and 400 have the same video driver performance issues because they are very similar architectures which use basically the same thing with
everything.
There isn't any need to detect the family of the driver with Qualcomm anyway. If we ever need family specific bugs then we can implement real support
for that.
Performance issue on Adreno 400 series was due to us only detecting Adreno 300 series, and with Adreno 400 it wouldn't use the bugs, which would cause
it to use glBufferSubData, causing the huge performance hit.
2014-12-19 21:31:37 +00:00
Jules Blok
531b3941ff GeometryShaderGen: Re-emit the first vertex when wireframe mode is enabled. 2014-12-19 14:24:08 +01:00
Jules Blok
1b9fe70d7c VideoCommon: Make IsPassthrough() a function of the ShaderUid. 2014-12-19 14:10:53 +01:00
Jules Blok
925bbcb85b VideoCommon: Handle wireframe mode in the geometry shader. 2014-12-19 14:10:52 +01:00
Jules Blok
cdd9e07522 VideoCommon: Add in/out qualifiers to centroid storage qualifier.
Fixes shaders for GPUs that don't support GL_ARB_shading_language_420pack.
2014-12-19 12:19:15 +01:00
Ryan Houdek
02f22152be Merge pull request #1706 from Armada651/line-width
VideoCommon: Merge LineGeometryShader into GeometryShaderGen.
2014-12-18 19:43:12 -06:00
Jules Blok
e7e8a4f1cb GeometryShaderGen: Don't use the reserved keyword "point" in D3D. 2014-12-19 02:24:41 +01:00
Markus Wick
c7b809d46b Merge pull request #1669 from degasus/swvertexloader
Video Software Vertex Loader
2014-12-18 19:30:56 +01:00
Jules Blok
8dc3653ac9 VideoCommon: Don't pass structs between shader stages when geometry shaders are unsupported. 2014-12-18 00:37:16 +01:00
Jules Blok
69df23f725 VideoCommon: Only use interface blocks when geometry shaders are supported. 2014-12-18 00:37:14 +01:00
Jules Blok
1af3d8447a GeometryShaderManager: Set the constants within the callbacks. 2014-12-18 00:37:09 +01:00
Jules Blok
7e8f96f0d3 OGL: Don't generate a geometry shader if the backend doesn't support it.
This commit repurposes the bSupportsStereoscopy flag as the bSupportsGeometryShaders flag.
2014-12-18 00:36:49 +01:00
Jules Blok
782a5adb94 VideoCommon: Pass interface blocks between shader stages to resolve naming conflicts. 2014-12-18 00:36:49 +01:00
Jules Blok
bd6d229733 GeometryShader: Disable the geometry shader stage if it is a pass-through shader. 2014-12-18 00:36:48 +01:00
Jules Blok
f2e52b46c3 GeometryShaderGen: Cosmetics. 2014-12-18 00:36:47 +01:00
Jules Blok
0ac7103391 GeometryShaderGen: Pack uniforms more tightly. 2014-12-18 00:36:40 +01:00
Jules Blok
d115048615 GeometryShaderGen: Remove redundant declaration. 2014-12-15 23:20:56 +01:00
Jules Blok
16af00d515 GeometryShaderGen: Use signed integers for the texture offset flags. 2014-12-15 23:05:16 +01:00
Jules Blok
861fa1af23 GeometryShaderGen: Declare a prototype for EmitVertex(). 2014-12-15 22:47:43 +01:00
Jules Blok
8ae738ff30 VideoCommon: Merge PointGeometryShader into GeometryShaderGen.
This adds point-width emulation support to OpenGL.
2014-12-15 22:47:43 +01:00
Jules Blok
55e60a9c22 VideoCommon: Merge LineGeometryShader into GeometryShaderGen.
This adds line-width emulation support to OpenGL.
2014-12-15 22:47:42 +01:00
Jules Blok
275af9c5e4 VideoCommon: Assume we always use a geometry shader, not just for stereoscopy. 2014-12-15 22:47:41 +01:00
Jules Blok
382e1c22db GeometryShaderGen: Support multiple primitive types.
And make more stereoscopy code optional.
2014-12-15 22:47:41 +01:00
Jules Blok
887c669c28 GeometryShaderGen: Redefine gl_InvocationID so we can use the same variable name in both backends. 2014-12-15 22:47:40 +01:00
Jules Blok
332ba4b210 GeometryShaderManager: Upload Line/Point width constants. 2014-12-15 22:47:35 +01:00
Jules Blok
aa4242fd9c GeometryShaderGen: Pass the primitive type and always run the generator regardless of stereoscopy. 2014-12-14 21:23:20 +01:00
Jules Blok
b406e4e1f2 VideoCommon: Add a separate constants buffer for the geometry shader. 2014-12-14 21:23:13 +01:00
Jules Blok
cec5b0ce01 ShaderGen: Remove the GS_OUTPUT struct for OpenGL.
And remove the generator for it since it is no longer used outside of the geometry shader.
2014-12-14 13:28:50 +01:00
Jules Blok
fd6b588627 D3D: Define decimals in floating point numbers 2014-12-14 13:28:49 +01:00
Jules Blok
ea2bcb44f0 Cosmetics 2014-12-14 13:28:48 +01:00
Jules Blok
b06280e866 D3D: Add anaglyph stereoscopy support. 2014-12-14 13:28:47 +01:00
Jules Blok
b769da23d0 PixelShaderGen: Sample the correct texture slice. 2014-12-14 13:28:45 +01:00
Jules Blok
4f6ce0f236 D3D: Add geometry shader instancing support. 2014-12-14 13:28:44 +01:00
Jules Blok
a689db0e48 D3D: Add 3D vision support. 2014-12-14 13:28:42 +01:00
Jules Blok
9253bb7d96 D3D: Add geometry shader stereoscopy support. 2014-12-14 13:28:41 +01:00
Jules Blok
d5ebdf7a97 D3D: Add GeometryShaderCache. 2014-12-14 13:28:41 +01:00
degasus
d5eeb9b713 VideoSW: rewrite VertexLoader to use the VideoCommon one 2014-12-13 10:29:08 +01:00
skidau
d02eb3ca59 Merge pull request #1640 from rohit-n/switch-default
Silence some -Wswitch-default warnings.
2014-12-13 19:47:06 +11:00
Rohit Nirmal
b030d29067 Silence some -Wswitch-default warnings. 2014-12-11 22:23:05 -06:00
Fiora
3effd08843 FIFO: allocate slightly more for SIMD vertex loader overreads
May fix crashes in rare cases.
2014-12-10 05:52:55 -08:00
Markus Wick
4c139ca7cc Merge pull request #1609 from degasus/datareader
VideoCommon: Datareader
2014-12-10 06:53:11 +01:00
degasus
bf65c49609 PixelShaderGen: merge OGL+D3D bbox 2014-12-09 19:32:24 +01:00
degasus
3fc7e55cc4 VideoCommon: clean up VertexLoader 2014-12-09 18:56:27 +01:00
degasus
02cdb41d3d VideoCommon: Rename s_pCurBufferPointer 2014-12-09 18:56:27 +01:00
degasus
50de4238bb VertexLoader: Move the old Datareader function into VertexLoader 2014-12-09 18:56:27 +01:00
degasus
21970c4a2a VideoCommon: cleanup OpcodeDecoder 2014-12-09 18:56:27 +01:00
degasus
4b22885ed8 VideoCommon: fifo cleanups 2014-12-09 18:56:27 +01:00
degasus
27f984c02e VideoCommon: rewrite DataReader 2014-12-09 18:56:27 +01:00
Ryan Houdek
0578ec92c0 Merge pull request #1665 from Sonicadvance1/yielding_the_dual_core_world
Idle loop in GPU loop on dual core systems.
2014-12-09 02:22:27 -06:00
Markus Wick
ff4526b4a9 Merge pull request #1657 from Tinob/master
Add HW bounding Box support to d3d backend
2014-12-08 09:05:22 +01:00
Ryan Houdek
d58bba2160 Idle loop in GPU loop on dual core systems.
Previously we had decided to busy loop on systems due to Windows' scheduler being terrible and moving us around CPU cores when we yielded.
Along with context switching being a hot spot.
We had decided to busy loop in these situations instead, which allows us greater CPU performance on the video thread.
This can be attributed to multiple things, CPU not downclocking while busy looping, context switches happening less often, yielding taking more time
than a busy loop, etc.

One thing we had considered when moving over to a busy loop is the issues that dual core systems would now face due to Dolphin eating all of their CPU
resources. Effectively we are starving a dual core system of any time to do anything else due to the CPU thread always being pinned at 100% and then
the GPU thread also always at 100% just spinning around. We noted the potential for a performance regression, but dismissed it as most computers are
now becoming quad core or higher.

This change in particular has performance advantages on the dual core Nvidia Denver due to its architecture being nonstandard. If both CPU cores are
maxed out, the CPU can't effectively take any idle time to recompile host code blocks to its native VLIW architecture.
It can still do so, but it does less frequently which results in performance issues in Dolphin due to most code just running through the in-order
instruction decoder instead of the native VLIW architecture.
In one particular example, yielding moves the performance from 35-40FPS to 50-55FPS. So it is far more noticeable on Denver than any other system.
Of course once a triple or quad core Denver system comes out this will no longer be an issue on this architecture since it'll have a free core to do
all of this work.
2014-12-07 05:36:44 +00:00
Lioncash
9bcadc8029 Common: Remove locale based functions from CommonFuncs.
Since %f isn't used anymore in the shader generators, these can go.
2014-12-05 20:55:29 -05:00
Rodolfo Bogado
93b4540e19 Add HW bounding Box support to d3d backend 2014-12-05 15:03:24 -03:00
Markus Wick
f00ad2e65c Merge pull request #1656 from kayru/orthographic_projection_epsilon
Moved projection epsilon back to g_fProjectionMatrix[15]
2014-12-05 17:34:50 +01:00
Yuriy O'Donnell
7ba417b73d Moved projection epsilon back to g_fProjectionMatrix[15], which essentially scales vertices instead of just biasing. 2014-12-05 09:41:41 +01:00
Markus Wick
02dae1d1ba VideoCommon: fix include order 2014-12-04 15:15:16 +01:00
skidau
4a424e93a4 Merge pull request #1622 from FioraAeterna/texmtxfloat4
Vertex loader: optimize texmtx_write_float4
2014-12-04 13:10:22 +11:00
Rohit Nirmal
ac22a2184b Fix building with PCH disabled. 2014-12-03 19:59:47 -06:00
skidau
bfc62d2ada Merge pull request #1366 from kayru/orthographic_projection_epsilon
Added projection matrix epsilon that fixes depth clipping issues in some games
2014-12-04 09:10:36 +11:00
Lioncash
88cd27bbca Merge pull request #1392 from kayru/d3d_viewport_depth
D3D: Replaced shader-based depth range remap with viewport
2014-12-03 14:49:30 -05:00
Fiora
e3578683e3 Vertex loader: optimize texmtx_write_float4
Seems to be pretty high in the profile in some geometry-heavy games like The
Last Story, and the compiler-generated assembly is terrifyingly bad, so
SSE-ize it.
2014-12-03 11:17:05 -08:00
Ryan Houdek
5c3bbf7409 Works around broken Intel Windows video drivers.
Just use regular boolean negation in our pixel shader's depth test everywhere except on Qualcomm.
This works around a bug in the Intel Windows driver where comparing a boolean value against true or false fails but boolean negation works fine.
Quite silly.

Should fix issues #7830 and #7899.
2014-12-03 00:33:42 -06:00
Rohit Nirmal
239eaf122a VideoCommon: Fix -Wsign-compare warnings. 2014-11-29 17:40:14 -06:00
Yuriy O'Donnell
a886d8a8ee Renamed DEPTHPARAMS to PIXELCENTERCORRECTION
This shader constant was previously used for depth remapping in D3D and for pixel center correction. Now it only serves one purpose and the new name makes it clear.
2014-11-29 11:42:52 +01:00
Yuriy O'Donnell
cc2227fbc3 D3D: Replaced shader-based depth range remap with viewport
This fixes UI rendering in some games mentioned in https://code.google.com/p/dolphin-emu/issues/detail?id=7785
2014-11-29 11:11:28 +01:00
Fiora
7acd5eba17 Vertex loader: use ABI_CallFunction
Should result in faster/shorter code sequences on platforms where generated
code is close enough to the code segment (e.g. Windows).
2014-11-28 20:26:00 -08:00
Ryan Houdek
ce059769f6 Merge pull request #1439 from Armada651/ogl-stereo-3d
OGL: Stereoscopic 3D Support
2014-11-28 11:45:38 -06:00
Jules Blok
6d51455195 VideoConfig: Further optimize convergence and separation values and update their descriptions.
Previous convergence distance was much too large.
2014-11-27 16:19:26 +01:00
Lioncash
4afb85ef33 Merge pull request #1584 from degasus/master
OGL: also show driver warnings on release builds
2014-11-25 12:41:47 -05:00
Stevoisiak
6da394a4d0 More formatting and consistency fixes 2014-11-24 17:16:59 -05:00
Jules Blok
a04edbcb9a VideoConfig: Add separation and convergence modifiers to the game ini. 2014-11-24 15:10:52 +01:00
Jules Blok
f64aadd362 VideoConfig: Limit the StereoMonoEFBDepth option to the game ini and introduce a separate section for it. 2014-11-24 12:25:35 +01:00
Jules Blok
0f4d59f612 VideoConfig: Rename StereoFocalLength to StereoConvergence. 2014-11-24 11:58:38 +01:00
Jules Blok
9b2cd82da5 GeometryShaderGen: Set the properties of the VS_OUTPUT struct in the uid. 2014-11-23 14:30:12 +01:00
degasus
ed9f258b27 GeometryShader: Don't read from output variables 2014-11-23 14:30:12 +01:00
Jules Blok
106df04e8e GeometryShaderGen: Declare the vertex array size. 2014-11-23 14:30:12 +01:00
Jules Blok
422125c1a9 GeometryShaderGen: Add comments. 2014-11-23 14:30:12 +01:00
Jules Blok
24e4de3643 VideoConfig: Move stereoscopy settings to the Enhancements section. 2014-11-23 14:30:12 +01:00
Jules Blok
0f63186371 TextureCache: Add "Mono EFB Depth Copy" stereoscopy option. 2014-11-23 14:27:40 +01:00
Jules Blok
f3ddf37d07 VideoCommon: Switch to Nvidia stereoscopy offset formula. 2014-11-23 14:27:40 +01:00
Jules Blok
8210b9c915 TextureCache: Ensure that all render target textures have as many layers as the frame buffer.
Also fixes a case where the D3D code path did not initialize num_layers leading to undefined behaviour.
2014-11-23 14:27:40 +01:00
Jules Blok
27f3f804a0 ShaderGen: Only pass VS_OUTPUT between shaders if stereo 3D is enabled.
GLSL130 doesn't support passing structs between shaders.
This is not a problem for stereo 3D which has a GLSL150 requirement.
2014-11-23 14:27:40 +01:00
Jules Blok
51a4d6a4be GeometryShader: Adjust positions after projection.
By adjusting the positions in clip space we can avoid the re-projection.
2014-11-23 14:27:40 +01:00
Jules Blok
ee76c03160 TextureCache: Recompile EFB2Tex shaders when stereo 3D is toggled. 2014-11-23 14:27:40 +01:00
Jules Blok
acc65ee608 GeometryShader: Replicate missing position manipulations from vertex shader. 2014-11-23 14:27:40 +01:00
Jules Blok
3baa01fc73 VideoConfig: Use a smaller focal length default. 2014-11-23 14:27:39 +01:00
Jules Blok
f74d1b16ed OGL: Add Top-and-Bottom stereoscopy mode. 2014-11-23 14:27:39 +01:00
Jules Blok
1261bd02ca VertexShaderManager: Add stereoscopy options to swap the left and right eye. 2014-11-23 14:27:39 +01:00
Jules Blok
c3ad6e7820 PostProcessing: Add support for anaglyph stereoscopy mode. 2014-11-23 14:27:39 +01:00
Jules Blok
6c8f3fa861 VideoConfig: Add StereoMode enumeration. 2014-11-23 14:27:39 +01:00
Jules Blok
d7804a4d3e Cosmetics. 2014-11-23 14:27:39 +01:00
Jules Blok
9b22e15180 VideoConfigDiag: Add stereoscopy options group. 2014-11-23 14:27:38 +01:00
Jules Blok
4d9589b35f Cosmetics. 2014-11-23 14:27:38 +01:00
Jules Blok
9b4185ffdf ShaderGen: Make use of padding to store the stereo flag. 2014-11-23 14:27:38 +01:00
Jules Blok
f370cb386c ProgramShaderCache: Always generate a geometry shader UID, even if stereoscopy is disabled. 2014-11-23 14:27:38 +01:00
Jules Blok
6cacfad010 GeometryShader: Transform the projection within the geometry shader.
Reduces the amount of data transferred through uniforms.
The shearing transformation is reduced to a single multiplication/addition for optimization.
2014-11-23 14:27:38 +01:00
Jules Blok
4fd943aedd VideoConfig: Limit the Stereo 3D option to the OpenGL backend. 2014-11-23 14:27:38 +01:00
Jules Blok
63b37e29d1 ShaderGen: Rename "eye" to "layer".
Keeping things generic.
2014-11-23 14:26:56 +01:00
Jules Blok
d583720a59 GeometryShaderGen: Support stereoscopy on GPUs without support for instancing. 2014-11-23 14:26:56 +01:00
Jules Blok
176191dc16 ShaderGenCommon: Move uniforms into a common static string. 2014-11-23 14:24:09 +01:00
Jules Blok
fa32f751d3 ShaderGen: Handle ShaderCode objects directly.
ShaderGeneratorInterface does not have virtual function members, so we have to implement each type explicitly.
2014-11-23 14:24:09 +01:00
Jules Blok
b236c363de ShaderGen: Add a stereoscopy flag in the UID data. 2014-11-23 14:23:42 +01:00
Jules Blok
5944d15021 TextureCache: Check the number of layers before reusing a texture. 2014-11-23 14:23:42 +01:00
Jules Blok
272ea90ca5 GeometryShaderGen: Allow stereoscopy to be disabled.
Will facilitate future use of this generator for other purposes.
2014-11-23 14:23:41 +01:00
Jules Blok
d9e280e338 PixelShaderGen: Sample the correct texture layer. 2014-11-23 14:23:41 +01:00
Jules Blok
f6ea293027 VertexShaderManager: Compute stereoscopy projection matrices. 2014-11-23 14:23:41 +01:00
Jules Blok
c64486075d PostProcessing: Add layered stereoscopy support. 2014-11-23 14:23:41 +01:00
Jules Blok
2d8ec62beb Pass VS_OUTPUT structs between shaders. 2014-11-23 14:23:41 +01:00
Jules Blok
b005f61a2e Add geometry shader generator for stereo 3D. 2014-11-23 14:22:55 +01:00
degasus
6670cacddc use GL_TEXTURE_2D_ARRAY for most of our textures 2014-11-23 14:22:22 +01:00
degasus
6f3e20ac42 OGL: disable bbox writes if not supported 2014-11-22 15:17:57 +01:00
Matthew Parlane
4ef0ab2731 Merge pull request #1534 from FioraAeterna/fixd3dtex1x1
D3D: fix issues with multi-level 1x1 textures on D3D
2014-11-21 19:12:58 +13:00
Matthew Parlane
21e4e035cc Merge pull request #1281 from Stevoisiak/RenameEuRGB60
Renamed EuRGB to PAL60
2014-11-21 19:09:42 +13:00
Fiora
3ddf82a318 Vertex Loader: SSE implementations of more position/texcoord/normal formats
~35-45% faster NFS:HP2, possibly other vertex-bound games.
2014-11-20 02:13:19 -08:00
comex
fb50cb6d99 Merge pull request #1550 from degasus/bbox
OGL: implement bounding box support with ssbo
2014-11-19 20:25:23 -05:00
skidau
ca3e5ce5e1 Added an exception check when the game is close to overflowing. Fixes the fifo overflow that occurs in Battalion Wars 2.
Changed the CPEnd loop check to an exact match.
2014-11-19 12:48:09 +11:00
skidau
3d448e49c6 Update CPStatus before processing the FIFO events and force an exception check on interrupts.
Added more information into the FIFO unknown opcode error message.
2014-11-19 12:48:08 +11:00
skidau
b2c02e216c Separated out the CPU and GPU thread path to avoid clobbering.
Removed the Eternal Darkness check as it is no longer required.

Fixes issue 7835.
2014-11-19 12:48:08 +11:00
Stevoisiak
e7a82c4ded Renamed EuRGB60 to PAL60 2014-11-18 16:51:21 -05:00
degasus
c211450b99 OGL: implement bounding box support with ssbo
This implemention tries to be as accurate as the old SW implemention, but it will remove the dependcy of our vertexloader on videosw.
2014-11-17 21:20:32 +01:00
degasus
90613a1bda OpcodeDecoder: Skip recursiv display lists 2014-11-15 16:24:06 +01:00
Stevoisiak
b25e1a2eb4 Various formatting and consistency fixes 2014-11-13 22:42:18 -05:00
Fiora
733795891c D3D: fix issues with multi-level 1x1 textures on D3D
Fixes NBA 2K11, maybe other things.
2014-11-12 21:43:48 -08:00
Yuriy O'Donnell
dc08de028c Moved projection epsilon to a more reasonable place 2014-11-09 15:25:49 +01:00
Jasper St. Pierre
44b879dac2 Destroy OpenMP 2014-11-06 18:38:24 -08:00
Lioncash
f6b4b4dbba Merge pull request #1497 from lioncash/host
Host: Kill off Host_SysMessage
2014-11-06 20:41:53 -05:00
Lioncash
884ec2ed13 Host: Kill off Host_SysMessage
Equivalent facilities already exist.
2014-11-05 02:30:48 -05:00
Tillmann Karras
c34d99e40e Work around LLVM header peculiarity
Bug report: http://llvm.org/bugs/show_bug.cgi?id=21472
2014-11-04 02:29:33 +01:00
comex
08b61fdd9c Merge pull request #1465 from degasus/master
VideoCommon: Remove GetPointer in fifo code
2014-11-02 19:58:45 -05:00
Ryan Houdek
6e43562496 Merge pull request #1468 from Tilka/cleanup
Small cleanup
2014-11-02 11:02:35 -06:00
Tillmann Karras
ff41dd479b Fix warnings about non-static variables 2014-11-02 04:51:44 +01:00
Lioncash
9ab924513e VideoCommon/VideoBackends: Remove unnecessary wxWidgets references.
EmuWindow doesn't even exist anymore. wxWidgets is also decoupled from the backends.
2014-11-01 19:19:00 -04:00
degasus
cd9f0c34e4 VideoCommon: Remove GetPointer in fifo code 2014-11-01 12:24:43 +01:00
Ryan Houdek
3e82cb4628 Merge pull request #1440 from Sonicadvance1/attributeless-workaround
Implements PP shader system using attribute workaround.
2014-10-30 12:46:40 -06:00
Ryan Houdek
9da7e6ae79 Adds a DriverDetails bug to track Qualcomm attributeless rendering.
This particular issue was fixed in the v66 (07-08-2014) development drivers from Qualcomm.
To make sure we cover all drivers that may or may not have the issue fixed, make sure to mandate v95 minimum to work around the issue.
The next commit is the actual work around for post processing for this.
2014-10-29 19:58:18 -05:00
Ryan Houdek
daabcfd6fc Removes Qualcomm's rotated framebuffer bug from DriverDetails.
Due to changes in how we render to the final framebuffer we no longer encounter this bug.
With the change to post processing being enabled at all times and no longer using glBlitFramebuffer, Qualcomm no longer has the chance to rotate our
framebuffer underneath of us.
2014-10-29 19:57:51 -05:00
comex
67452c53f1 Merge pull request #1386 from booto/small-loop-fix
VideoCommon: loop bug in ShaderGenCommon.h debug
2014-10-29 17:28:10 -04:00
Ryan Houdek
bbaf8f9c0e Merge pull request #1434 from Sonicadvance1/fix-qualcomm
Fixes missing objects on Adreno hardware.
2014-10-29 10:38:23 -06:00
Ryan Houdek
6d4867e36a Fixes missing objects on Adreno hardware.
This particular bug from our friends over at Qualcomm manifests itself due to our alpha testing code having a conditional if statement in it.
This is a fairly recent breakage this time around, it was introduced in the v95 driver which comes with Android 5.0 on the Nexus 5.

So to break this issue down; In our alpha testing code we have two comparisons that happen and if they are true we will continue rendering, but if
they aren't true we do an early discard and return. This is summed up with a fairly simple if statement.

if (!(condition_1 <logic op> condition_2)) { /* discard and return */ }

This particular issue isn't actually due to the conditions within the if statement, but the negation of the result. This is the particular issue that
causes Qualcomm to fall flat on its face while doing so.

I've got two simple test cases that demonstrate this.
Non-working: http://hastebin.com/evugohixov.avrasm
Working: http://hastebin.com/afimesuwen.avrasm

As one can see, the disassembled output between the two shaders is different even though in reality it should have the same visual result.

I'm currently writing up a simple test program for Qualcomm to enjoy, since they will be asking for one when I tell them about the bug.
It will be tracked in our video driver failure spreadsheet along with the others.
2014-10-29 06:21:03 -05:00
comex
089e32ba7d Merge pull request #1307 from comex/bitset
Higher level bitset wrapper
2014-10-28 23:39:35 -04:00
Scott Mansell
ba58cc47a3 Remove old (and now incorrect) error checking code.
We will now rely on Memory::CopyFromEmu to do bounds checking.

Some games actually load palettes from 0x00000000, despite the
fact no valid palette data should ever be there.

Fixes Issue 7792.
2014-10-29 08:53:53 +13:00
skidau
b13ba0680c Merge pull request #1345 from sgadrat/fix-avidump-framerate
Fix timing of AVI files dumped on Linux
2014-10-28 12:50:01 +11:00
comex
b29e5146ec Convert some VideoCommon stuff to BitSet.
Now with a minor performance improvement removed for no reason.
2014-10-25 16:57:25 -04:00
comex
eb7f4dac50 Convert registersInUse to BitSet. 2014-10-25 16:57:25 -04:00
comex
5c2a470b97 Fix 'sizeof' which broke in my reference-to-pointer conversion. 2014-10-25 15:02:12 -04:00
skidau
bc26cb1b19 Merge pull request #1322 from degasus/ogl-pp
OGL: force enable postprocessing
2014-10-25 13:48:27 +11:00
booto
6afdff6023 VideoCommon: loop bug in ShaderGenCommon.h debug 2014-10-25 01:52:31 +08:00
skidau
716fe06289 Merge pull request #1349 from comex/good-job-dereferencing-null-on-purpose
Fix some warnings from Clang trunk in an overly aggressive manner
2014-10-24 13:03:09 +11:00
Sylvain Gadrat
3a12c50dc1 Fix timing of AVI files dumped on Linux
The timing information is set on s_scaled_frame->pts, giving precise
timing information to the encoder. Frames arriving too early (less than
one tick after the previous frame) are droped. The setting of packet's
timestamps and flags is done after the call to avcodec_encode_video2()
as this function resets these fields according to its documentation.
2014-10-23 23:34:38 +02:00
comex
1f5b1001ce Merge pull request #1342 from phire/lessGetPointer
Eliminate getPointers which are memcpyed or memset.
2014-10-23 14:42:37 -04:00
Scott Mansell
23832987b5 Revert changes preloading of RGBA8 tiles.
This path should probally be optimised, but it's out of the
scope of this PR.
2014-10-23 18:15:29 +13:00
degasus
7292ea6a04 OGL: force enable postprocessing 2014-10-23 00:21:52 +02:00
Yuriy O'Donnell
db497cc55f Added projection matrix epsilon that fixes depth clipping issues in some games 2014-10-23 00:20:47 +02:00
comex
6e774f1b64 Add missing includes where headers depend on other headers having been included first.
This is good hygiene, and also happens to be required to build Dolphin
using Clang modules.

(Under this setup, each header file becomes a module, and each #include
is automatically translated to a module import.  Recursive includes
still leak through (by default), but modules are compiled independently,
and can't depend on defines or types having previously been set up.  The
main reason to retrofit it onto Dolphin is compilation performance - no
more textual includes whatsoever, rather than putting a few blessed
common headers into a PCH.  Unfortunately, I found multiple Clang bugs
while trying to build Dolphin this way, so it's not ready yet, but I can
start with this prerequisite.)
2014-10-21 21:22:16 -04:00
comex
8492d04dfa Use pointers instead of references in GetUidData to avoid the undefined behavior of *(T *)nullptr (ewwww) 2014-10-21 21:20:05 -04:00
Scott Mansell
3aa979d7d7 Remove another 3 getPointers.
Thanks neobrain for spotting these.
2014-10-21 12:18:54 +13:00
skidau
f65bb10c93 Merge pull request #1308 from kayru/shader_generator_write_opt
Workaround for MSVC not optimizing away Write() in GeneratePixelShader
2014-10-20 17:15:53 +11:00
skidau
81efd0e87f Merge pull request #1315 from RisingFog/movie-menu-input-display
Moved Input Display to Movie Menu
2014-10-20 14:34:02 +11:00
Ryan Houdek
b3cee80faa Merge pull request #1321 from Sonicadvance1/Qualcomm-v95
Change driver details to reflect Qualcomm's changes with their v95 driver
2014-10-19 08:48:42 -05:00
Ryan Houdek
9108a11af4 Change driver details to reflect Qualcomm's changes with their v95 driver.
They fixed their issues with dynamic UBO array member access.
There are many other issues though.
2014-10-18 02:50:57 -05:00
skidau
a5674bbe84 Merge pull request #475 from kayru/d3d_state_cache
D3D: Implemented cache for dynamic render states
2014-10-18 13:11:39 +11:00
Fog
467ab1a629 Moved Input Display to Movie Menu 2014-10-17 21:08:34 -04:00
Yuriy O'Donnell
d23da7dbef Added __forceinline to AlphaTest::TestResult() to make MSVC inline it 2014-10-17 21:50:41 +02:00
Yuriy O'Donnell
5fdda135d2 Workaround for MSVC not optimizing away Write() in GeneratePixelShader
ShaderConstantProfile and ShaderUid now have an empty implementation
of Write() that uses variadic templates instead of varargs. MSVC is now
able to inline and optimize away this when necessary.
2014-10-17 21:37:42 +02:00
comex
4134a0ad54 Make some variables static (should probably adjust for coding style too, but I'm not the one who merged code with bad style...) 2014-10-16 17:03:37 -04:00
comex
1ff86a4716 Merge pull request #1295 from crudelios/remove-bbox-settings
Remove setting to enable or disable Bounding Box calculation.
2014-10-16 17:00:37 -04:00
degasus
8f403696ea DriverDetails: mark intel buffer_storage bug as fixed 2014-10-16 22:51:32 +02:00
skidau
3023abc1b5 Merge pull request #1285 from degasus/master
PixelShaderGen: replace multiplication with shift
2014-10-16 14:04:25 +11:00
Yuriy O'Donnell
2e4667caaa D3D: Moved render state cache into separate source files.
Refactored  StateCache::Get() to early out for narrower indentation.
Added comments to clarify ownership of objects returned by  StateCache::Get().
2014-10-15 20:22:39 +02:00
crudelios
d281b4d7e1 Remove setting to enable or disable Bounding Box calculation. 2014-10-15 19:02:54 +01:00
skidau
8ef21bc5e2 Merge pull request #1272 from RisingFog/sconfig-dump-frames
Move bDumpFrames to SConfig (and it's references)
2014-10-15 13:42:37 +11:00
Markus Wick
1227bd2ba6 PixelShaderGen: replace multiplication with shift
iirc both nvidia and i965 doesn't optimize this
2014-10-14 12:34:37 +02:00
skidau
9551650c42 Merge pull request #1095 from crudelios/sw-bbox
Reimplement Bounding Box calculation using the software renderer.
2014-10-13 15:57:11 +11:00
Fog
8d424b114a Move bDumpFrames to SConfig (and it's references) 2014-10-12 23:56:16 -04:00
Fog
cd0c784d5a Changed Dump Frames References 2014-10-12 19:51:13 -04:00
skidau
18c81dbc33 Merge pull request #1261 from lioncash/mesa-resonance-cascade
AVIDump: Add missing CoreTiming header
2014-10-12 14:26:23 +11:00
Lioncash
e283839b68 AVIDump: Add missing CoreTiming header
Fixes build on the mesa buildbot
2014-10-11 23:12:19 -04:00
skidau
a00ad6871c Merge pull request #1220 from RisingFog/avsync
Proper Audio/Video Dumping
2014-10-12 14:04:45 +11:00
crudelios
1e3b9ecdc1 Fix compile errors after rebase. 2014-10-10 12:44:44 +01:00
crudelios
176ea06e82 Get buildbot to compile. 2014-10-10 12:28:15 +01:00
crudelios
47c67f014f Fix linux build and various warnings.
Increase savestate version.
2014-10-10 12:28:13 +01:00
crudelios
2d4b7e3f3f Reimplement Bounding Box calculation using the software renderer. 2014-10-10 12:27:06 +01:00
Fog
fc4125cdd1 Proper Audio/Video Dumping 2014-10-09 00:06:04 -04:00
Jules Blok
39f421d45d Support the borderless fullscreen option in all backends. 2014-10-07 16:48:43 +02:00
Jules Blok
7344f752b7 Replace BorderlessFullscreenEnabled by ExclusiveFullscreenEnabled.
Special handling was associated with this function, which only applies to exclusive fullscreen.
2014-10-07 16:43:32 +02:00
Lioncash
16a74a9557 Fifo: Fix tab/space mismatches 2014-10-06 20:04:57 -04:00
Lioncash
7c05d029d3 Merge pull request #1085 from waddlesplash/refactoring
Migrate global init stuff into UICommon.
2014-10-05 21:25:44 -04:00
Augustin Cavalier
19109e2d01 Migrate global init stuff into UICommon.
This avoids code duplication in a bunch of places .
I also moved the NVIDIA Optimus export into VideoCommon.
2014-10-05 20:47:37 -04:00
comex
7f6284c2fc Change a bunch of reference function arguments to pointers.
Per the coding style and sanity.
2014-10-02 03:00:33 -04:00
Rohit Nirmal
ce8a4f5cc5 VideoCommon: Silence -Wmaybe-uninitialized warnings. 2014-09-30 16:14:18 -04:00
Tony Wasserka
13fc8e7df1 Merge pull request #578 from RachelBryk/IR
Cleanup Renderer::CalculateTargetSize(), and allow IRs higher than 4x to be set via INI.
2014-09-30 19:21:21 +02:00
comex
2eebdff01b Remove useless STACKALIGN macro.
It only ever did anything on 32-bit OS X.

Anyway, it wasn't even on the right functions, and these days
ABI_PushRegistersAndAdjustStack should handle maintaining the ABI
correctly.
2014-09-30 01:42:47 -04:00
comex
87a95727cd ReadDataFromFifo is always called with len = 32. Remove the parameter to enable optimizations.
And rename some variables around it to be less confusing.
2014-09-29 22:07:16 -04:00
skidau
007ba13cfa Merge pull request #1144 from skidau/fifo-linked
Moved the linking of the FIFO CPWritePointer near where CPWritePointer gets updated
2014-09-29 13:52:33 +10:00
comex
6c0a68d507 Add the override config option.
I hate the config code, but now is not the time to fix it...
2014-09-28 21:34:31 -04:00
comex
3a2048ea57 Add a central variable g_want_determinism which controls whether to try to make things deterministic.
It now affects the GPU determinism mode as well as some miscellaneous
things that were calling IsNetPlayRunning.  Probably incomplete.

Notably, this can change while paused, if the user starts recording a
movie.  The movie code appears to have been missing locking between
setting g_playMode and doing other things, which probably had a small
chance of causing crashes or even desynced movies; fix that with
PauseAndLock.

The next commit will add a hidden config variable to override GPU
determinism mode.
2014-09-28 21:34:31 -04:00
comex
65af90669b Add the 'desynced GPU thread' mode.
It's a relatively big commit (less big with -w), but it's hard to test
any of this separately...

The basic problem is that in netplay or movies, the state of the CPU
must be deterministic, including when the game receives notification
that the GPU has processed FIFO data.  Dual core mode notifies the game
whenever the GPU thread actually gets around to doing the work, so it
isn't deterministic.  Single core mode is because it notifies the game
'instantly' (after processing the data synchronously), but it's too slow
for many systems and games.

My old dc-netplay branch worked as follows: everything worked as normal
except the state of the CP registers was a lie, and the CPU thread only
delivered results when idle detection triggered (waiting for the GPU if
they weren't ready at that point).  Usually, a game is idle iff all the
work for the frame has been done, except for a small amount of work
depending on the GPU result, so neither the CPU or the GPU waiting on
the other affected performance much.  However, it's possible that the
game could be waiting for some earlier interrupt, and any of several
games which, for whatever reason, never went into a detectable idle
(even when I tried to improve the detection) would never receive results
at all.  (The current method should have better compatibility, but it
also has slightly higher overhead and breaks some other things, so I
want to reimplement this, hopefully with less impact on the code, in the
future.)

With this commit, the basic idea is that the CPU thread acts as if the
work has been done instantly, like single core mode, but actually hands
it off asynchronously to the GPU thread (after backing up some data that
the game might change in memory before it's actually done).  Since the
work isn't done, any feedback from the GPU to the CPU, such as real
XFB/EFB copies (virtual are OK), EFB pokes, performance queries, etc. is
broken; but most games work with these options disabled, and there is no
need to try to detect what the CPU thread is doing.

Technically: when the flag g_use_deterministic_gpu_thread (currently
stuck on) is on, the CPU thread calls RunGpu like in single core mode.
This function synchronously copies the data from the FIFO to the
internal video buffer and updates the CP registers, interrupts, etc.
However, instead of the regular ReadDataFromFifo followed by running the
opcode decoder, it runs ReadDataFromFifoOnCPU ->
OpcodeDecoder_Preprocess, which relatively quickly scans through the
FIFO data, detects SetFinish calls etc., which are immediately fired,
and saves certain associated data from memory (e.g. display lists) in
AuxBuffers (a parallel stream to the main FIFO, which is a bit slow at
the moment), before handing the data off to the GPU thread to actually
render.  That makes up the bulk of this commit.

In various circumstances, including the aforementioned EFB pokes and
performance queries as well as swap requests (i.e. the end of a frame -
we don't want the CPU potentially pumping out frames too quickly and the
GPU falling behind*), SyncGPU is called to wait for actual completion.

The overhead mainly comes from OpcodeDecoder_Preprocess (which is,
again, synchronous), as well as the actual copying.

Currently, display lists and such are escrowed from main memory even
though they usually won't change over the course of a frame, and
textures are not even though they might, resulting in a small chance of
graphical glitches.  When the texture locking (i.e. fault on write) code
lands, I can make this all correct and maybe a little faster.

* This suggests an alternate determinism method of just delaying results
until a short time before the end of each frame.  For all I know this
might mostly work - I haven't tried it - but if any significant work
hinges on the competion of render to texture etc., the frame will be
missed.
2014-09-28 21:34:29 -04:00
comex
2d4b7c5900 Make ReadDataFromFifo static. 2014-09-28 21:25:12 -04:00
comex
0ae9e398c8 Rejigger some FIFO buffer variables to be more rational.
videoBuffer -> s_video_buffer
size -> s_video_buffer_write_ptr
g_pVideoData -> g_video_buffer_read_ptr (impl moved to Fifo.cpp)

This eradicates the wonderful use of 'size' as a global name, and makes
it clear that s_video_buffer_write_ptr and g_video_buffer_read_ptr are
the two ends of the FIFO buffer s_video_buffer.

Oh, and remove a useless namespace {}.
2014-09-28 21:25:12 -04:00
comex
e86ddacb18 Changes to allow LoadCPReg to work in a preprocess mode which affects a separate state.
This state will be used to calculate sizes for skipping over commands on
a separate thread.  An alternative to having these state variables would
be to have the preprocessor stash "state as we go" somewhere, but I
think that would be much uglier.

GetVertexSize now takes an extra argument to determine which state to
use, as does FifoCommandRunnable, which calls it.  While I'm modifying
FifoCommandRunnable, I also change it to take a buffer and size as
parameters rather than using g_pVideoData, which will also be necessary
later.  I also get rid of an unused overload.
2014-09-28 21:25:06 -04:00
comex
f0131c2e09 Mechanical changes to move most CP state to a struct rather than separate globals.
The next commit will add a separate copy of the struct and the ability
for LoadCPReg to work on it.
2014-09-28 21:23:29 -04:00
comex
90638c6806 Switch to an unordered_map as a micro-optimization. 2014-09-28 21:23:29 -04:00
comex
f8452ff501 Fix threading issue with vertex loader JIT.
VertexLoader::VertexLoader was setting loop_counter, a *static*
variable, to 0.  This was nonsensical, but harmless until I started to
run it on a separate thread, where it had a chance of interfering with a
running vertex translator.

Switch to just using a register for the loop counter.
2014-09-28 21:23:28 -04:00
comex
63c62b277d Some changes to VertexLoaderManager:
- Lazily create the native vertex format (which involves GL calls) from
RunVertices rather than RefreshLoader itself, freeing the latter to be
run from the CPU thread (hopefully).

- In order to avoid useless allocations while doing so, store the native
format inside the VertexLoader rather than using a cache entry.

- Wrap the s_vertex_loader_map in a lock, for similar reasons.
2014-09-28 21:23:28 -04:00
skidau
275226c2b6 Merge pull request #1147 from RachelBryk/unicode-tex
Allow custom textures to load from unicode paths.
2014-09-28 14:54:56 +10:00
Rachel Bryk
4fe1119e52 Cleanup Renderer::CalculateTargetSize(), and allow IRs higher than 4x to be set via ini. 2014-09-25 19:50:25 -04:00
skidau
539f270c67 Added a xf.numtexgen != bp.numtextgen error log if there is a mismatch detected. 2014-09-24 10:46:09 +10:00
skidau
b4399dbdf3 Fixed the "Undeclared identifier: uv0" OpenGL shader compile error that appears in NBA2K11. 2014-09-24 00:10:45 +10:00
Rachel Bryk
4ed9b561bd Allow custom textures to load from unicode paths. 2014-09-22 12:51:30 -04:00
skidau
8c5e12cf02 Moved the linking of the FIFO CPWritePointer near where CPWritePointer gets updated. The CPWritePointer was getting updated while it was in-flight causing Pac-man Party to flicker. Fixes issue 5223. 2014-09-22 16:49:09 +10:00
Tony Wasserka
1d23c2ca8b GPU: Only load the relevant color components upon writes to the tev color registers.
The other two components need not be valid upon write, hence loading them results in glitches.

Fixes issue 6783.
2014-09-21 10:38:22 +02:00
skidau
536582b2eb Merge pull request #1129 from lioncash/casing
VideoCommon: Fix function casing in FrameBufferManagerBase
2014-09-21 15:56:17 +10:00
Lioncash
a6ffa55215 VideoCommon: Fix function casing in FrameBufferManagerBase 2014-09-20 14:54:59 -04:00
Lioncash
91438fa9e7 VideoCommon: Make zfreeze in GenMode 1 bit in size 2014-09-20 14:30:41 -04:00
Ryan Houdek
eb23882398 Merge pull request #1120 from rohit-n/muh-precompiled-headers
Fix build failing when disabling precompiled headers.
2014-09-19 17:43:42 -05:00
Rohit Nirmal
46057db37d Fix build failing when disabling precompiled headers. 2014-09-19 18:17:51 -04:00
magumagu
32e5043b29 WIP XFB scaling.
Still an ugly mess.
2014-09-19 12:33:15 -05:00
Lioncash
b06ec302d1 Remove some unnecessary semicolons 2014-09-11 13:05:31 -04:00
Ryan Houdek
71cb09f1ca Merge pull request #1027 from rohit-n/change-include
Include CommonTypes.h instead of Common.h.
2014-09-10 00:35:16 -05:00
skidau
d1439bc1db Merge pull request #1041 from RachelBryk/kill-g_CoreStartupParameter
Kill Core::g_CoreStartupParameter.
2014-09-10 11:00:42 +10:00
Rachel Bryk
f93aa7087c Kill Core::g_CoreStartupParameter. 2014-09-09 00:24:49 -04:00
Fiora
94c20db369 Rename Log2 and add IsPow2 to MathUtils for future use
Also remove unused pow2/pow2f functions.
2014-09-08 20:15:45 -07:00
Rohit Nirmal
fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
comex
c5c0b36046 Remove the inaccurately named ABI_PushAllCalleeSavedRegsAndAdjustStack (it didn't preserve FPRs!) and replace with ABI_PushRegistersAndAdjustStack.
To avoid FPRs being pushed unnecessarily, I checked the uses: DSPEmitter
doesn't use FPRs, and VertexLoader doesn't use anything but RAX, so I
specified the register list accordingly.  The regular JIT, however, does
use FPRs, and as far as I can tell, it was incorrect not to save them in
the outer routine.  Since the dispatcher loop is only exited when
pausing or stopping, this should have no noticeable performance impact.
2014-09-08 01:00:10 -04:00
comex
2dafbfb3ef Improve code and clarify parameters to ABI_Push/PopRegistersAndAdjustStack.
- Factor common work into a helper function.
- Replace confusingly named "noProlog" with "rsp_alignment".  Now that
x86 is not supported, we can just specify it explicitly as 8 for
clarity.
- Add the option to include more frame size, which I'll need later.
- Revert a change by magumagu in March which replaced MOVAPD with MOVUPD
on account of 32-bit Windows, since it's no longer supported.  True,
apparently recent processors don't execute the former any faster if the
pointer is, in fact, aligned, but there's no point using MOVUPD for
something that's guaranteed to be aligned...

(I discovered that GenFrsqrte and GenFres were incorrectly passing false
to noProlog - they were, in fact, functions without prologs, the
original meaning of the parameter - which caused the previous change to
break.  This is now fixed.)
2014-09-08 00:58:56 -04:00
shuffle2
227b79bf84 Merge pull request #1004 from comex/warning-fixes-2
Two trivial warning fixes
2014-09-06 11:56:32 -07:00
comex
917c6d324a Remove unused functions in TextureDecoder. 2014-09-06 13:32:54 -04:00
Rohit Nirmal
629ceaf2b1 Split some parts of UpdateBoundingBox into multiple lines. Also,
fix issues causing failure on Lint.
2014-09-06 09:49:27 -05:00
Rohit Nirmal
debe3999b5 Remove more dead and redundant code. 2014-09-05 23:22:48 -05:00
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
shuffle2
a9a6270982 Merge pull request #774 from magcius/texdecode-cleanup
Clean up the TextureDecoder and some related things
2014-09-04 19:37:49 -07:00
Jasper St. Pierre
76b4dbdf28 TextureDecoder: Clean up the code style
For a long time, we've had ugly and inconsistent function names here as
helpers, names like "decodebytesRGB5A3rgba" which are absolutely
incomprehensible to understand. Fix this by introducing a new consistent
naming scheme, where the above function now becomes "DecodeBytes_RGB5A3".
2014-09-04 18:36:57 -07:00
Jasper St. Pierre
0b7bed4a52 TextureDecoder: Simplify how the reference texture decoder works
Instead of having three separate functions and checking the tlutfmt in a
variety of places, just do it once in a helper method. This is already
for the slow path either in our Generic decoder or in our Software
renderer, so it doesn't matter that this is slower.

x64 will continue using the separate functions for speed.
2014-09-04 18:36:57 -07: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
32da01edec TextureDecoder: Rearrange header slightly
Put the two Decode APIs together.
2014-09-04 18:36:56 -07:00
Jasper St. Pierre
f975307016 TextureDecoder: Add some statics to some of our helper functions
I know these are already inline, but this makes it more clear that
they're helper functions to be used in this file only.
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
Jasper St. Pierre
9438a30384 VideoCommon: Start putting common texture decoding code in TextureDecoder_Common
This pulls all the duplicate code from TextureDecoder_Generic /
TextureDecoder_x64 out and puts it in a common file. Out custom font
used for debugging the texture cache is also pulled out and put in a
common "sfont.inc" file. At some point we should also combine this font
with the other six binary fonts we ship.
2014-09-04 18:36:53 -07:00
skidau
73fc45db68 Merge pull request #967 from skidau/SyncGPU-SaveState
Added the EmuRunningState check to the GPU thread's FIFO loop
2014-09-05 11:24:46 +10:00
Jasper St. Pierre
bfb2c04ace TextureDecoder: Remove unused function
GetPC_TexFormat was never used. It was added in commit d02426a, with the
only user being commented out code. The commented out code was later
removed in 9893122, but the implementation stayed.
2014-09-04 17:32:06 -07:00
Jasper St. Pierre
6682a2fadd TextureDecoder: Fix a RGBA/BGRA copy/paste typo
We were decoding to BGRA32 textures in our RGBA32 texture decoder. Since
this is the same for the BGRA32 decoder implementation, this is most
likely a copy/paste typo, rather than the texture actually being
bit-swapped. Fix this.

I'm not sure of any games that use the C14X2 texture format, so I'm not
sure this fixes any games, but it does make the code cleaner for when we
clean it up in the future, and merge some of these similar loops.
2014-09-04 17:30:53 -07:00
Jasper St. Pierre
a5297f6da8 PixelEngine: Remove unused AllowIdleSkipping and all references to it 2014-09-04 17:25:59 -07:00
Sonicadvance1
e32b2e1771 Work around Intel's failings with with buffer_storage 2014-09-04 19:03:49 -05:00
Yuriy O'Donnell
d8d9bc8c6c Render: Implemented simple render target pool
This avoids creating and destroying render targets every frame,
which is a significant CPU overhead.

Old render targets are destroyed after 3 frames.
2014-09-04 22:21:06 +02:00
Dolphin Bot
830a03c540 Merge pull request #957 from degasus/frame_skipping
VideoCommon: rewrite frame skipping code
2014-09-04 18:27:19 +02:00
degasus
8b84ddce9a VideoCommon: rewrite frame skipping code 2014-09-04 18:07:39 +02:00
degasus
ef6f6a7fa9 VideoCommon: remove XFReg copy optimization
This code is just ugly and I doubt there is a way that copying twice is faster.
2014-09-04 17:56:17 +02:00
skidau
86db0bf8c3 Added the EmuRunningState check to the GPU thread's FIFO loop so that the GPU thread services any waiting save states. This is needed for games that have the Sync GPU option enabled. 2014-09-04 22:02:21 +10:00
comex
dd5be7c0dc Merge pull request #924 from comex/fifo-command-runnable
Refactor opcode decoding a bit to kill FifoCommandRunnable.
2014-09-02 23:27:30 -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
comex
608f9bcd67 Refactor opcode decoding a bit to kill FifoCommandRunnable.
Separated out from my gpu-determinism branch by request.  It's not a big
commit; I just like to write long commit messages.

The main reason to kill it is hopefully a slight performance improvement
from avoiding the double switch (especially in single core mode);
however, this also improves cycle calculation, as described below.

- FifoCommandRunnable is removed; in its stead, Decode returns the
number of cycles (which only matters for "sync" GPU mode), or 0 if there
was not enough data, and is also responsible for unknown opcode alerts.

Decode and DecodeSemiNop are almost identical, so the latter is replaced
with a skipped_frame parameter to Decode.  Doesn't mean we can't improve
skipped_frame mode to do less work; if, at such a point, branching on it
has too much overhead (it certainly won't now), it can always be changed
to a template parameter.

- FifoCommandRunnable used a fixed, large cycle count for display lists,
regardless of the contents.  Presumably the actual hardware's processing
time is mostly the processing time of whatever commands are in the list,
and with this change InterpretDisplayList can just return the list's
cycle count to be added to the total.  (Since the calculation for this
is part of Decode, it didn't seem easy to split this change up.)

To facilitate this, Decode also gains an explicit 'end' parameter in
lieu of FifoCommandRunnable's call to GetVideoBufferEndPtr, which can
point to there or to the end of a display list (or elsewhere in
gpu-determinism, but that's another story).  Also, as a small
optimization, InterpretDisplayList now calls OpcodeDecoder_Run rather
than having its own Decode loop, to allow Decode to be inlined (haven't
checked whether this actually happens though).

skipped_frame mode still does not traverse display lists and uses the
old fake value of 45 cycles.  degasus has suggested that this hack is
not essential for performance and can be removed, but I want to separate
any potential performance impact of that from this commit.
2014-09-01 14:35:23 -04: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
4af8d9d248 VideoCommon: Clean up brace placements 2014-08-30 18:06:45 -04:00
Lioncash
1d706b2311 Get rid of C-style empty function parameter indicators 2014-08-30 15:23:48 -04:00
comex
a4a533e39f Re-enable the vertex loader JIT on OS X.
Why was it ever disabled?
2014-08-27 23:50:59 -04: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
45a4236283 A tiny restructuring to allow inlining of FifoCommandRunnable. Probably useless. 2014-08-26 12:43:39 -04:00
comex
14125cf951 Refactor SetCpStatus into two functions for from-GPU and from-CPU mode rather than a boolean parameter.
This shouldn't affect functionality.  I'm not sure if the breakpoint
distinction is actually necessary (my commit messages from the old
dc-netplay last year claim that breakpoints are broken anyway, but I
don't remember why), but I don't actually need to change this part of
the code (yet), so I'll stick with the trimmings change for now.
2014-08-26 12:43:39 -04:00
Tillmann Karras
07c7e6f35e CommandProcessor: mark some functions as static 2014-08-25 21:09:42 +02:00
Pierre Bourdon
bf93920c05 Revert "Catch broken configurations inside of the Post Processing shaders." 2014-08-25 14:33:41 +02:00
Dolphin Bot
2f2f992bc7 Merge pull request #828 from Sonicadvance1/pp-shader-catch-broken-config
Catch broken configurations inside of the Post Processing shaders.
2014-08-25 09:17:30 +02:00
Shawn Hoffman
327d35377d windows: remove now-extraneous NOMINMAX and WIN32_LEAN_AND_MEAN #defines from dolphin code.
Wrap dinput.h in a header defining DIRECTINPUT_VERSION instead of repeating it multiple places.
2014-08-23 10:48:48 -07:00
Lioncash
f17dcd2019 Merge pull request #764 from magcius/new-nogui-2
Rewrite GLInterface
2014-08-21 14:14:54 -04:00
Shawn Hoffman
4bf031c064 msvc: resolve all warnings in VideoCommon. 2014-08-19 22:33:46 -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
7d90a00bbe Qualcomm fixed screen rotation in their latest v66 development drivers.
The framebuffer is no longer rotated the wrong way around in Qualcomm's latest development drivers.
They did something right, only took them over a year.
2014-08-18 00:17:09 -05:00
Ryan Houdek
2d624780c0 Catch broken configurations inside of the Post Processing shaders.
This catches most instances of configuration failures that can happen in a post processing shader.
Gives a user a helpful error message that lets them know what they have failed to set up correctly
2014-08-17 23:59:21 -05: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
Charles Rozhon
6f34a8ac47 Removed warnings by assigning to bool 2014-08-16 14:16:10 -05:00
degasus
a64b0bf499 VertexLoader: cache NativeVertexFormat
This fix a performance regression of PR #672.
2014-08-16 12:58:52 +02: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
b8a21b3744 Add the PostProcessing class object to RenderBase in VideoCommon.
Backends will initialize this variable with their own inherited PostProcessing class object.
2014-08-13 01:05:14 -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
Jasper St. Pierre
c54fef5496 VideoBackendBase: Remove unused stub Initialize implementation
Both D3D and OGL have their own overrides, so this isn't used.
2014-08-06 21:35:52 -04:00
Pierre Bourdon
16f180524c VertexLoader: do not prepare for vertices if we need to skip them 2014-08-04 20:47:02 -07:00
Pierre Bourdon
15920d0f10 Merge pull request #394 from degasus/d3d_lighting_fix
VideoCommon: normalize light direction
2014-08-03 21:21:23 -07:00
Pierre Bourdon
4c42b38de1 Merge pull request #428 from Sonicadvance1/x86_32-removal
Remove x86_32 support from Dolphin.
2014-08-03 21:17:28 -07:00
Ryan Houdek
d9b5482840 Remove x86_32 from VertexLoader. 2014-08-03 13:44:37 -05:00
Pierre Bourdon
6f715a1fbe VertexLoader: Remove more global state dependencies (this time IndexGenerator and VertexManager) 2014-08-02 09:34:39 -07:00
Pierre Bourdon
83838a645f Merge pull request #690 from Armada651/d3dfullscreen_fixes
Exclusive fullscreen fixes
2014-07-30 16:28:56 -07:00
Jules Blok
3b5625c76b VideoConfig: Ignore Borderless Fullscreen setting when the backend does not support exclusive fullscreen.
This was expected to be handled by VerifyValidity(), but that only verifies the validity of the INI files.
2014-07-30 12:15:58 +02:00
Jules Blok
4501aeefbe CFrame: Check borderless fullscreen setting before enabling exclusive fullscreen in the video config.
Fixes a bug where "Use Fullscreen" would initialize into exclusive fullscreen regardless of the borderless fullscreen setting.

Also relieves the need for the video renderer to check the borderless fullscreen setting each time.
2014-07-30 12:15:26 +02:00
Lioncash
522a5c35ad Convert some more header inclusions into forward declarations 2014-07-29 20:55:07 -04:00
Jules Blok
ec402a0d5f FPSCounter: Initialize members. 2014-07-26 14:37:18 +02:00
Pierre Bourdon
8e865f3848 Merge pull request #506 from Armada651/d3dfullscreen
D3D: Add exclusive fullscreen support.
2014-07-26 13:22:11 +02:00
Jules Blok
6724ce6275 Cosmetic changes based on feedback on PR #506. 2014-07-26 13:04:39 +02:00
Jules Blok
bd9953d97e Remove the 3D Vision hack.
The hack was needed because the Nvidia 3D Vision heuristics are documented to only support surfaces that are the same size as the backbuffer. This would be the case if you enabled the hack and selected the "Auto (Window Size)" internal resolution.

However, on recent drivers the same effect is achieved by selecting the "Auto (Multiple)" internal resolution. Therefore the hack is no longer required.
2014-07-26 12:45:10 +02:00
Pierre Bourdon
73f9a22e2e VertexLoader: Remove global state dependency on g_nativeVertexFmt 2014-07-26 01:35:09 +02:00
Pierre Bourdon
78c3a22060 VertexLoader: take the VAT object directly for RunVertices 2014-07-24 01:51:37 +02:00
Pierre Bourdon
069801a7d1 VertexLoader: Simplify SetVAT 2014-07-24 01:25:23 +02:00
Pierre Bourdon
20369743a4 VertexLoaderUID: remove global state dependency 2014-07-24 01:12:12 +02:00
Jules Blok
009b4dd376 Exit exclusive fullscreen when the stop confirmation is shown.
Also have the renderer remember its own fullscreen state. This is done to prevent a case where we exit exclusive fullscreen through the configuration and a focus shift at the same time. In this case the renderer would fail to detect that the fullscreen state was changed.
2014-07-21 20:50:48 +02:00
Jules Blok
cd94ff1966 VideoConfig: Add "Borderless Fullscreen" option.
This option will disable exclusive fullscreen for users who prefer the old behaviour.
2014-07-20 22:02:57 +02:00