Commit graph

802 commits

Author SHA1 Message Date
degasus
b5a91e1dfa Framedumps: Add finish() function to limit memory lifetime. 2016-10-08 15:39:22 +02:00
degasus
ebc617882b VideoCommon: Drop RepeatFrameDumpFrame helper.
This was needed with fixed framerate dumping. As we now synchronize the frames, the last one will just get padded.
2016-10-08 15:39:21 +02:00
degasus
a530708bb1 OGL: Use VideoCommon framedump helpers. 2016-10-07 23:09:10 +02:00
degasus
34d733d376 OGL/Render: Drop write-only variable. 2016-10-07 21:44:52 +02:00
Markus Wick
ef1bfc26b2 Merge pull request #4291 from degasus/shader_gen
PixelShaderGen: Fix UID issues.
2016-10-05 12:20:58 +02:00
Chris Burgener
43c48a6f48 Fix frame dumps on file close in certain situations 2016-10-04 09:26:23 -04:00
degasus
829fc8f0ad PixelShaderGen: Drop dstAlphaMode constant in shader generation.
It is already stored within the UID.
2016-10-04 10:13:46 +02:00
Shawn Hoffman
86112c7258 VideoCommon: Minor changes
Make Renderer::GetMaxTextureSize return u32 instead of int.
2016-10-03 06:51:46 -07:00
Mat M
ccfc081697 Merge pull request #4245 from aldelaro5/logs-levels-changes
Lots of Logs levels changes (also enable INFO level in every build)
2016-10-02 16:51:44 -04:00
aldelaro5
f0aa9b3751 Reorganise a ton of logs level
Most of this commits changes performance decreasing logs from info to debug and also cleans up innacurate levels.
2016-10-01 15:50:28 -04:00
Stenzek
828aac7890 VideoBackends: Make TextureCache::CompileShaders return a bool 2016-10-01 01:09:12 +10:00
Stenzek
6a99cbd9fc VideoCommon: Call Renderer::SurfaceChanged on render parent resize
This is needed because for some reason the WSI for NV Vulkan drivers
doesn't return VK_ERROR_OUT_OF_DATE_KHR, so there is no other way to know
that a resize has occured apart from polling, which is a poor solution for
X11 (since it is blocking).
2016-10-01 01:09:12 +10:00
Stenzek
5346078791 VideoCommon: Add config fields for multithreading and validation layers 2016-10-01 01:09:12 +10:00
Stenzek
09638e714e VideoCommon: Extend DriverDetails to support both OpenGL and Vulkan 2016-10-01 01:09:12 +10:00
Stenzek
d9c034e8cc ShaderGen: Specify attribute/output locations/bindings explicitly
This also shifts the SSBO index from index 3 to index 0.
2016-10-01 01:09:11 +10:00
Stenzek
9f541e490d OGL: Handle case where both constant alpha and logic op is enabled 2016-09-30 23:18:14 +10:00
Markus Wick
cb759528e0 Merge pull request #3893 from hthh/perf-query-bug
Improve PerfQuery accuracy
2016-09-27 13:07:35 +02:00
Lioncash
5b3c74a31a OGL: Remove unnecessary c_str calls 2016-09-09 06:30:34 -04:00
Scott Mansell
f5c70a4b27 EFB2RAM: Downsample higher resolutions with linear filtering. 2016-09-07 11:17:32 +12:00
Lioncash
ec7114a658 OGL: Remove unnecessary renderer global references 2016-08-31 14:19:56 -04:00
Jules Blok
a8a9348913 OGL: Handle cases where reversed depth is already used. 2016-08-23 15:54:04 +02:00
Lioncash
2bf05a544d VertexManager: Correct variable naming scheme
Altered to indicate regular class members
2016-08-22 20:01:00 -04:00
Scott Mansell
f1964f90d6 Merge pull request #4129 from RisingFog/hahahahahahahahahaha
Fix a really stupid GLSL version parsing bug
2016-08-20 08:48:28 +12:00
Chris Burgener
da0204a85c Fix a really stupid GLSL version parsing bug 2016-08-19 08:53:27 -04:00
JosJuice
31c530c7b3 Merge pull request #3386 from lioncash/memory
Common: Namespace MemoryUtil
2016-08-19 11:04:45 +02:00
Jules Blok
e86d7cbc99 OGL: Workaround gl_ClipDistance bug on Mesa i965. 2016-08-18 01:08:39 +02:00
Jules Blok
7078216b61 Improve documentation. 2016-08-16 21:09:58 +02:00
Jules Blok
8c1c7fc2da Cosmetics. 2016-08-15 13:11:30 +02:00
Jules Blok
afa251af42 DriverDetails: Add bug for broken gl_ClipDistance on i965. 2016-08-15 13:11:28 +02:00
Jules Blok
94927f360f VideoCommon: Add a user-defined far clipping plane. 2016-08-15 13:11:28 +02:00
Jules Blok
6e2052fae6 OGL: Disable clip distance on when not in a game-like state. 2016-08-15 13:11:27 +02:00
Jules Blok
a141e91dd2 OGL: Check for GL_DEPTH_CLAMP support.
It's not available in OpenGL ES and officially it's not supported on OpenGL 3.0/3.1.

