Commit graph

877 commits

Author SHA1 Message Date
degasus
d95e5e2b6f TexCache: create a const Config struct 2015-01-11 22:23:35 +01:00
degasus
1c98a43203 TexCache: clean up frameCount handling 2015-01-11 22:23:35 +01:00
Markus Wick
6c46f27709 Merge pull request #1501 from degasus/texture_creation
D3D: remove load texture on creation optimization
2015-01-11 01:01:18 +01:00
mimimi085181
56e93f8fdd Update size_in_bytes of texture cache entries when copying efb to ram 2015-01-10 13:47:52 +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
Jules Blok
031096c8d4 FramebufferManager: Remove unnecessary sampler declaration.
It's not needed and invalid when declared for the geometry shader.
2015-01-09 14:53:56 +01:00
Tillmann Karras
4d1face540 Fix indentation 2015-01-07 21:51:47 +01:00
Markus Wick
f080e0221e Merge pull request #1758 from rohit-n/build-pch
Fix building with PCH disabled.
2015-01-06 20:42:50 +01:00
Markus Wick
25fac0282c Merge pull request #1764 from Armada651/safe-exclusive
D3D: Only try to apply exclusive mode when the renderer is in focus.
2015-01-06 11:00:47 +01:00
Jules Blok
399b6248d1 D3D: Further improve exclusive fullscreen state checking. 2015-01-05 00:01:22 +01:00
Rohit Nirmal
bad5aef5df Fix building with PCH disabled. 2015-01-04 10:45:35 -06:00
Jules Blok
3b9c070ee0 D3D: Only try to apply exclusive mode when the renderer is in focus. 2015-01-04 16:42:16 +01:00
Patrick A. Ferry
069a0864c0 Scale the offset to the IR scale
The offset between fbStride and fbWidth will need to be scaled by IR
scale.
2015-01-03 22:05:22 +00:00
Tillmann Karras
6bcdb10eee CMake: simplify some expressions 2015-01-03 13:17:57 +01:00
Patrick A. Ferry
eebd7da443 Fix stretching with Virtual XFB in D3D
This change matches the behaviour of OpenGL.

This should make Ty the Tasmanian Tiger 3 stretch across the whole
screen. There are other games with this same issue but I have not any.

