Commit Graph

633 Commits

Author SHA1 Message Date
joe kirchoff
8fc9771156 Don't use static functions in the DirectX module to get paths, it is not guaranteed that this module will exist
#rnx

[CL 27090677 by joe kirchoff in ue5-main branch]
2023-08-14 18:16:33 -04:00
joe kirchoff
b1f4c0f34d Fix several more Shipping compile errors
#rnx
#jira UE-192219
#jira UE-192222
#jira UE-192227
#lockdown Francis.Hurteau
#rb dan.oconnor

[CL 26957940 by joe kirchoff in ue5-main branch]
2023-08-09 11:37:09 -04:00
david harvey
bdb4199eeb Remove unnecessary WindowsHWrapper.h & MinWindows.h include - both files will be automatically included by AllowWindowsPlatformTypes.h
#jira UE-152863
#rnx
#rb Josh.Adams

[CL 26912096 by david harvey in ue5-main branch]
2023-08-08 05:50:53 -04:00
laura hermanns
6322dc3790 Add [loop] attribute to Substrate shader to fix HLSL cross-compilation error on D3D11.
#rb Sebastien.Hillaire
#jira UE-186066
#rnx

[CL 26824400 by laura hermanns in ue5-main branch]
2023-08-03 15:59:21 -04:00
dan elksnitis
9a5a1b6f74 [shaders] minor include cleanup
#rb Jason.Hoerner
#rb Laura.Hermanns

[CL 26817718 by dan elksnitis in ue5-main branch]
2023-08-03 13:40:32 -04:00
charles derousiers
2365ee5308 Change D3D diagnostic buffer to output readable assert message (file/line/condition/message).
Use with check() / checkf()

#rb dan.elksnitis, christopher.waters
[FYI] yuriy.odonnell

[CL 26680005 by charles derousiers in ue5-main branch]
2023-07-28 13:55:18 -04:00
bryan sefcik
64f140d78d Added shader.build.cs file.
Updated build.cs files to use new shader module.

#jira
#rb Joe.Kirchoff and guillaume.abadie

[CL 26664107 by bryan sefcik in ue5-main branch]
2023-07-27 22:53:25 -04:00
christopher waters
111e1d5046 Fixing various issues with shader previews
- PC previews of SM6 platforms weren't going to DXC correctly.
- Preview platform include paths weren't initialized when compiling with local-only shader compiles.
- A few preview platform DDSPI settings weren't being initialized correctly based on the capabilites of the preview format.

#rb arciel.rekman, dan.elksnitis

[CL 26589147 by christopher waters in ue5-main branch]
2023-07-25 17:16:48 -04:00
jason hoerner
7f22080814 Shader Compiler: Made FShaderCompilerDefinitions private, to reduce code publicly visible in ShaderCore.h. For now, it's just marked deprecated for 5.4, but will be hidden more generally in 5.5.
#rnx
#rb yuriy.odonnell dan.elksnitis jason.nadro

[CL 26534998 by jason hoerner in ue5-main branch]
2023-07-22 06:35:10 -04:00
dan elksnitis
45442799b4 [shaders] fix debug compile batchfiles for PC DXC
#rb Laura.Hermanns

[CL 26296674 by dan elksnitis in ue5-main branch]
2023-06-28 15:55:55 -04:00
rweber89
905cbb8e68 PR #10502: D3DShaderCompiler Memleak Fix
#jira UE-187961
#rb Mihnea.Balta
#rnx

[CL 26085505 by rweber89 in ue5-main branch]
2023-06-19 04:11:08 -04:00
tim smith
9cc91976c0 Fix to live coding shutdown to eliminate a somewhat rare crash on exit.
#rb Dan.Engelbrecht
#jira UE-188767

[CL 26055035 by tim smith in ue5-main branch]
2023-06-16 11:55:21 -04:00
dan elksnitis
f765d6f552 [shaders] change d3d backend to not fail on minification failure; ensure preprocess warnings are appended for independent preprocessing shader formats regardless of whether preprocessing fails
#rb Jason.Nadro

[CL 25897074 by dan elksnitis in ue5-main branch]
2023-06-09 12:42:57 -04:00
christopher waters
2a7a142bfc Fixing CompileFXC.bat issues.
- Setting FXC="..." is different from setting "FXC=...", the former will break uses of just %FXC% when the path has spaces in it.
- Switching to all "FXC=..." and "%FXC%" to make the variable consistent.
- Tweaking the bat file formatting inside of D3DShaderCompiler to make it more readable.

#rb dan.elksnitis

