DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

Add literal eval property to intrinsics; improve literal arg conversion

Open tex3d opened this issue 3 years ago • 3 comments

  • 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

tex3d avatar Sep 14 '21 04:09 tex3d

:x: Build DirectXShaderCompiler 1.0.499 failed (commit https://github.com/microsoft/DirectXShaderCompiler/commit/1d6028a814 by @tex3d)

AppVeyorBot avatar Sep 14 '21 05:09 AppVeyorBot

:x: Build DirectXShaderCompiler 1.0.510 failed (commit https://github.com/microsoft/DirectXShaderCompiler/commit/c205d7415f by @tex3d)

AppVeyorBot avatar Sep 18 '21 02:09 AppVeyorBot

:white_check_mark: Build DirectXShaderCompiler 1.0.548 completed (commit https://github.com/microsoft/DirectXShaderCompiler/commit/e0563d2cf4 by @tex3d)

AppVeyorBot avatar Sep 24 '21 17:09 AppVeyorBot

@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.

llvm-beanz avatar Apr 15 '24 17:04 llvm-beanz