DirectXShaderCompiler
DirectXShaderCompiler copied to clipboard
Add literal eval property to intrinsics; improve literal arg conversion
- Change independent BOOL flag arguments in HLSL_INTRINSIC to Flags
- Add flag for literal eval
- Avoid preserving literal types when literal eval is not supported
- This will help prevent 64-bit ops from being generated by accident
- Move literal conversions to after first pass at argument resolution
- Prefer int over uint for positive literal that fits
Note: introduces breaking change to HLSL_INTRINSIC structure, so external intrinsics will have to be adjusted.
Fixes #3380
:x: Build DirectXShaderCompiler 1.0.499 failed (commit https://github.com/microsoft/DirectXShaderCompiler/commit/1d6028a814 by @tex3d)
:x: Build DirectXShaderCompiler 1.0.510 failed (commit https://github.com/microsoft/DirectXShaderCompiler/commit/c205d7415f by @tex3d)
:white_check_mark: Build DirectXShaderCompiler 1.0.548 completed (commit https://github.com/microsoft/DirectXShaderCompiler/commit/e0563d2cf4 by @tex3d)
@tex3d, we discussed this PR and the associated issues in the morning triage meeting. Since this issue will be resolved with the HLSL 202x Conforming Literals feature, we do not want to continue pursuing this change. As a result I'm closing this PR per the triage discussion.