Commit Graph

666 Commits

Author SHA1 Message Date
christopher waters
15bc726977 Adding Barycentrics support checks
- Adding EShaderCodeFeatures::Barycentrics
- Adding GRHIGlobals.SupportsBarycentricsSemantic
- Adding FDataDrivenShaderPlatformInfo::GetSupportsBarycentricsIntrinsics to control COMPILER_SUPPORTS_BARYCENTRIC_INTRINSICS
- Adding FDataDrivenShaderPlatformInfo::GetSupportsBarycentricsSemantic to control PLATFORM_SUPPORTS_BARYCENTRICS_SEMANTIC

#jira UE-193429
#rb graham.wihlidal, mihnea.balta

[CL 29771745 by christopher waters in ue5-main branch]
2023-11-16 00:28:03 -05:00
daniele vettorel
1baceeffbf Bump PC SM6 and SM5 GUIDs.
[CL 29723661 by daniele vettorel in ue5-main branch]
2023-11-14 15:34:43 -05:00
daniele vettorel
b7da497a83 Fix merge error
[CL 29723250 by daniele vettorel in ue5-main branch]
2023-11-14 15:22:04 -05:00
daniele vettorel
e39770acde Support exporting shader symbols info for PC D3D_SM6 shaders.
The PDB name is either retrieved from the PDB blob part of DXC's output, or is generated using the shader hash that DXC reports even when no PDB is requested. We don't export PDBs because it would result in duplicate data as we use embedded PDBs.

#rb christopher.waters, Laura.Hermanns

[CL 29723169 by daniele vettorel in ue5-main branch]
2023-11-14 15:18:29 -05:00
christopher waters
ceded8a2b5 Reworking D3D Shader Format support checks
- ELanguage and Input flags were being used inconsistently to determine defines and shader profiles to use.
- ED3DShaderModel now communicates the exact shader model to use to the FXC and DXC backends.
- Moved all D3D custom definitions to ModifyShaderCompilerInput
- D3D definitions have been fixed to be based on specific needs of input flags. ie- "PLATFORM_MAX_SAMPLERS" doesn't imply that wave operations are wanted/supported.

#jira UE-199838
#rb laura.hermanns, michael.wanderson

[CL 29632531 by christopher waters in ue5-main branch]
2023-11-10 01:03:12 -05:00
christopher waters
6f3f63b186 Bindless Conversion Changes
- Removing the need for COMPILER_DEFINE on GetResourceFromHeap and GetSamplerFromHeap
- FShaderParameterParser constructor now requires a FPlatformConfiguration object that each shader format can configure.
- FPlatformConfiguration::GenerateBindlessAccess allows each platform to generate the code for accessing a bindless resource or sampler.
- Added EShaderParameterParserConfigurationFlags to specify support for stable constant buffers and bindless.
- Moved EBindlessParameterMode into EShaderParameterParserConfigurationFlags::BindlessUsesArrays
- While moving things around, I was able to convert some TCHAR* uses to FStringView

#jira UE-166341
#rb mihnea.balta

[CL 29533376 by christopher waters in ue5-main branch]
2023-11-07 16:26:20 -05:00
laura hermanns
5c83a2db3f Workaround FXC validation errors for cross-compiled HLSL:
- Compile a 2nd time internally defined rule disabled.
- Compile a 3rd time without optimizations as a last resort.

#jira UE-197481
#rb Jason.Nadro, Dan.Elksnitis, Sebastien.Hillaire
#rnx

[CL 29408297 by laura hermanns in ue5-main branch]
2023-11-03 11:40:34 -04:00
tim smith
6fcbe51e16 Removed usage of include file macros from LiveCoding source since it was causing issues with SN-DBS
#rb tim.smith

[CL 29401475 by tim smith in ue5-main branch]
2023-11-03 07:04:54 -04:00
laura hermanns
1daf299a10 Patch order of entry point parameters in cross-compiled HLSL of D3D11 backend using HlslParser.
#jira UE-186066
#rb Dan.Elksnitis
#rnx

[CL 29257708 by laura hermanns in ue5-main branch]
2023-10-30 19:37:05 -04:00
dan elksnitis
54fb5cf56d [shaders] further deprecation (SupportsIndependentPreprocessing/OptionalFinalShaderSource/bIndependentPreprocessed are no longer needed since all backends are migrated)
#rb Laura.Hermanns

[CL 29117027 by dan elksnitis in ue5-main branch]
2023-10-25 22:21:30 -04:00
jason hoerner
0e18ea7e81 Shader Preprocessor: Roll TEXT macro substitution into the C preprocessor step, via custom macro callback feature, making it effectively free. Saves 3% overall on preprocess, but also represents a simplification by reducing the number of unique preprocess passes.
#jira UE-198496
#rnx
#rb dan.elksnitis yuriy.odonnell jason.nadro

