Commit Graph

63 Commits

Author SHA1 Message Date
Allan Bentham
97ca18012c SCW fixes
Corrected GLSL version for ios es2.
Fix a couple of out of bounds argv[6] reads.

#codereview Rolando.Caloca, Daniel.Wright

[CL 2521051 by Allan Bentham in Main branch]
2015-04-22 10:29:49 -04:00
Rolando Caloca
27d7a0e070 UE4 - Fix ES3.1 emulation shader issues
#codereview Allan.Bentham

[CL 2514517 by Rolando Caloca in Main branch]
2015-04-16 13:02:21 -04:00
Rolando Caloca
9a899d66d4 UE4 - Mobile Preview for feature level ES3.1/Metal (experimental)
[CL 2510893 by Rolando Caloca in Main branch]
2015-04-13 18:00:32 -04:00
Marc Audy
6fbd586187 Disable shadow variable warnings around third party includes that throw warnings
[CL 2510513 by Marc Audy in Main branch]
2015-04-13 13:43:25 -04:00
Marc Audy
a523efb225 Fix shadowed variables
[CL 2510461 by Marc Audy in Main branch]
2015-04-13 12:42:09 -04:00
Mike Fricker
114458bf0f Clang warning fixes: Fixed missing 'override' specifiers
- Also removed some unreferenced functions that adding 'override' revealed

PR #1002 -- Thank you, Omar007!

[CL 2498415 by Mike Fricker in Main branch]
2015-04-01 07:20:55 -04:00
Rolando Caloca
a1f4fdf0be UE4 - Metal - Fix bad uav dereference
Glsl - Better variable names

[CL 2486692 by Rolando Caloca in Main branch]
2015-03-20 16:18:49 -04:00
Rolando Caloca
07b45c09e1 UE - Fix compile issue
[CL 2483686 by Rolando Caloca in Main branch]
2015-03-18 18:27:58 -04:00
Rolando Caloca
d0183d8a70 UE4 - OpenGL - Generate GL_EXT_tessellation_shader properly (UE-11222)
#codereview Dmitry.Rekman

[CL 2483484 by Rolando Caloca in Main branch]
2015-03-18 16:16:25 -04:00
Allan Bentham
64090df1f4 Ensure correct assignment of emulated (ES2) uniform buffer indices for UB's generated within BuildResourceTableMapping(). Typically arises when only sampler related parameters are encountered.
Fixes UE-9804 and probably more.

#codereview nick.penwarden, Rolando.Caloca

[CL 2482912 by Allan Bentham in Main branch]
2015-03-18 08:03:21 -04:00
Rolando Caloca
6cb53ebc04 UE4 - OpenGL - Allow running emulated (packed/flattened) uniform buffers when running PC ES2; use OpenGL.UseEmulatedUBs=1 on your consolevariables.ini
- Only works with -game, not in-editor!
#codereview Allan.Bentham

[CL 2475392 by Rolando Caloca in Main branch]
2015-03-11 13:45:34 -04:00
Rolando Caloca
be71ff1af5 UE4 - hlslcc - Reduce memory leaks (missing Linux libs)
#codereview Dmitry.Rekman

[CL 2473774 by Rolando Caloca in Main branch]
2015-03-10 10:40:42 -04:00
Rolando Caloca
6868525794 UE4 - hlslcc - Cleanup parser state & change hlslcc entry point to be a class in prep for moving to the Engine (missing Linux libraries)
odereview Dmitry.Rekman

[CL 2471354 by Rolando Caloca in Main branch]
2015-03-06 13:09:36 -05:00
Saul Abreu
79a26091bf Fixed behavior on FString::ParseIntoArray (muliple delimiters overload) functionality to support optionally culling empty strings. Greatly simplified implementation logic. Output parameter now properly named and taken by reference.
#codereview Steve.Robb, Robert.Manuszewski

[CL 2466824 by Saul Abreu in Main branch]
2015-03-02 15:51:37 -05:00
Mark Satterthwaite
833117229f Update the version numbers for OpenGL shader formats as CL #2460109 has altered the cached data structures so they need to be recompiled.
Once SCW is recompiled this will prevent any further crashes due to incompatible DDC OpenGL shader binaries.
#codereview michael.trepka

[CL 2466401 by Mark Satterthwaite in Main branch]
2015-03-02 11:32:11 -05:00
Allan Bentham
b61636e3df ES2: Remap vertex attributes when max vert attribs < 16
Fixes PVR SGX 540 crashes in UE-5155
[Requires shader compile worker rebuild.]

