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
[SPIR-V] EvaluateAttribute* on a matrix input emits invalid InterpolateAt* #9181
With -spirv, calling EvaluateAttributeAtSample, EvaluateAttributeCentroid or EvaluateAttributeSnapped on a matrix pixel shader input fails to compile. DXC emits a single GLSL.std.450 InterpolateAt* instruction with a matrix result type, and its own SPIR-V validation rejects it. The same shaders compile to DXIL, and the vector versions compile to SPIR-V.
fatal error: generated SPIR-V is invalid: GLSL.std.450 InterpolateAtSample: expected Result Type to be a 32-bit float scalar or vector type
%26 = OpExtInst %mat2v2float %1 InterpolateAtSample %in_var_ATTR0 %uint_1
note: please file a bug report on https://github.com/Microsoft/DirectXShaderCompiler/issues with source code if possible
Expected
The shader compiles to valid SPIR-V, as it does for DXIL. In GLSL.std.450, InterpolateAtCentroid, InterpolateAtSample and InterpolateAtOffset take only float scalars or vectors, never matrices. DXC could split the matrix into per-column vectors, interpolate each through an OpAccessChain into the input variable, and rebuild the matrix with OpCompositeConstruct.
Activity