Skip to content

Validation error "DXIL intrinsic overload must be valid" #2202

Open

Description

@SirTimothy

Hey, I encountered a problem while compiling some shaders through dxcompile (normally we're using d3dcompile), with a cryptic validation error message.

Managed to narrow it down, and can reproduce with the attached shader: test.txt

Gives for output:

dxc -E ps_main -T ps_6_0 test.hlsl

error: validation errors
at 0x280ab609bc0 inside block #0 of function ps_main DXIL intrinsic overload must be valid

Validation failed.

My guess is that it can't decide whether to implicitly convert the ?: result from float3 down to float, or bump the 1.0 second dot argument up to float3. I think some improved error message for this would be useful (didn't get any line number or anything) :)

Activity

  1. tristanlabelle commented on May 22, 2019

    @tristanlabelle
    Contributor

    Thanks for reporting! It looks like the ternary operator with two literal float values resolves to the double type, which there is no overload of dot for. The poor error message would be because the semantic analysis thinks there is a dot overload for double but the codegen disagrees. A workaround is to suffix the two values with f.

  2. llvm-beanz commented on Jun 11, 2024

    @llvm-beanz
    Collaborator

    Godbolt link: https://godbolt.org/z/e54rbcoPn

    Clang does not exhibit this bug, but it is still present in DXC.

  3. added this to the Dormant milestone on Jun 11, 2024
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

    bug

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions