Skip to content

Determine differences between language supported by DXC and Clang that require changes to DML shaders #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
spall opened this issue Feb 24, 2025 · 3 comments
Assignees

Comments

@spall
Copy link
Collaborator

spall commented Feb 24, 2025

Determine and document differences between language supported by DXC and Clang.
create issues to update DML shaders

@spall spall moved this to Designing in HLSL Support Feb 24, 2025
@farzonl
Copy link
Member

farzonl commented Mar 31, 2025

We need to burn down this list

error: call to 'clamp' is ambiguous
error: Unsupported intrinsic for DXIL lowering
error: call to 'dot' is ambiguous
error: call to 'min' is ambiguous
error: Cannot create BufferLoad operation: Invalid overload type
error: Cannot create BufferStore operation: Invalid overload type
error: call to 'max' is ambiguous
error: Cannot create RawBufferLoad operation: Invalid overload type
error: call to 'WaveReadLaneAt' is ambiguous
error: Cannot create RawBufferStore operation: Invalid overload type
error: clang frontend command failed with exit code 134 (use -v to see invocation)
error: no matching function for call to 'select'
error: invalid operands to binary expression ('float16_t' (aka 'half') and 'int')
error: array initializer must be an initializer list
error: call to 'rcp' is ambiguous
error: assigning to 'uint32_t8' (aka 'vector<uint, 4>[2]') from incompatible type 'hlsl_constant uint32_t8' (aka 'hlsl_constant vector<uint, 4>[2]')
error: invalid operands to binary expression ('float32_t' (aka 'float') and 'int')
error: expected ';' after return statement
error: call to 'pow' is ambiguous
error: call to 'Sub' is ambiguous

@farzonl farzonl self-assigned this Mar 31, 2025
@farzonl farzonl moved this from Designing to Ready in HLSL Support Apr 7, 2025
@farzonl
Copy link
Member

farzonl commented Apr 19, 2025

The list is now:

5040x error: resource has implicit register binding [-Whlsl-implicit-binding]
324x error: clang frontend command failed with exit code 134 (use -v to see invocation)
    ScalarExprEmitter::VisitOpaqueValueExpr
    OpLowerer::cleanupHandleCasts()
    DXILResourceAccessLegacy::runOnFunction
    clang::CodeGen::CodeGenFunction::getOrCreateOpaqueRValueMapping(clang::OpaqueValueExpr const*)
20x error: array initializer must be an initializer list
16x error: assigning to 'uint32_t8' (aka 'vector<uint, 4>[2]') from incompatible type 'hlsl_constant uint32_t8' (aka 'hlsl_constant vector<uint, 4>[2]')

The last two issues there are open PRs for:
llvm/llvm-project#133508
llvm/llvm-project#134174

@farzonl
Copy link
Member

farzonl commented Apr 22, 2025

Remainng errors after memset pr lands:

609x error: resource has implicit register binding [-Whlsl-implicit-binding]
248x error: Cannot create BufferLoad operation: Invalid overload type
248x error: Cannot create BufferStore operation: Invalid overload type
182x error: binding type 't' only applies to SRV resources
116x error: Cannot create RawBufferLoad operation: Invalid overload type
100x error: Cannot create RawBufferStore operation: Invalid overload type
20x error: array initializer must be an initializer list
8x error: Unsupported intrinsic llvm.memcpy.p0.p2.i32 for DXIL lowering
4x error: Unsupported intrinsic llvm.memcpy.p3.p3.i32 for DXIL lowering
2x error: clang frontend command failed with exit code 139 (use -v to see invocation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

2 participants