See issue #6750 for details
2015-01-03 01:28:49 +00:00
Jules Blok
dddaa11595 OGL: Fix stereoscopy not being applied properly while the game is running. 2015-01-03 01:36:43 +01:00
Jules Blok
582a15deb3 PostProcessing: Mark all shaders constant. 2015-01-02 20:03:20 +01:00
Jules Blok
26a9afa0e7 Anaglyph: Use matrices instead of vectors. 2015-01-02 14:32:42 +01:00
Jules Blok
491de39325 PixelShaderCache: Implement Dubois algorithm in anaglyph shader. 2015-01-02 03:06:11 +01:00
Jules Blok
e3969f763e PostProcessing: Use Dubois algorithm for anaglyph shader. 2015-01-02 03:02:28 +01: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
Ryan Houdek
479d1e56c3 Merge pull request #1783 from degasus/disablelogs
OGL: disable driver warnings fetch
2015-01-01 14:12:02 -06:00
Jules Blok
29e05c5ff8 Stereo3D: Don't rely on GetEFBLayers() when dealing with shaders.
Shaders may be compiled before the FramebufferManager is initialized.
2014-12-29 11:19:55 +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
degasus
1ed41672f5 OGL: disable driver warnings fetch
This did give a decent slowdown on some drivers.
2014-12-28 22:31:24 +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
Jules Blok
89de7e0526 Renderer: Invalidate the FramebufferManager if the XFB mode is changed.
Fixes incorrect texture sizes after switching XFB modes.
2014-12-28 18:26:25 +01:00
Jules Blok
730a6e5f4b D3D: Fix Virtual XFB viewport.
Looks like I was incorrect about swapping the bottom and top members.
2014-12-28 17:34:19 +01:00
Jules Blok
81d1b7f0c2 XFBEncoder: Cosmetics. 2014-12-28 16:30:48 +01:00
Jules Blok
d7037ae492 PixelShaderCache: Don't use GetDimensions() for the sample count.
This function is bugged on Windows 7, and statically declaring the sample count is trivial anyway.
2014-12-27 14:45:15 +01:00
Markus Wick
7764a5ed9d Merge pull request #1733 from degasus/glx
GLX: try to get an OpenGL 3.3 core context
2014-12-26 13:31:41 +01:00
Jules Blok
833513f384 XFBEncoder: Sample the first layer of the resolved EFB texture.
Using the multisampled EFB texture is invalid, as the XFB encoder does not have a multisampling shader.
2014-12-25 12:09:35 +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
49137c7c2c FramebufferManager: Return framebuffer target size in GetTargetSize(). 2014-12-25 00:57:52 +01:00
Jules Blok
1bbb323e97 D3D: Remove obsolete Real XFB codepath. 2014-12-24 23:55:04 +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
4a86234a79 D3D: Support stereoscopic XFB blit to screen. 2014-12-24 18:45:24 +01:00
Jules Blok
a845aeeb3d FramebufferManager: Copy all EFB layers to the XFB. 2014-12-24 18:45:19 +01:00
Jules Blok
59bea317d7 GeometryShaderCache: Cosmetics. 2014-12-24 17:22:24 +01:00
Jules Blok
b109b31f61 FramebufferManagerBase: Only allocate one layer for Real XFB. 2014-12-24 17:22:23 +01:00
Jules Blok
a9364cd5db OGL: Support stereoscopic XFB blit to screen. 2014-12-24 17:22:23 +01:00
Jules Blok
12412ac5b7 FramebufferManager: Copy all EFB layers to the XFB framebuffer. 2014-12-24 17:22:22 +01:00
Markus Wick
5526b39320 Merge pull request #1748 from Armada651/stereo-format
FramebufferManager: Support stereoscopic EFB format changes.
2014-12-24 11:02:17 +01:00
Jules Blok
b2efbdaf44 Cosmetics. 2014-12-23 13:16:09 +01:00
Jules Blok
01718eafa6 FramebufferManager: Use a separate layer variable. 2014-12-23 13:16:03 +01:00
Jules Blok
737bc0e7ad PixelShaderCache: Support stereoscopic EFB format changes. 2014-12-21 15:46:12 +01:00
Jules Blok
ba242d27c8 FramebufferManager: Support stereoscopic EFB format changes. 2014-12-21 15:25:58 +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
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
Ryan Houdek
829132d465 Merge pull request #1732 from Sonicadvance1/stupid_android_garbage
Work around broken Android garbage.
2014-12-20 15:29:38 -06:00
Ryan Houdek
f2d998c938 Work around broken Android garbage.
This fixes running Dolphin on the Nexus 9.

Android's EGL stack has internal arrays that they use for tracking OpenGL function usage. Probably has something to do with their OpenGL profiling
garbage that used to be in ADT.

Android has three of these arrays, each statically allocated.
One array is for all GLES 1.x functions
One array is for all GLES 2.0/3.0/3.1 and a couple of extensions they deem worthy of being in this array.
The last array is for all function pointers grabbed via eglGetProcAddress that isn't in the other two arrays.

The last array is the issue that we are having problems with. This array is 256 members in length.
So if you are pulling more than 256 function pointers that Google doesn't track in their internal array, the function will return NULL and yell at you
in logcat.

The Nvidia Shield Tablet gets around this by replacing part of the EGL stack with their own implementation that doesn't have this garbage.
The Nexus 9 on the other hand doesn't get away with this. So we pull >100 more function pointers than the array can handle, and some of those we need
to use.

