Commit Graph

93 Commits

Author SHA1 Message Date
Dmitriy Dyomin
f3b06e2b85 Add limited decal support on mobile UE-11981
Fixed: Stencil test does not work on mobile UE-16664 (still doesn't work on metal)
#codereview Jack.Porter, Martin.Mittring

[CL 2600130 by Dmitriy Dyomin in Main branch]
2015-06-25 02:07:29 -04:00
Rolando Caloca
842fb14f28 UE4 - hlslcc - Metal back integration (standalone changes, non-desktop)
#codereview Michael.Trepka, Peter.Sauerbrei, Mark.Satterthwaite, Dmitry.Rekman

[CL 2598096 by Rolando Caloca in Main branch]
2015-06-23 18:43:25 -04:00
Rolando Caloca
2ca5e47b19 UE4 - hlslcc - Fix intrinsics
#codereview Michael.Trepka, Dmitry.Rekman

[CL 2597450 by Rolando Caloca in Main branch]
2015-06-23 13:32:55 -04:00
Rolando Caloca
8b34bd48af UE4 - Fix Precision output for ES platforms
#codereview Dmitry.Rekman, Michael.Trepka, Chris.Babcock

[CL 2592355 by Rolando Caloca in Main branch]
2015-06-18 14:24:11 -04:00
Rolando Caloca
3c35f75ad8 UE4 - hlslcc - fix dump assert
[CL 2536223 by Rolando Caloca in Main branch]
2015-05-04 15:40:14 -04:00
Mike Fricker
290f5e6d82 Miscellaneous fixes for Clang on windows
These changes allow UE4 to compile and run (in Debug) on Clang 3.7 alpha (r231657 only!)
  - Disabled editor source file discovery (crashes with Clang currently)
  - Disabled FThreadIdleStats in UnrealHeaderTool with Clang on Windows (causes link errors due to inlining bugs with Clang and DLL imports)
  - Use MSVC linker by default, even when compiling with Clang (can be tweaked with bAllowClangLinker)
  - Enabled shadow variable warnings on Windows with Clang
  - Limited max size of reflection code source files (Clang on Windows crashes with huge source files)
  - Fixed UE4 deprecation warnings not showing up when using Clang on Windows
  - Make sure initialization list order only triggers a warning on Clang for Windows

Other changes:
  - Fixed issues with pushed pragmas not getting popped (PRAGMA_ENABLE_DEPRECATION_WARNINGS)
  - Removed EMIT_DEPRECATED_WARNING_MESSAGE, wasn't used
  - Fixed various third party library includes not being treated as system headers (prevents compiler warnings)

To test Clang on Windows (beta!!):

- Get latest UE4 main branch (4.9)

- Install LLVM+Clang for Windows version r231657.  It's a quick install, you don't need to compile anything yourself.

- Open UEBuildWindows.cs, and change bCompileWithClang to true.  Be careful not to check that in.  We'll probably make this config-driven later, after the Clang toolchain gets more mature.

- Switch to Debug Editor configuration.  (See below for more info.)

- Rebuild the game or engine

Notes:

- You must use Clang r231657 (3.7.0 alpha).  There are no other releases that I've found that are able to compile UE4 successfully.  Most of the newer releases crash during compiling, and older releases aren't able to digest Windows header files well enough.

- Compiling in Development currently will not work due to bugs with Clangs handling of inlining and DLL exports.  Monolithic builds should work, though.

- Occasionally you may see runtime crashes (stack overflows or access violations) when running UE4 compiled with Clang on Windows.  These may very well be bugs in Clang (remember, we're using an alpha release of Clang 3.7.0.)  Unfortunately without better debugger support, it can be difficult to workaround these

- When debugging, you will only have functions and line numbers, no variables or parameters.  Clang only has preliminary support for Microsoft's PDB format currently.
XGE is fully supported with Clang on Windows.  Best case rebuild times I've seen are 3.5 minutes in Debug.

- Shared PCHs aren't supported yet (similar to on Mac and Linux), so iterative compile times may be slower compared to Visual C++.  However the Clang compiler is actually quite fast for rebuilds, probably because of missing debug info though.

- There may be some compiler warnings that are different between Mac/Linux and Windows.  We haven't done a line-by-line comparison yet.

- Build products and executables for Clang and VC++ overlap on disk.  So you have to rebuild to switch back and forth.  Sorry.

- Clang on Windows has a few bugs that we've had to work around.  You might see some strange things from time to time.  Every new release of Clang has different behavior on Windows.

- We still use the VC++ Linker, even when compiling using Clang.  The new Clang linker (lld.exe) can be enabled with bAllowClangLinker but it will crash when linking some modules.  It also doesn't produce usable debug symbols by Visual Studio (yet).

#codereview mikolaj.sieluzycki

[CL 2532260 by Mike Fricker in Main branch]
2015-04-30 14:24:21 -04:00
Zachary EdgertonJones
a0bb8a0f21 TPS report first pass
[CL 2521243 by Zachary EdgertonJones in Main branch]
2015-04-22 12:12:32 -04:00
Rolando Caloca
de36276097 UE4 - hlslcc - Fix clang warning
#codereview Ben.Marsh

[CL 2516362 by Rolando Caloca in Main branch]
2015-04-17 16:00:18 -04:00
Rolando Caloca
dc2ade0796 UE4 - hlslcc - Metal - Fix texture sampled with different samplers
[CL 2514987 by Rolando Caloca in Main branch]
2015-04-16 17:03:26 -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
Zachary EdgertonJones
788c90cf43 Checking in TPS reports for first pass
[CL 2493970 by Zachary EdgertonJones in Main branch]
2015-03-27 12:10:09 -04:00
Rolando Caloca
17456180f9 UE4 - hlslcc - Back out revision 19 from //depot/UE4/Engine/Source/ThirdParty/hlslcc/HLSLCC.Build.cs
[CL 2488094 by Rolando Caloca in Main branch]
2015-03-23 14:24:40 -04:00
Rolando Caloca
e85b8bb690 UE4 - hlslcc - Optimized debug
- Multi project build

[CL 2488014 by Rolando Caloca in Main branch]
2015-03-23 13:32:57 -04:00
Rolando Caloca
2187f16734 UE4 - hlslcc - Pack matrices last to avoid big set parameter calls (UE-2047)
[CL 2483441 by Rolando Caloca in Main branch]
2015-03-18 15:32:09 -04:00
Rolando Caloca
8b44410b9c CCT - Support for -flattenub
[CL 2475168 by Rolando Caloca in Main branch]
2015-03-11 11:10:05 -04:00
Rolando Caloca
2298aae7f7 PR #895 (Contributed by nsf)
hlslcc - Fix remaining memory leaks
Tracked in UE-11424
https://github.com/EpicGames/UnrealEngine/pull/895
#codereview Dmitry.Rekman

[CL 2474119 by Rolando Caloca in Main branch]
2015-03-10 14:24:45 -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
Rolando Caloca
693b81b5f6 UE4 - hlslcc - Go back one version number
[CL 2460604 by Rolando Caloca in Main branch]
2015-02-25 14:03:36 -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
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
Dmitry Rekman
84ec054bc4 Updated cross-compilation setup for hlslcc (and the libs too).
[CL 2404064 by Dmitry Rekman in Main branch]
2015-01-12 18:30:19 -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
Dmitry Rekman
03abf32964 Fix HLSLCC Linux build.
#codereview Rolando.Caloca

[CL 2370125 by Dmitry Rekman in Main branch]
2014-11-25 17:55:17 -05:00