Commit Graph

118 Commits

Author SHA1 Message Date
3fd4142f36 OGL: Track state of last bound vertex array object
This reduces the overhead of calling glBindVertexArray() every time
RestoreAPIState() is called, even when it is redundant.
2018-02-22 19:08:52 +10:00
c709f3c2d1 Standardise some enums from ALL_CAPS to CamelCase 2018-01-05 10:03:58 -08:00
8d68adcaf3 Workaround qualcomm driver bug
It seems it doesn't like modifying inout variables in place - so instead
use a temporary for ocol0/ocol1 and only write them once at the end of
the shader
2018-01-05 09:56:46 -08:00
29a9ed043b Implement dual-source blending in shader
For some GLES drivers that don't support dual-source blending, but do
support GL_EXT_shader_framebuffer_fetch, this might be useful.
2018-01-05 09:56:46 -08:00
24ddea04ce VideoBackends: Move SamplerState to common 2017-09-11 20:01:54 +10:00
836b9b9acb Renderer: Move cull mode to a rasterization state object
Also moves logic for primitive handling to VideoCommon.
2017-09-11 20:01:45 +10:00
84f8ebd95f VideoBackends: Clear uid bits that are unused for the current backend
Currently, this is only the logic op bit, but this will be extended to
the framebuffer fetch/blend modes. In the future, when/if we move to
VideoCommon pipelines, this state will be part of the pipeline UID
anyway, and we can mask it out in the backend by using a two-level map,
so the shaders/programs are shared.
2017-09-05 23:49:42 +10:00
6d91c1b079 ProgramShaderCache: Call glTexImage3D after glTexParameter
Was missed before merge.
2017-08-05 18:18:30 +10:00
67997529b8 ProgramShaderCache: Create a FBO for shared contexts to draw into
This way it allows us to use surfaceless contexts in EGL/GLX. It also
ensures that the shared context shares a similar setup to the main
context's framebuffer, potentially reducing the number of variants a
driver needs to generate.
2017-08-02 20:12:28 +10:00
d62dcd397d VideoConfig: Drop force vertex/pixel ubershader settings
This was mainly included for debugging, but could end up being confusing
for users, as well as polluting the GL program cache with a mix of uber
and specialized shaders if the option was changed.
2017-07-31 23:21:38 +10:00
e968c191ff Ubershaders: Support per-pixel lighting 2017-07-30 17:43:59 +10:00
c8f31656cb VideoBackends: Support a different number of threads for precompiling
At runtime, we only really want a single shader compiler thread.
However, for initial boots, we can use a higher number to speed things
up.
2017-07-30 17:43:59 +10:00
e17efb1d8d ShaderGen: Use consistent variable names for texture coordinates 2017-07-30 17:43:59 +10:00
cd502990fa OGL: Uber shader support 2017-07-30 17:43:59 +10:00
3ea9d86faa ShaderGen: Pass host config to shader generation functions
Also moves the host config checks to common.
2017-07-20 17:54:33 +10:00
d01b0bf60f VideoCommon: Move shader cache filename generation to common 2017-07-20 17:46:59 +10:00
62a901508b OGL: Reload shader cache when relevant video config changes 2017-07-20 17:46:59 +10:00
e63c337830 Merge pull request #5305 from iwubcode/abstract_texture
Abstract Texture
2017-06-18 12:57:05 -07:00
cf94ce6305 Add a namespace to OpenFStream
For consistency with the other functions in FileUtil.h.
2017-06-15 21:34:04 +02:00
f09ceaa735 Move IOFile to a separate file
Reduces the number of files that need to be recompiled
when making changes to FileUtil.h.
2017-06-15 21:33:50 +02:00
2cdc93f4ab Video Backends: Split texture cache code out into separate files, introduce 'AbstractTexture' 2017-06-13 00:41:51 -05:00
abc662d69c OGL: Support compute shaders and emitting GLSL 4.3
This also changes bSupportsEarlyFragmentTests to
bSupportsImageLoadStore, as it is used for both.
2017-04-01 12:31:41 +10:00
de940a5fd6 VideoConfig: add bSupportsFragmentStoresAndAtomics 2017-03-15 17:20:47 -07:00
ced1614cac Unify the way of setting game ID, title ID, revision
The existing code from ConfigManager, ES and MIOS is merged
into a new set of functions called SetRunningGameMetadata.
2017-03-09 15:34:14 +01:00
21967b1f6e VideoBackends: Add a developer option to disable the shader cache.
Makes it easier to disable the cache while working on the shaders.
2017-02-19 12:05:44 +01:00
468f623d27 ShaderGenCommon: Remove unnecessary includes 2017-02-01 12:19:55 -05:00
273ace7bb7 LightingShaderGen: Remove unnecessary includes 2017-02-01 01:06:00 -05:00
41b0c74e30 VideoCommon: Make dst_alpha state implicit. 2017-01-04 20:02:31 +01:00
31ccfffd38 Common: Add alignment header
Gets rid of duplicated alignment code.
2016-12-06 20:33:53 +01:00
72e3f1ecec Remove unnecessary ConfigManager includes
Making changes to ConfigManager.h has always been a pain, because
it means rebuilding half of Dolphin, since a lot of files depend on
and include this header.

However, it turns out some includes are unnecessary. This commit
removes ConfigManager includes from files which don't contain
SConfig or GPUDeterminismMode or GPU_DETERMINISM (which means the
ConfigManager include is not used).

(I've also had to get rid of some indirect includes.)
2016-11-27 22:38:38 +01:00
1081497cad DiscIO/SConfig: Rename GetUniqueID to GetGameID
We call this "game ID" everywhere else, and it's not
actually completely unique.
2016-10-29 15:24:02 +02:00
829fc8f0ad PixelShaderGen: Drop dstAlphaMode constant in shader generation.
It is already stored within the UID.
2016-10-04 10:13:46 +02:00
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
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
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
ebe5fd0b36 Multithreadded Shadergen: Minor fixups. 2016-06-26 16:13:22 +12:00
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
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
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
28c7113e41 Multithreadded Shadergen: Second Pass over geometery Shadergen 2016-06-26 16:13:21 +12:00
3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
8ce3a4aa70 ShaderGeneration: Get rid of static buffers 2015-12-26 17:01:54 -05:00
d20ba76ab3 StreamBuffer: Make factory function return a std::unique_ptr 2015-12-21 10:21:38 -05:00
d27dcdba48 We shouldn't be trying to enable the SSBO extension in ES. 2015-11-23 14:47:43 -06:00
05b06b7a21 Merge pull request #3227 from Tilka/sizeof
OGL: don't hardcode buffer sizes
2015-11-04 14:35:23 +13:00
39313152ba OGL: use StringFromFormat where appropriate 2015-11-04 01:56:02 +01:00
e161e714c7 Merge pull request #3226 from Tilka/shadergen
VideoCommon: return code/uid from shader gens
2015-11-04 13:42:49 +13:00
bc38892db7 DriverDetails: remove BUG_BROKENINFOLOG leftovers
It was removed in 9618738278.
2015-11-03 18:50:44 +01:00
71d1eb3c31 VideoCommon: return code/uid from shader gens
rather than passing in non-const references
2015-11-03 14:40:23 +01:00
983978ee66 VideoCommon: flush vertex manager if components change 2015-11-01 22:39:31 +01:00