[FYI] dan.elksnitis
Original CL Desc
-----------------------------------------------------------------
[shaders]
- move population of output.target field into core code so each backend doesn't need to do it manually (do so before calling the compile function so any existing code expecting the output field to be set at any point during the compile process is unaffected)
- add a check in FShaderCompileJob::SerializeOutput and FShaderCompileJob::SerializeWorkerOutput that the FShaderTarget for a job output matches that of its input. This should catch cases of shaders with the wrong frequency being associated with jobs; further the callstack should indicate where this incorrect association is coming from (since SerializeOutput is called in different places for each cache path: duplicate in-flight jobs, jobs which hit in the in-memory job cache, and jobs which hit in the DDC cache, and SerializeWorkerOutput is only called when the job is read back from SCW output).
#rb Laura.Hermanns
[CL 35080902 by dan elksnitis in ue5-main branch]
- move population of output.target field into core code so each backend doesn't need to do it manually (do so before calling the compile function so any existing code expecting the output field to be set at any point during the compile process is unaffected)
- add a check in FShaderCompileJob::SerializeOutput and FShaderCompileJob::SerializeWorkerOutput that the FShaderTarget for a job output matches that of its input. This should catch cases of shaders with the wrong frequency being associated with jobs; further the callstack should indicate where this incorrect association is coming from (since SerializeOutput is called in different places for each cache path: duplicate in-flight jobs, jobs which hit in the in-memory job cache, and jobs which hit in the DDC cache, and SerializeWorkerOutput is only called when the job is read back from SCW output).
#rb Laura.Hermanns
[CL 35053511 by dan elksnitis in ue5-main branch]
- Moving various UB booleans into a flags enum.
- UB booleans could not be reasonably deprecated without incurring memory overhead, so this will break custom code that uses them.
- Adding UB flag to force the shader compilers to generate reflection for the UB members which are normally excluded from reflection.
- Adding UB flag that tells MeshCommands that a UB will be bound during pass drawing and that it doesn't need to be set via MDCs.
- New flags are not used in this CL, they are prerequisites for subsequent, larger changes.
#rb jeannoe.morissette
[CL 34356503 by christopher waters in ue5-main branch]
Interface variable scalar replacement pass rewrite (added as a new pass into spirv-opt, will replace existing one in future).
Things done so far:
- Rewritten to properly handle non-aggregate types and other tricky cases (both for Patch decorated variables and not)
- Matrix scalarization is now optional.
- More test cases added
- Path is now exposed as a command-line flag
- Fixed https://github.com/KhronosGroup/SPIRV-Tools/issues/4795
Few shaders contained loops, which were not unrolled, leading to the scalarization pass to fail. Loops were not unrolled due to "complex" condition expression. Those are changed to be accepted by the loop unroller (induction variable is the only lhs in the condition expression now).
This new pass is now always enabled for both Vulkan/GLES shaders for Android.
Multiple location remapping passes were removed: one was overriding another one results + not needed now due to arrays being removed by the scalarization pass.
#rb carl.lloyd, denys.mentiei
[FYI] Dmitriy.Dyomin, Allan.Bentham
[CL 34122278 by laura hermanns in ue5-main branch]
[FYI] denys.mentiei
Original CL Desc
-----------------------------------------------------------------
[Shaders] SPIRV-Tools pass rewrite
Interface variable scalar replacement pass rewrite (added as a new pass into spirv-opt, will replace existing one in future).
Things done so far:
- Rewritten to properly handle non-aggregate types and other tricky cases (both for Patch decorated variables and not)
- Matrix scalarization is now optional.
- More test cases added
- Path is now exposed as a command-line flag
- Fixed https://github.com/KhronosGroup/SPIRV-Tools/issues/4795
Few shaders contained loops, which were not unrolled, leading to the scalarization pass to fail. Loops were not unrolled due to "complex" condition expression. Those are changed to be accepted by the loop unroller (induction variable is the only lhs in the condition expression now).
This new pass is now always enabled for both Vulkan/GLES shaders for Android.
Multiple location remapping passes were removed: one was overriding another one results + not needed now due to arrays being removed by the scalarization pass.
#rb carl.lloyd, Laura.Hermanns
[FYI] Dmitriy.Dyomin, Allan.Bentham
[CL 34107760 by laura hermanns in ue5-main branch]
Interface variable scalar replacement pass rewrite (added as a new pass into spirv-opt, will replace existing one in future).
Things done so far:
- Rewritten to properly handle non-aggregate types and other tricky cases (both for Patch decorated variables and not)
- Matrix scalarization is now optional.
- More test cases added
- Path is now exposed as a command-line flag
- Fixed https://github.com/KhronosGroup/SPIRV-Tools/issues/4795
Few shaders contained loops, which were not unrolled, leading to the scalarization pass to fail. Loops were not unrolled due to "complex" condition expression. Those are changed to be accepted by the loop unroller (induction variable is the only lhs in the condition expression now).
This new pass is now always enabled for both Vulkan/GLES shaders for Android.
Multiple location remapping passes were removed: one was overriding another one results + not needed now due to arrays being removed by the scalarization pass.
#rb carl.lloyd, Laura.Hermanns
[FYI] Dmitriy.Dyomin, Allan.Bentham
[CL 34100366 by denys mentiei in ue5-main branch]
- TCHAR* arguments were being used to find elements in a TMap<FString,..> which creates temporary memory allocations.
- We can use FStringView with FindByHash/RemoveByHash to prevent temporary allocations.
- Adding FShaderParameterMap::FindAndRemoveParameterAllocation as a shortcut for Find+Remove (which Uniform Buffer member handling does).
- Fixing a few locations that were going FString->TCHAR*->FString.
#rb Laura.Hermanns
[CL 34065428 by christopher waters in ue5-main branch]