The workaround for this is to grab OpenGL 1.1 functions last because we won't actually be using those functions, so we get away with not grabbing the
function pointers.
2014-12-20 15:15:57 -06:00
Dolphin Bot
f978d141c8 Merge pull request #1720 from Armada651/stereo-msaa
FramebufferManager: Support resolving a multi-layered EFB
2014-12-20 20:35:36 +01: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
Jules Blok
d37b65c117 FramebufferManager: Support resolving a multi-layered EFB in OGL. 2014-12-20 16:08:00 +01:00
degasus
3322c55484 OGL: don't clear the stencil buffer
We don't have one. This should remove some spamming of the nvidia driver.
2014-12-20 15:17:20 +01:00
degasus
3f9b52e555 OGL: draw shadows within rasterfont itself 2014-12-20 13:31:41 +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
degasus
e6137407ba GLX: try to get an OpenGL 3.3 core context 2014-12-20 10:57:34 +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
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
Jules Blok
761749e07f FramebufferManager: Support resolving a multi-layered EFB in D3D. 2014-12-19 22:37:28 +01:00
Jules Blok
0ae082fb61 FramebufferManager: Return the depth texture instead of the color texture in GetResolvedEFBDepthTexture() when AA is enabled. 2014-12-19 22:37:28 +01: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
1b9fe70d7c VideoCommon: Make IsPassthrough() a function of the ShaderUid. 2014-12-19 14:10:53 +01:00
Jules Blok
c9e469f832 D3DState: Remove wireframe rasterizer support. 2014-12-19 14:10:52 +01:00
Jules Blok
925bbcb85b VideoCommon: Handle wireframe mode in the geometry shader. 2014-12-19 14:10:52 +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
Markus Wick
c7b809d46b Merge pull request #1669 from degasus/swvertexloader
Video Software Vertex Loader
2014-12-18 19:30:56 +01:00
shuffle2
717e155ce1 Merge pull request #1689 from kayru/d3d_efb_copy_fix
D3D: Fixed D3D validation error during EFB to texture copy
2014-12-18 02:59:51 -08:00
Jules Blok
1f84f4632d OGL: Check OpenGL version for geometry shader support. 2014-12-18 00:37:16 +01:00
Jules Blok
93ce95b48e D3D: Use ROUND_UP macro for rounding buffer sizes. 2014-12-18 00:37:15 +01:00
Jules Blok
3d9dfad6a2 D3D: Set the geometry shader before every draw call.
And refactor the VertexManager draw call.
2014-12-18 00:36:50 +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
bd6d229733 GeometryShader: Disable the geometry shader stage if it is a pass-through shader. 2014-12-18 00:36:48 +01:00
Jules Blok
2850c9a206 VertexManager: Disable culling for lines and points. 2014-12-18 00:36:47 +01:00
Yuriy O'Donnell
5688c27610 D3D: Moved setting texture by slot mask into StateManager 2014-12-17 23:41:26 +01:00
Markus Wick
98292682fe Merge pull request #1709 from unknownbrackets/attributeless-fix
OGL: Attempt a larger buffer to workaround 7946
2014-12-17 14:20:54 +01:00
Unknown W. Brackets
5b51f5a801 OGL: Attempt a larger buffer to workaround 7946. 2014-12-16 22:20:45 -08:00
magumagu
31bcdb8f2f D3D+OGL: choose blendenable over logicopenable.
No sane game should turn on both logicopenable and blendenable in the same
blend mode, but not every game is sane. Fixes issue 6009.
2014-12-15 20:16:25 -08: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
382e1c22db GeometryShaderGen: Support multiple primitive types.
And make more stereoscopy code optional.
2014-12-15 22:47:41 +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
6c7bed25a5 Cosmetics 2014-12-14 13:29:27 +01:00
Jules Blok
fd6b588627 D3D: Define decimals in floating point numbers 2014-12-14 13:28:49 +01:00
Jules Blok
a6ac7dd5bd D3D: Fix Nvidia 3D Vision memory leak 2014-12-14 13:28:49 +01:00
Jules Blok
6fe7d530ed PixelShaderCache: Fix MSAA shaders.
Various typos were introduced due to lack of testing.
2014-12-14 13:28:48 +01:00
Jules Blok
b2e73400be 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
4b3e784949 TextureCache: Add stereoscopy support for EFB to texture copies. 2014-12-14 13:28:47 +01:00
Jules Blok
3355d8086d D3DUtil: Use a geometry shader to clear all slices. 2014-12-14 13:28:46 +01:00
Jules Blok
799697ad80 PSTextureEncoder: Add texture array support.
We only read the first slice, because EFB2RAM doesn't support texture arrays.
2014-12-14 13:28:46 +01:00
Jules Blok
ced733ccdf PixelShaderCache: Add texture array support to static shaders. 2014-12-14 13:28:46 +01:00
Jules Blok
d58e389f67 D3D: Recreate the framebuffer when stereoscopic 3D is toggled. 2014-12-14 13:28:45 +01:00
Jules Blok
7c05b9a6d0 D3D: Set the geometry shader for triangle primitives. 2014-12-14 13:28:44 +01:00
Jules Blok
4f6ce0f236 D3D: Add geometry shader instancing support. 2014-12-14 13:28:44 +01:00
Jules Blok
ca766747a8 D3DTexture: Bind textures as texture arrays. 2014-12-14 13:28:43 +01:00
Jules Blok
cf12c93c86 D3D: Use common GetEFBLayers() instead of GetEFBSlices(). 2014-12-14 13:28:43 +01:00
Jules Blok
9d9bd5341d D3D: Restore viewport after stereo blitting. 2014-12-14 13:28:43 +01:00
Jules Blok
a689db0e48 D3D: Add 3D vision support. 2014-12-14 13:28:42 +01:00
Jules Blok
e53705784b D3D: Add SBS/TAB output 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
Jules Blok
9a312e2b83 D3D: Use two slices for most of our textures. 2014-12-14 13:28:40 +01:00
Unknown W. Brackets
1c316eb18c OGL: Correctly define attrib 0 in attributeless. 2014-12-13 21:02:15 -08:00
skidau
15f7e63cc2 Merge pull request #1650 from unknownbrackets/attributeless-fix
OGL: Unbind the active VAO before attributeless rendering
2014-12-14 14:42:07 +11:00
Jules Blok
14792c3402 D3DState: Set the pixel shader in m_current when linking dynamically. 2014-12-13 22:09:34 +01:00
Jules Blok
a2b43b21fe D3DState: Always update the m_pending members in the setters.
Fixes unintentional behaviour when a setter is called twice before the state is applied.
2014-12-13 21:51:18 +01:00
skidau
68a4cc6b72 Merge pull request #1686 from degasus/master
OGL: fix efb pokes
2014-12-13 23:38:07 +11: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
Yuriy O'Donnell
764aee6995 D3D: Fixed D3D validation error during EFB to texture copy
Texture was being bound as a render target while still being set as a shader resource.
D3D automatically unbinds the SRV in this case and generates a validation error.
The fix is to manually unbind SRV, render into it and then re-bind to old slots.
2014-12-13 00:32:08 +01:00
degasus
1a5d791964 OGL: fix efb pokes 2014-12-12 16:11:17 +01:00
Rohit Nirmal
b030d29067 Silence some -Wswitch-default warnings. 2014-12-11 22:23:05 -06:00
Dolphin Bot
971a95aece Merge pull request #1503 from kayru/d3d_optimization_cache
D3D: Filter redundant API calls by caching state in StateManager
2014-12-11 23:38:35 +01:00
Unknown W. Brackets
029f8c3c3f OGL: Ensure a VAO is bound for all attributeless.
Unfortunately, some of these cases are not well tested, because I don't
know how to reproduce them.
2014-12-11 09:42:49 -08:00
Unknown W. Brackets
de2abbed17 OGL: Move attributeless VAO creation to Init.
This way we won't trash an existing bound VBO by mistake.
2014-12-11 01:00:37 -08:00
Unknown W. Brackets
290fd545e6 OGL: Bind the attributeless VAO before EFB copies.
Fixes crashes in Zack & Wiki using an older NVIDIA driver.
2014-12-10 23:19:18 -08:00
Unknown W. Brackets
0861cb8744 OGL: Properly reset the attributeless VAO. 2014-12-10 20:11:48 -08: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
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
Rodolfo Bogado
cf7512683c spaces cleanup 2014-12-07 20:28:27 -03:00
Yuriy O'Donnell
e90604c5ed D3D: Fixed debug validation error
A texture was still being bound when OMSetRenderTargets is called.
State manager resource cache must be flushed to unbind it.
This fixes The Last Story cut scene rendering.
2014-12-07 18:46:05 +01:00
Yuriy O'Donnell
4392d3cd55 D3D: Fixed StateManager member function name case 2014-12-07 18:45:50 +01:00
Yuriy O'Donnell
80459c52e9 D3D: StateManager m_current and m_pending are now value-initialized 2014-12-07 18:45:49 +01:00
Yuriy O'Donnell
0e18e9e80d D3D: Removed cull mode changes for lines and points
Fixed include order and whitespace
2014-12-07 18:45:20 +01:00
Yuriy O'Donnell
6e9226650d D3D: Implemented context state caching
This avoids most of the redundant API calls.
2014-12-07 18:17:19 +01:00
Ryan Houdek
ce7c52eca0 Enables stereo rendering with OpenGL ES 3.1 + AEP.
If the host device supports GLES 3.1 and AEP we can have stereo rendering.
Just need to make sure to grab the correct function pointer that GL_EXT_geometry_shader provides, and enable AEP in the shaders.

