Files
UnrealEngineUWP/Engine/Source/Developer/Windows
arciel rekman f0ecaa7e5b Keep rewriting unused inputs until they stop changing (UE-115083)
- In a complex material, compiler may not be able to see through the code to discover all unused inputs.

E.g. first pass compilation says that input A is unused, but B and C are used. After we rewrite the code to remove A, the code is simpler and compiler is now able to see that B is also unused.

Since we pass the "used attributes" to the next stage, this creates a mismatch where vertex shader outputs only C, but pixel shader (rewritten based on the first pass results) expects B and C.

- The fixed code will check if the unused inputs changed, and if so, will go back and rewrite the code based on a more complete info.

- This fixes a bug that JonL ran into for which I haven't yet created a JIRA (will do before checkin).

#rb Ben.Ingram, Rolando.Caloca, Jason.Nadro
[REVIEW] [at]Lukas.Hermanns, [at]Rolando.Caloca, [at]Ben.Ingram, [at]Jason.Nadro, [at]Kevin.Ortegren
#jira UE-115083

#ROBOMERGE-SOURCE: CL 16312596 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16312617 by arciel rekman in ue5-release-engine-test branch]
2021-05-13 10:22:48 -04:00
..
2021-04-27 06:40:20 -04:00