Fallback to old depth range code if there is no method to disable depth clipping.
It's more important to have correct clipping than to have accurate depth values.
Inaccurate depth values can be fixed by slow depth.
2016-08-15 13:11:26 +02:00
Jules Blok
4582853af4 VertexShaderGen: Use reversed depth range. 2016-08-15 13:11:26 +02:00
Jules Blok
e9e81ece65 VideoBackends: Enable depth clamping. 2016-08-15 13:11:25 +02:00
Jules Blok
b1ed7e80fb VertexShaderGen: Clip z using user-defined clipping planes. 2016-08-15 13:11:25 +02:00
Jules Blok
c223bd47b9 VideoCommon: Implement depth range equation in vertex shader. 2016-08-15 13:11:23 +02:00
Lioncash
e01c143379 Common: namespace MemoryUtil 2016-08-07 13:03:07 -04:00
Lioncash
14e0b48ae4 VideoCommon: Make API_TYPE an enum class
Allows for forward declarations in most places, which prevents dumping
unrelated VideoCommon.h contents directly into headers.
2016-07-29 19:20:16 -04:00
hthh
8be5717a60 Improve PerfQuery accuracy
In TimeSplitters: Future Perfect, PerfQuery is used to detect
the visibility of lights and draw coronas. 25 points are drawn
for each light. However, the returned count was incorrectly
being divided by four leading to dim coronas.

Using 4x antialiasing was a workaround because of a bug where
antialiasing multiplied the PerfQuery results. This commit
fixes that bug too (but only for OpenGL).
2016-07-04 18:54:49 +10:00
degasus
d79aeaa1e9 VideoCommon: Drop GetConfigName.
We're past 5.0 now, so there is no need to look for old inis.
2016-06-26 12:34:59 +02:00
degasus
5f2f462067 VideoBackends: Merge ShowConfig functions. 2016-06-26 12:34:59 +02:00
degasus
7833ff25df VideoBackends: Merge Initialize and Shutdown functions. 2016-06-26 12:34:59 +02:00
Scott Mansell
2f134c5c36 Remove the rest of ShaderDebugging.
Without UID checking, it's basically a no-op that disables shader cache
and stores the shader source code (without ever reading it back).
2016-06-26 16:25:11 +12:00
Scott Mansell
ebe5fd0b36 Multithreadded Shadergen: Minor fixups. 2016-06-26 16:13:22 +12:00
Scott Mansell
95469ec225 Remove UID Checker.
Kind of pointless now that multiple shaders with the same UID are
now fundementally impossible.
2016-06-26 16:13:22 +12:00
Scott Mansell
24e5d21780 Multithreadded Shadergen: Second pass over Pixel Shadergen.
Note: It's not 100% perfect, as some of the GPU capablities leak into the
pixel shader UID.

Currently our UIDs don't get exported, so there is no issue. But someone
might want to fix this in the future.
2016-06-26 16:13:21 +12:00
Scott Mansell
1a831cfc7d Multithreadded Shadergen: Second Pass over vertex/lighting Shadergens
As much as possible, the asserts have been moved out of the GetUID
function. But there are some places where asserts depend on variables
that aren't stored in the shader UID.
2016-06-26 16:13:21 +12:00
Scott Mansell
28c7113e41 Multithreadded Shadergen: Second Pass over geometery Shadergen 2016-06-26 16:13:21 +12:00
Pierre Bourdon
3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Scott Mansell
d197f489b9 analytics: Report OpenGL's adapter name too. 2016-06-20 23:54:44 +12:00
Anthony Serna
0e5852f634 [OGL] Workaround nvidia being weird with GL_MAX_TEXTURE_SIZE 2016-05-30 10:06:19 -05:00
Rohit Nirmal
14220ae488 Fix building with PCH disabled. 2016-05-26 13:05:21 -05:00
Stenzek
89e54fbd6c OGL: Work around slowdown of glMapBufferRange with SSBO on NVIDIA drivers
Using glMapBufferRange to read back the contents of the SSBO is extremely
slow on NVIDIA drivers. This is more noticeable at higher internal
resolutions. Using glGetBufferSubData instead does not seem to exhibit
this slowdown.
2016-05-19 21:24:09 +10:00
degasus
bca0e06a95 OGL: Use coherent mapping on Qualcomm devices. 2016-05-11 23:55:28 +02:00
degasus
6219c39cf5 OGL: Drop QC ES3.1 workaround.
This was never tested well:

