Commit graph

2299 commits

Author SHA1 Message Date
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
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