[CL 25853249 by christopher waters in ue5-main branch]
2023-06-07 15:02:30 -04:00
dan elksnitis
2acbcb9533 [shaders]
- add new fields to FShaderCompilerOutput which should be populated with the shader source and entry point name if modified by a backend compile process (in a format implementing the independent preprocessing API). this is intended to supercede "OptionalFinalShaderSource" for such shader formats, as well as being used as the source for preprocessed debug dumps when enabled.
- modify the PCD3D shader format to use these fields as intended (and so fix the debug output for pipelines which remove unused interpolators to match the final modified source).

#rb Laura.Hermanns
#preflight 64777f850848b7126dda194c

[CL 25706448 by dan elksnitis in ue5-main branch]
2023-05-31 13:31:39 -04:00
christopher waters
1fab74d63a Restricting PLATFORM_SUPPORTS_STATIC_SAMPLERS to SM6 and RayTracing shaders and making sure that PC DX12 SM6 requires Resource Binding Tier 2 or higher.
We don't want to restrict other shaders to resource binding tier 2 or higher even for CFLAG_ForceDXC or CFLAG_WaveOperations.
Invalidating PCD3D_SM5 and PCD3D_SM6 shaders.

#rb yuriy.odonnell
#preflight 646cd8d764351d76f32b449c

[CL 25585973 by christopher waters in ue5-main branch]
2023-05-23 13:05:47 -04:00
christopher waters
20984328ea Removing the cvar lookup string for shader dead code removal in all shader formats. This cvar can't be loaded on SCW startup so it was causing a hash mismatch.
#rb yuriy.odonnell
#preflight 646bc8f764351d76f3c85f5e

[CL 25570191 by christopher waters in ue5-main branch]
2023-05-22 16:57:05 -04:00
christopher waters
5b751e83bd Cleaning up more platform code.
#jira UE-185135
#rb robert.srinivasiah
#preflight 64628533aa3c584c0b0af08d

[CL 25480257 by christopher waters in ue5-main branch]
2023-05-15 16:56:55 -04:00
bryan sefcik
da92084a12 Optimized out more private modules includes and dependencies.
#preflight 64627c382965f6ea8ea83bd6

[CL 25479683 by bryan sefcik in ue5-main branch]
2023-05-15 16:26:12 -04:00
bryan sefcik
d205101cc8 Removed unnecessary private include modules.
#preflight 645da640cf788a25581110bb

[CL 25451545 by bryan sefcik in ue5-main branch]
2023-05-12 12:13:52 -04:00
Steve Robb
e8df23c174 Fixed mismatched copy constructor/assignment operator in FixedSizeString.
#rb none
#jira none
#preflight 645919bc6c35ad81e621217a

[CL 25372020 by Steve Robb in ue5-main branch]
2023-05-08 12:18:34 -04:00
Laura Hermanns
b8c526c389 DXC and SPIRV-Cross fixes to enable Substrate in D3D11:
- Support structured buffers in HLSL backend of SPIRV-Cross (PR #2143).
- Integrate SPIRV-Cross fix to forward opaque types in GLSL backend (PR #2110).
- Integrate SPIRV-Cross fix to use actual field offset to validate vec4 boundary alignment (#PR 2139).
- Integrate SPIRV-Cross fix to not restrict SV_RenderTargetArrayIndex to GS and MS (#PR 2138).
- Make SV_Position decoration as implicitly invariant optional (Used to address Z-fighting issues in Vulkan and Metal; Drastically impacts vertex shader performance on certain platforms).
- Don't force DXC for all shaders when r.Substrate is enabled.

#jira UE-174555
#rb Sebastien.Hillaire, Carl.Lloyd, Dan.Elksnitis
#fyi Brian.White, Jason.Nadro, JeaNoe.Morissette, Yuriy.Odonnell, Guillaume.Abadie
#preflight 6453d3df0e33f2d51d2b032e

[CL 25353473 by Laura Hermanns in ue5-main branch]
2023-05-05 09:21:36 -04:00
dan elksnitis
0294247b5a [shaders] migrate PC D3D backends to independent preprocessing shaderformat API
#rb Yuriy.ODonnell
#rb Laura.Hermanns
#preflight 6453b1861c2846595c5e7919

[CL 25333986 by dan elksnitis in ue5-main branch]
2023-05-04 09:36:33 -04:00
Joe Kirchoff
9e16fda808 Set LiveCodingServer to compile with c++17
#rnx
#rb trivial
#preflight 6442df10f126d87e4532e22c

[CL 25151841 by Joe Kirchoff in ue5-main branch]
2023-04-21 15:33:02 -04:00
dan elksnitis
26464b581b [shaders] further rework of parameter parser API to simplify the independent preprocessing use case, plus adding serialization support and some minor cleanup.
#preflight 6442af0ec023bb1f734fc0d1
#rb Christopher.Waters

[CL 25148947 by dan elksnitis in ue5-main branch]
2023-04-21 13:45:43 -04:00