HdkR> The tester was most likely trying to load a stale shader cache or something
2016-05-11 20:45:07 +02:00
Stenzek
6f3573dda8 D3D12: Implement XFB encoding/decoding (support Real XFB) 2016-05-08 23:18:51 +10:00
Pierre Bourdon
2fd0884347 Merge pull request #3672 from EmptyChaos/d3d-anisotropy
Fix D3D Forced Anisotropy
2016-03-26 03:25:01 +01:00
Scott Mansell
066b6b0bcb OpenGL: Cache query to max texture size.
This showed up really high when I was profiling things.
2016-03-26 03:14:39 +13:00
EmptyChaos
0b9a72a62d VideoCommon: Refactor TexMode0 mipmaps disabled test into a helper function 2016-03-24 13:43:29 +11:00
EmptyChaos
902e5cddf7 VideoBackends: Do not use Anisotropy on Point filtered textures.
The D3D backend was always forcing Anisotropic filtering when that is enabled regardless of how the game chose to configure the texture filtering registers; this causes the same issues as "Force Filtering" without Anisotropy, such as causing game UI elements to no longer line up adjacent correctly. Historically, OpenGL's Anisotropy support has always worked "better" than D3D's due to seeming to not have this problem; unfortunately, OpenGL's Anisotropy specification only gives GL_LINEAR based filtering modes defined behavior, with only the mipmap setting being required to be considered. Some OpenGL implementations were implicitly disabling Anisotropy when the min/mag filters were set to GL_NEAREST, but this behavior is not required by the spec so cannot be relied on.
2016-03-24 13:43:29 +11:00
mimimi085181
bb4d636f34 Copy all layers of textures with CopyRectangleFromTexture 2016-02-14 21:17:06 +01:00
Ryan Houdek
e1f21602fd Merge pull request #3426 from Sonicadvance1/ES_fix_framedump
Add support for framedumping to OpenGL ES.
2016-01-28 18:24:32 -05:00
Lioncash
5ebd1e215b Fifo: Make g_bSkipCurrentFrame a TU-local variable
This is only ever queried, making it a global isn't necessary.
2016-01-25 05:23:14 -05:00
Lioncash
e187c55bdd OpcodeDecoder: Add namespace 2016-01-24 01:31:36 -05:00
Pierre Bourdon
be1a9e4231 Merge pull request #3518 from Sonicadvance1/blacklist_sandy
Blacklist Sandy Bridge on mesa from using geometry shaders.
2016-01-20 19:32:56 +01:00
Ryan Houdek
3dda36bc5b Blacklist Sandy Bridge on mesa from using geometry shaders. 2016-01-20 12:13:21 -06:00
Lioncash
d9fec92628 VideoCommon: Header cleanup
Also remedies places where the video backends and core rely on things
being indirectly included.
2016-01-17 20:11:45 -05:00
degasus
5f244abf28 Fifo: Create a "Fifo" namespace. 2016-01-12 23:28:26 +01:00
degasus
0c92603fd5 Merge VideoBackendHardware into VideoBackend.
And rename it to VideoBackendBase because of conflicts within the backends itself.
2016-01-12 23:18:58 +01:00
Ryan Houdek
5a549ef663 [Android] Add support for rotation and minimizing the application 2016-01-10 13:00:32 -06:00
Pierre Bourdon
e7fbd1fd50 Merge pull request #3439 from Armada651/depth-range
Render: Clamp the z range to the full range.
2016-01-10 19:09:57 +01:00
Ryan Houdek
b4eb5d8e3f Disable geometry shaders on mesa AMD/ATI drivers.
Causes misrenderings in games that uses them.
2016-01-09 15:09:37 -06:00
Ryan Houdek
3f15aa4b57 Add support for framedumping to OpenGL ES. 2016-01-09 00:21:20 -06:00
Pierre Bourdon
bf1c53a6e8 Merge pull request #3451 from RisingFog/libav
Use ffmpeg for Windows Video Dumping instead of VFW
2016-01-09 01:01:05 +01:00
Chris Burgener
c34fb3edf0 Use ffmpeg for Windows Video Dumping instead of VFW 2016-01-07 18:37:58 -05:00
Jules Blok
db551c55a2 FrameBufferManager: Fix typo in stereoscopic MSAA shader. 2016-01-07 20:05:12 +01:00
degasus
ad1f7576ad VideoConfig: Use "GFX.ini" for both D3D and OGL.
They share the same format, so there is no need to separate their configs.
2016-01-06 21:43:11 +01:00
Ryan Houdek
0a42a0ab1b Merge pull request #3428 from Sonicadvance1/proper_glextensions
Make GLExtensions no longer require slghtly modified GL headers
2016-01-06 15:24:47 -05:00
Mathew Maidment
0509292f86 Merge pull request #3431 from stenzek/shadercache
ShaderGen: Remove virtual methods and string from ShaderGeneratorInterface.
2016-01-04 19:11:14 -05:00
Markus Wick
ca7160f714 Merge pull request #3434 from lioncash/enum
OnScreenDisplay: Make CallbackType an enum class
2016-01-04 13:47:22 +01:00
Markus Wick
3045e08daf Merge pull request #3430 from lioncash/compare
ProgramShaderCache: Simplify SHADERUID comparison operators
2016-01-04 13:42:39 +01:00
Lioncash
1bcfae5fd7 OGL: Correct unique_ptr types
By default unique_ptr will call delete on the given type if an array
qualifier isn't present, not delete[]. It's important to explicitly
specify an array is being handled.
2016-01-03 16:00:16 -05:00
Jules Blok
8c3108b354 Render: Clamp the z range to the full range. 2016-01-03 15:39:34 +01:00
Lioncash
01f99a04a2 VideoBackend: Get rid of a boolean global
Also gets rid of global headers
2016-01-02 18:03:28 -05:00
Lioncash
edda018d54 OnScreenDisplay: Make CallbackType an enum class 2016-01-02 14:57:55 -05:00
Ryan Houdek
37525f3fcf Make GLExtensions no longer require slghtly modified GL headers.
In fact, removes the need for external headers at all.
2016-01-02 10:34:13 -06:00
Stenzek
617f9d9532 ShaderGen: Remove virtual methods from ShaderGeneratorInterface, move string buffer to ShaderCode
This fixes the crashes occuring at startup with a non-empty shader cache.
Because LinearDiskCache reads/writes to the storage of ShaderUid, ShaderUid must be trivially copyable.
Additionally, adds a static assert to LinearDiskCache to ensure this doesn't happen in the future.

