You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implicit cast from float1 to inout float3 hits an assert for DXIL #6796
$ dxc -T cs_6_6 -E main repro.hlsl
EmitNumericConversion can only cast between scalars or vectors of matching sizesdxc: DirectXShaderCompiler/tools/clang/lib/CodeGen/CGHLSLMS.cpp:4328: llvm::Value* ConvertScalarOrVector(clang::CodeGen::CGBuilderTy&, clang::CodeGen::CodeGenTypes&, llvm::Value*, clang::QualType, clang::QualType): Assertion `false && "EmitNumericConversion can only cast between scalars or vectors of " "matching sizes"' failed.
Aborted (core dumped)
This however is allowed and just warns for the implicit truncation.
Nathan Gauër (@Keenuts):
We don't think that float1 should implicitly extend to float3. Going forward, we expect that clang will reject this case.
In fact, we also have questions about whether or not the scalar case should be allowed. We haven't bottomed out yet on whether or not this case will be accepted in clang.
Moving to the HLSL 202x milestone - this is something we should tighten up in DXC to ensure that it is more closely aligned to the behavior in clang.
Activity
damyanp commentedon Jul 18, 2024
Nathan Gauër (@Keenuts):
We don't think that
float1should implicitly extend tofloat3. Going forward, we expect that clang will reject this case.In fact, we also have questions about whether or not the scalar case should be allowed. We haven't bottomed out yet on whether or not this case will be accepted in clang.
Moving to the HLSL 202x milestone - this is something we should tighten up in DXC to ensure that it is more closely aligned to the behavior in clang.