codereview nick.penwarden, chris.babcock, rolando.caloca

[CL 2460254 by Allan Bentham in Main branch]
2015-02-25 10:25:20 -05:00
Mark Satterthwaite
65e1a105de Shader caching has been updated to include the option to record draw-states used for each shader so that they may be pre-drawn to reduce in-driver hitching.
- This is especially important on OS X OpenGL where these hitches can be equivalent to several frames, so it is enabled by default for this platform.
- The logging of draw calls is turned on/off with r.UseShaderDrawLog and incurs a fixed overhead as all RHI state is tracked & recorded into the shader cache.
- The actual predrawing is turned on/off with r.UseShaderPredraw and requires an existing cache to be useful, the predrawing takes place at frame-end and can be controlled with r.PredrawBatchTime which the time in ms to spend predrawing each frame until complete, or -1 to do it in one go (currently the default).
- The shader cache is now also versioned with the game able to supply a version distinct from the engine, so that old caches may be invalidated if/when required.
- The shader cache is now compatible with OpenGL SM4 & SM5 on Windows & probably Linux too.
- It may not work correctly with desktop ES2 emulation as that is still untested.
- To make it easier to add to other RHIs the API has been made simper to avoid lots of exposed branches.

#codereview michael.trepka, dmitry.rekman

[CL 2460109 by Mark Satterthwaite in Main branch]
2015-02-25 08:13:48 -05:00
Rolando Caloca
ff538da9bf UE4 - Fixes UE-10562
hlslcc - Fix empty if() generation
Converts from
if(!EXPR) {}
to
EXPR
#codereview Mark.Satterthwaite, Chris.Babcock, Dmitry.Rekman, Michael.Trepka

[CL 2457355 by Rolando Caloca in Main branch]
2015-02-23 18:55:44 -05:00
Marc Audy
e5ba044eb0 Fix shadowed variables
[CL 2451810 by Marc Audy in Main branch]
2015-02-19 12:13:52 -05:00
Mark Satterthwaite
83ad7e246f Implemented desktop OpenGL support for GL_ARB_separate_shader_objects without requiring any additional shader platforms to reduce shader compile/link hitches.
- Shaders which emit layout location data use INTERFACE_LOCATION & INTERFACE_BLOCK macros to defer to the runtime whether they can be used as separable or non-separable shaders.
- The runtime supplies the correct #define for each so that the shaders still work on platforms where the glLinkProgram implementation fails with separable shader code.
- Shader model 5 platforms (GLSL 430 or ES 3.10) which were already specifying & using layout location data continue to do so, even when using glLinkProgram.
- The 'OpenGL.UseSeparateShaderObjects' console variable allows switching between SSO/Link modes between executions, but not dynamically at runtime.
- Only defaults to on for Mac as that is the only platform which can guarantee that the extension is always available & so far the most tested platform.
- Updated hlslcc binaries are supplied for Mac, Linux & Windows.
- Added an OpenGL RHI stat for shader first draw time so that it is easy to see why hitches occur during runtime due to in-driver shader compilation.

reviewedby michael.trepka, nick.penwarden, dmitry.rekman, rolando.caloca

[CL 2435530 by Mark Satterthwaite in Main branch]
2015-02-06 11:35:30 -05:00
Jaroslaw Surowiec
1085fb3b7a Core - UE/UE-6813 - Confusing API: We have both FMemory::MemZero() and FMemory:Memzero()
[CL 2405761 by Jaroslaw Surowiec in Main branch]
2015-01-14 04:21:10 -05:00
Rolando Caloca
c0db1bfb0e UE4 - hlslcc & Metal
- Metal - Fix for RWBuffer<uint> generating swizzle .x
- hlslcc - Support for RWStructuredBuffer

[CL 2388726 by Rolando Caloca in Main branch]
2014-12-15 12:21:10 -05:00
Mark Satterthwaite
28441d4127 Fix-up the .w component for gl_FragCoord being used as SV_Position - it would appear that they aren't the same (GL claims 1/clip.w, presumably from the usage in our shaders D3D provides clip.w).
#codereview michael.trepka, rolando.caloca, nick.penwarden, gil.gribb

[CL 2387119 by Mark Satterthwaite in Main branch]
2014-12-12 12:30:21 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Rolando Caloca
7311f61f67 UE4 - hlslcc - Move mem barrier/sync functions out of core hlslcc and into GLSL backend
[CL 2356437 by Rolando Caloca in Main branch]
2014-11-11 17:28:52 -05:00