The initialization of ShaderUid data has been moved to the code generation functions, so the above condition holds true.
2016-01-02 17:35:06 +10:00
Lioncash
6093d1f72a ProgramShaderCache: Simplify SHADERUID comparison operators 2016-01-01 22:28:42 -05:00
Ryan Houdek
b4e9bbb551 Merge pull request #3336 from Sonicadvance1/improve_glextensions
[GLExtensions] Improve the extension loader.
2016-01-01 13:01:51 -05:00
Markus Wick
330329254c Merge pull request #3361 from stenzek/d3d-vectored-efb-pokes
D3D: Implement vectored efb pokes
2015-12-30 15:27:24 +01:00
Scott Mansell
d8e5d8659e TextureCache, fix an incorrect assert. 2015-12-29 14:25:31 +13:00
Markus Wick
aabcd441d9 Merge pull request #3381 from Armada651/revert-3076
Revert "Merge pull request #3076 from void-ghost/stereo3d_presets"
2015-12-28 10:18:32 +01:00
Lioncash
8ce3a4aa70 ShaderGeneration: Get rid of static buffers 2015-12-26 17:01:54 -05:00
Stenzek
12ef4c8ae0 OGL: Fix for black framebuffer when resolution/msaa mode changes 2015-12-23 23:29:32 +10:00
Lioncash
da0e647346 Render: Get rid of explicit new and delete 2015-12-22 19:10:05 -05:00
Jules Blok
8bda12bcfd Revert "Merge pull request #3076 from void-ghost/stereo3d_presets"
This reverts commit 81414b4fa2, reversing
changes made to b926061f64.

Conflicts:
	Source/Core/DolphinWX/Frame.cpp
	Source/Core/VideoCommon/VideoConfig.cpp
	Source/Core/VideoCommon/VideoConfig.h
2015-12-23 00:35:19 +01:00
Lioncash
e422af9cce FramebufferManager: Get rid of raw new and delete 2015-12-22 18:06:05 -05:00
Lioncash
f448c6e291 FramebufferManagerBase: Get rid of explicit delete and new 2015-12-21 15:57:48 -05:00
Lioncash
d20ba76ab3 StreamBuffer: Make factory function return a std::unique_ptr 2015-12-21 10:21:38 -05:00
Lioncash
ec71452706 StreamBuffer: Correct function casing 2015-12-21 10:09:03 -05:00