microsoft / microsoft/DirectXShaderCompiler

Validation error "DXIL intrinsic overload must be valid"

Open
#2,202 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
3.7k
Forks
900
Avg merge
2d 11h
Merged PRs (30d)
44

Description

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) :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by compiling the attached test.txt shader with dxc -E ps_main -T ps_6_0 and reproduce the DXIL intrinsic overload validation error in ps_main. Trace the validation diagnostic to determine why it lacks a source location, then make the error identify the ambiguous expression and verify the improved output with this reproducer.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.