Commit Graph

6 Commits

Author SHA1 Message Date
Yuriy ODonnell
fc92061821 Automatic bindless resource declaration conversion step will now explicitly expand AUTO_BINDLESS_SAMPLER/RESOURCE_INDEX/VARIABLE macros
This is required because subsequent shader compilation steps assume that the code has been fully preprocessed. In particular, the dead code elimination system does not handle macros such as ones in BindlessResources.ush.

#preflight 63bef4ba6e6e8d4662ffd485
#rb christopher.waters

[CL 23649118 by Yuriy ODonnell in ue5-main branch]
2023-01-11 13:03:47 -05:00
christopher waters
f5ff98f2e1 ShaderParameterParser cleanup
- Making ConstantBufferType a constructor only argument. This removes the duplicated logic of calling ShouldUseStableConstantBuffer.
- Moving ShouldUseStableConstantBuffer to ShaderCompilerCommon.
- Made UE::ShaderCompilerCommon::ParseParameterType array arguments const

#jira UE-166341
#rb Guillaume.Abadie
#preflight 634eeceea1527f6b3bda9ff0

[CL 22608320 by christopher waters in ue5-main branch]
2022-10-18 15:25:05 -04:00
christopher waters
66f2a6bcc5 Make the parsed resource/sampler name be the authoritative casing of the variable names. The rest of the shader system is case insensitive but the shader code that uses the variables isn't, so we need to preserve the case we found in the shader.
#jira UE-166341
#rb Guillaume.Abadie, mihnea.balta, jeannoe.morissette
#preflight 634055772a0a2c1ead83dc02

[CL 22404161 by christopher waters in ue5-main branch]
2022-10-07 13:35:29 -04:00
christopher waters
2a22fbe25b Bindless Resource shader support
- Adding better support for resources that have multiple template arguments (Texture2DMS<float4,2>, etc).
- Requires typedef'ing all Resource types to avoid their extra comments being given to our AUTO_BINDLESS macros
- Adding support for globallycoherent
- Reworked BindlessConversionType to use its own enum.

#jira UE-166341
#rb guillaume.abadie, elizabeth.baumel
#preflight 633f2bde587d6afac82007e4

[CL 22383098 by christopher waters in ue5-main branch]
2022-10-06 16:27:11 -04:00
christopher waters
a987160f55 Reworking the parameter rewrite code to do automatic bindless
- Refactoring FShaderParameterParser to use more string views since we can rely on OriginalParsedShader not changing.
- Split FShaderParameterParser::ParseAndMoveShaderParametersToRootConstantBuffer into smaller functions
- Moving FShaderParametersMetadata::IterateShaderParameterMembers into the only module it's used in, ShaderParameterParser.cpp
- Adding CFLAG_BindlessResources which will be set when ENABLE_BINDLESS_RESOURCES is set
- Adding CFLAG_BindlessSamplers which will be set when ENABLE_BINDLESS_SAMPLERS is set
- Adding resource/sampler detection and conversion to bindless in FShaderParameterParser

#jira UE-139616
#rb guillaume.abadie, jeannoe.morissette, yuriy.odonnell, laura.hermanns
#preflight 62d180cce468fcfd0b7001a0

[CL 21111994 by christopher waters in ue5-main branch]
2022-07-15 12:25:44 -04:00
christopher waters
b28a0c467f Moving ShaderParameterParser into its own source files.
#jira none
#rb guillaume.abadie, kenzo.terelst
#preflight 62b0ecb8ec13d14b5a1897ba

[CL 20757788 by christopher waters in ue5-main branch]
2022-06-21 10:49:56 -04:00