- 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]
OpenGL ES and Metal use framebuffer fetch.
Vulkan uses dual source blending.
For Vulkan and OpenGL ES there is a fallback shader permutation for drivers that don't support this. The fallback is the same as the existing solution that uses regular blending (i.e. looks different).
Others uses dual source blending and we force use of DXC for those shaders.
#rb Dmitriy.Dyomin, Florin.Pascu
[CL 29245271 by florian penzkofer in ue5-main branch]
- 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]
- enable minifier deadstripping for OpenGL shader format; bytecode is a 100% match with this change on multiple tested projects so it seems safe to enable
- deprecate FOpenGLFrontend; nothing in available code appears to inherit from it anymore so the API appears unnecessary. this makes the OpenGL shader format more similar to others (which do not expose compilation functions as API)
#rb Jason.Nadro
#rb Laura.Hermanns
#rb Yuriy.ODonnell
[CL 27338803 by dan elksnitis in ue5-main branch]
- mostly just replacing them AllowWindowsPlatformTypes.h / HideWindowsPlatformTypes.h
- some other files had both Pre/PostWindowsApi.h and Allow/HideWindowsPlatformTypes.h, so just removed
- some occasional include order changes.
#jira UE-152863
#rnx
#rb Devin.Doucette
[CL 26985385 by david harvey in ue5-main branch]
Fixed bug where sampler names were matched incorrectly
#rb Jack.porter
#jira UE-177856
#preflight 6405f2f45515f4f57bd2543d
[CL 24525319 by carl lloyd in ue5-main branch]
The shader code output contains a little bit of plaintext such as I/O identifiers and the shader name, which was generated for the DXC backend in a way that prevents caching.
This unifies the shader name in the output code and improves the cache hit ratio for a Lyra cook from 0% to roughly 50% cache hits (for certain platforms).
#rb Jason.Nadro, Carl.Lloyd
#fyi Brian.White, Arciel.Rekman, Brandon.Schaefer
#jira FORT-548603
#preflight 63e26c6c07207b2570ba2d5b
#rnx
[CL 24050212 by Laura Hermanns in ue5-main branch]