Commit Graph

43 Commits

Author SHA1 Message Date
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
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
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
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
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
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
1e13c6f58a UE4 - hlslcc - Rollback //depot/UE4/Engine/Source/ThirdParty/hlslcc to changelist 2316264
[CL 2319202 by Rolando Caloca in Main branch]
2014-10-03 20:02:42 -04:00
Rolando Caloca
88ff3983ea UE4 - Revert CCT
[CL 2313607 by Rolando Caloca in Main branch]
2014-09-29 18:57:21 -04:00
Rolando Caloca
941da65c63 hlslcc - Move hlslcc interface out of each shader format and into ShaderCompilerCommon module
- Delete hlslcc exe files (not needed anymore)

[CL 2312870 by Rolando Caloca in Main branch]
2014-09-29 10:10:28 -04:00
Jaroslaw Palczynski
65ba5d456f TArray documentation and a coupld of methods deprecation.
Changes mostly in Array.h. The changes in other files are only renames for deprecated functions.

[CL 2312616 by Jaroslaw Palczynski in Main branch]
2014-09-29 04:23:44 -04:00
Rolando Caloca
f95c834450 UE4 - Rename ir_gen_glsl.* to GlslBackend.*
- Fix some warnings

[CL 2310427 by Rolando Caloca in Main branch]
2014-09-25 18:03:18 -04:00
Rolando Caloca
e3fd63ec34 UE4 - Move glsl backend out of ThirdParty into ShaderFormatOpenGL
[CL 2310098 by Rolando Caloca in Main branch]
2014-09-25 14:27:21 -04:00
Rolando Caloca
95e0ed4435 UE4 - CCT now writes out source
[CL 2309773 by Rolando Caloca in Main branch]
2014-09-25 10:31:22 -04:00
Rolando Caloca
69c09f877c hlslcc - Metal backend rewrite without using the glsl backend
- Added FramebufferFetchMRT(n) intrinsic for Metal

[CL 2307524 by Rolando Caloca in Main branch]
2014-09-23 17:41:05 -04:00
Niklas Smedberg
bb8f417304 Support for OpenGL ES 3.1 + Android Extension Pack
[CL 2303212 by Niklas Smedberg in Main branch]
2014-09-18 17:49:40 -04:00
Allan Bentham
85930517d6 Fix crash with opengl UBOs when ES2 preview mode is toggled.
ES2 emulation now uses UBOs instead of packed uniform blocks.
Fixed issue with ogl shader compiler introducing '__' into padding variable names.

[CL 2264084 by Allan Bentham in Main branch]
2014-08-20 08:27:17 -04:00
Rolando Caloca
d35038ab08 UE4 - hlslcc - Fix for truncation (which fixed modf() intrinsic); also added fix for copy propagation on loops
[CL 2243621 by Rolando Caloca in Main branch]
2014-08-04 19:46:14 -04:00
Dmitry Rekman
edc8ff25f0 Support for Linux in shader compiler.
- Part of PR #306 by amigo and #ue4linux folks.
- Undoing my previous change with cross-compilation define (too dangerous).

#codereview Josh.Adams, Michael.Trepka

[CL 2243292 by Dmitry Rekman in Main branch]
2014-08-04 18:28:10 -04:00
Rolando Caloca
68d9d12873 UE4 - OpenGL - Remove copy of cbuffer/structs on hlsl to match D3D
[CL 2242497 by Rolando Caloca in Main branch]
2014-08-04 10:49:28 -04:00
Rolando Caloca
3f24640633 UE4 - hlslcc - Remove Metal seed 2 & 3 hack expanding matrices
[CL 2235112 by Rolando Caloca in Main branch]
2014-07-28 18:06:32 -04:00