We can't just check if AEP is in the extension list for support because Qualcomm has failed once more.
With the Nexus 6 it reports support for AEP but doesn't support OpenGL ES 3.1, which is an impossible combination.
From reports on their forum it seems that attempting to use any AEP things results in nothing happening, seems like a stub implementation.
2014-12-07 11:14:35 +00:00
Unknown W. Brackets
b19cff8a08 OGL: Use a fixed VAO for attributeless rendering.
Instead of abusing whatever VAO is previously bound, which might have
enabled arrays.

Only used in one instance currently, which fixes a crash with older
NVIDIA drivers.
2014-12-06 19:27:49 -08:00
Rodolfo Bogado
c2de38c115 use SAFE_RELEASE to make code cleaner 2014-12-06 10:46:15 -03:00
Rodolfo Bogado
817d025328 small spacing fixes 2014-12-05 23:54:34 -03:00
Rodolfo Bogado
c7bb8fba9e Added support test for bbox and some naming corrections 2014-12-05 18:51:23 -03:00
Rodolfo Bogado
93b4540e19 Add HW bounding Box support to d3d backend 2014-12-05 15:03:24 -03:00
Jules Blok
42bb48bd46 FramebufferManager: Bind only the first framebuffer layer when the EFB only has one layer. 2014-12-05 00:36:10 +01:00
skidau
7bc78827ed Merge pull request #1574 from degasus/profiler
Common: Add a built-in profiler
2014-12-04 13:22:31 +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
Jules Blok
40920b3823 OGL: Don't use texture arrays for MSAA.
This solves a performance regression on AMD cards.
We don't currently support stereoscopy for MSAA anyway.
2014-12-03 01:39:43 +01:00
degasus
94d9d138d9 Common: Add a built-in profiler 2014-12-03 00:50:41 +01:00
Yuriy O'Donnell
36b886cb80 D3D: Viewport min and max depth is now clamped to [0..1] range 2014-11-29 11:42:53 +01:00
Yuriy O'Donnell
1fe3d07cbd D3D: Removed somewhat mysterious comment
It would be good to know which games exactly exhibited the issue.
2014-11-29 11:11:28 +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
Ryan Houdek
38dfc970df Fixes OpenGL ES rendering.
sampler2DArray doesn't have a default precision, so we need to set it ourselves.
2014-11-29 01:27:47 -06:00
Ryan Houdek
2d2baec65d Merge pull request #1595 from degasus/master
OGL: require GL version >= 3.0
2014-11-28 22:37:35 -06: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
degasus
c63a38088a OGL: require GL version >= 3.0
This "fix" a crash because of glVertexAttribI only available on gl3+ contexts.
2014-11-26 21:33:47 +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
Lioncash
aa92797f93 Merge pull request #1582 from Stevoisiak/newImprovedFormatting
More formatting and consistency fixes
2014-11-25 12:41:32 -05:00
Lioncash
c0fd319295 VideoOGL: Move X11 wxWidgets utilities to DolphinWX 2014-11-24 21:15:52 -05:00
Stevoisiak
6da394a4d0 More formatting and consistency fixes 2014-11-24 17:16:59 -05:00
Jules Blok
145e0cc84c OGL: Display the stereoscopy support warning before the stereo setting is reset.
Previously the message would never display, because stereoscopy would be turned off before the warning.
2014-11-24 15:11:00 +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
21eabc1b9d OGL: Add warning message when stereoscopic 3D is enabled but unsupported. 2014-11-23 14:27:40 +01:00
Jules Blok
0f63186371 TextureCache: Add "Mono EFB Depth Copy" stereoscopy option. 2014-11-23 14:27:40 +01:00
Jules Blok
9994ccb342 PostProcessing: Invalidate shader when anaglyph stereoscopy is toggled. 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
ee76c03160 TextureCache: Recompile EFB2Tex shaders when stereo 3D is toggled. 2014-11-23 14:27:40 +01:00
Jules Blok
4d075c2efb ProgramShaderCache: Abort shader compilation if geometry shader failed to compile. 2014-11-23 14:27:40 +01:00
Jules Blok
6642af2404 OGL: Remove Virtual XFB SBS support. 2014-11-23 14:27:40 +01:00
Jules Blok
ab76cf8b5e PostProcessing: Apply color correction to the anaglyph shader.
The eyes were accidentally swapped, the left filter only allows red to pass so the left eye texture should be used in the red channel.
2014-11-23 14:27:39 +01:00
Jules Blok
081212b765 TextureCache: Force mono copies of the depth buffer.
Fixes stereoscopic stencil shadows in some games.
2014-11-23 14:27:39 +01:00
Jules Blok
2cb2290910 TextureCache: Fix invalid cast. 2014-11-23 14:27:39 +01:00
Jules Blok
c0a5ae1746 OGL: Also redefine glFramebufferTexture on OpenGL ES. 2014-11-23 14:27:39 +01:00
Jules Blok
aa57feb9a8 ProgramShaderCache: Don't call glAttachShader if no geometry shader was compiled. 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
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
0eb0c47eba Render: Improve SBS presentation.
New calculation properly takes pillar boxing into account.
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
35342664e3 OGL: Disable stereoscopy if the GPU does not support geometry shaders. 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
4fd943aedd VideoConfig: Limit the Stereo 3D option to the OpenGL backend. 2014-11-23 14:27:38 +01:00
Jules Blok
284be96cd5 OGL: Recreate the framebuffers when the stereo setting changes. 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
0a72cf94cb TextureCache: Ignore the geometry shader if stereoscopy is disabled. 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
4fe9ceeee2 TextureCache: Set proper vertex limit in geometry shader.
Without instancing 6 vertices are output instead of 3.
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
80616c6e9e TextureCache: Implement layered framebuffer support.
Stereoscopic EFB2Tex is now supported.
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
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
36fe8ccf46 OGL: also show driver warnings on release builds 2014-11-22 15:07:52 +01:00
Ryan Houdek
2fdeefb65b Adds support for OpenGL ES draw_elements_base_vertex.
This is the same extension that we all know and love but under a different name with some different requirements.
In regular OpenGL fashion, you can't just move a desktop OpenGL extension to OpenGL ES without ratifying a new extension, which is why this falls
under a EXT extension, which in turn causes it to have suffixes attached to their function names.

This is the first step in our way towards conquering all mobile GPUs that don't support desktop OpenGL, hopefully we also can add support for
buffer_storage to OpenGL ES as well so we can make full use of this extension.
2014-11-21 18:57:32 -06: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