[CL 29100104 by jason hoerner in ue5-main branch]
2023-10-25 16:01:11 -04:00
laura hermanns
01a703a287 Removed dead code from D3D12 shader backend.
#rb Jason.Nadro
#rnx

[CL 29044354 by laura hermanns in ue5-main branch]
2023-10-24 09:04:59 -04:00
christopher waters
0403f2caa0 Always set the HLSL version and don't assume the default is 2018.
#rb David.Harvey, Yuriy.Odonnell

[CL 28692390 by christopher waters in ue5-main branch]
2023-10-11 19:52:44 -04:00
joe kirchoff
be5805fdca Fix some comments that give the wrong instructions when a module is forcing cpp17
#rnx

[CL 28690858 by joe kirchoff in ue5-main branch]
2023-10-11 19:24:34 -04:00
laura hermanns
0320f2f528 D3D11 cross-compilation fixes:
- Patch HLSL to support SV_DepthGreaterEqual and SV_DepthLessEqual.
- Maintain order of shader input/output variables in cross-compiled HLSL.

#rb Jason.Nadro
#jira UE-186066, UE-192125
#rnx

[CL 28633421 by laura hermanns in ue5-main branch]
2023-10-10 15:30:19 -04:00
christopher waters
ec680fbdc7 Fixing NonUnity compile error.
[CL 28569952 by christopher waters in ue5-main branch]
2023-10-07 15:02:44 -04:00
christopher waters
6859d15ab4 Shader Parameter Parser changes
- Moving more uses of ShaderParameterParse from Preprocessing to Compile step.
- Adding a "DidModifyShader" flag to ShaderParameterParser to determine if Output.ModifiedShaderSource needs to be updated.

#jira UE-197328
#rb dan.elksnitis

[CL 28569175 by christopher waters in ue5-main branch]
2023-10-07 11:24:14 -04:00
laura hermanns
558f635cd4 Fix invalid virtual file paths from intermediate HLSL shader in D3D11 backend.
#rb Dan.Elksnitis
#jira UE-186066
#rnx

[CL 28511030 by laura hermanns in ue5-main branch]
2023-10-05 15:20:13 -04:00
joe kirchoff
540c318bfa Disable PCH for remaining C++17 modules to prevent making PCH variants
#rnx

[CL 28482531 by joe kirchoff in ue5-main branch]
2023-10-04 19:25:49 -04:00
joe kirchoff
aeca895d45 Fix compile issue with cl-clang
#rnx

[CL 28427476 by joe kirchoff in ue5-main branch]
2023-10-03 15:38:41 -04:00
joe kirchoff
73351e628e UnrealBuildTool: Remove VS2019 as a supported source code access ide
#jira UE-190039

[CL 28384888 by joe kirchoff in ue5-main branch]
2023-10-02 13:37:03 -04:00
christopher waters
cf3272d4e6 Bumping the SM6 version to force all D3D RT shaders to rebuild.
#jira UE-196567

[CL 28313514 by christopher waters in ue5-main branch]
2023-09-28 07:08:10 -04:00
graham wihlidal
5605de3a9d Refactored DXC RemoveContainerReflection into RemoveContainerParts that can remove additional parts. Also disabled post compile signing step for now.
#rb christopher.waters

[CL 28262563 by graham wihlidal in ue5-main branch]
2023-09-26 23:49:12 -04:00
christopher waters
bb0a274b8c Reworking UniformBuffer code generation to not use an intermediate struct
- When generating Uniform Buffer HLSL code, a 'static const struct {} Name' was created which has been causing compiler issues off and on for years.
- When RemoveUniformBuffersFromSource removed said struct, it parsed the struct's structure to figure out how to translate UniformBuffer.Member into UniformBuffer_Member in code that accessed Uniform Buffers.
- Now, instead of a struct, a "UniformBuffer <Name>" declaration is created and filled with mappings from "UniformBuffer.Member" into the correct code.
- This allows ConstantBuffer objects to be used differently from cbuffer where the former generates "UniformBuffer.Member" and the latter generates "UniformBuffer_Member"
- This also allows resources to always be translated to "UniformBuffer_Member"
- Shader define 'PLATFORM_SUPPORTS_UB_STRUCT' is now 'PLATFORM_SUPPORTS_CONSTANTBUFFER_OBJECT' and will be set on shader formats that support ConstantBuffer<> objects.
- Removed lots of unused code from BindlessResources.ush

#jira UE-195103
#rb dan.elksnitis, jeannoe.morissette

[CL 28058373 by christopher waters in ue5-main branch]
2023-09-20 17:33:36 -04:00
graham wihlidal
d38867b1ec Do post-compile signing of DXIL containers to work around some validation issues.
[CL 27900803 by graham wihlidal in ue5-main branch]
2023-09-14 19:00:38 -04:00