Skip to content

[SM6.10] TriangleObjectPositions shaders fail DXIL validation with optimizations disabled #8938

Description

Description
Reported on the DirectX Discord server, compiling any SM6.10 shader that uses TriangleObjectPositions() with optimizations disabled fails validation.

Steps to Reproduce
https://godbolt.org/z/4vKWzv6df

Actual Behavior

%8 = insertvalue %struct.BuiltInTrianglePositions undef, <3 x float> %7, 0, !dbg !66

The insertvalue instruction isn't valid LLVM IR. With optimizations disabled, a struct is constructed one field at a time, and then values are re-extracted. With optimizations enabled, the struct disappears entirely.

Environment

  • dxc(private) 1.9.0.10001 (main, a613cf9)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashneeds-triageAwaiting triage

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions