summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/hlsl.meta.slang14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang
index 73e69fdf3..6a3ae63ec 100644
--- a/source/slang/hlsl.meta.slang
+++ b/source/slang/hlsl.meta.slang
@@ -26372,9 +26372,14 @@ CoopVec<T, M> coopVecMatMulPacked(
let inputInterpretationSpirv : int32_t = __getSpvCoopVecComponentType(inputInterpretation);
let memoryLayoutSpirv : int32_t = __getSpvCoopVecMatrixLayout(memoryLayout);
let matrixPtr = matrix.GetBufferPointer();
+ int operands = 0; // NoneKHR
+ if (__isSignedInt<T>())
+ {
+ operands |= 0x08; // MatrixResultSignedComponentsKHR
+ }
return spirv_asm
{
- result:$$CoopVec<T, M> = OpCooperativeVectorMatrixMulNV $input $inputInterpretationSpirv $matrixPtr $matrixOffset $matrixInterpretationSpirv $m $k $memoryLayoutSpirv $transpose $matrixStride;
+ result:$$CoopVec<T, M> = OpCooperativeVectorMatrixMulNV $input $inputInterpretationSpirv $matrixPtr $matrixOffset $matrixInterpretationSpirv $m $k $memoryLayoutSpirv $transpose $matrixStride !operands;
};
case hlsl:
@@ -26903,9 +26908,14 @@ CoopVec<T, M> coopVecMatMulPacked(
let inputInterpretationSpirv : int32_t = __getSpvCoopVecComponentType(inputInterpretation);
let memoryLayoutSpirv : int32_t = __getSpvCoopVecMatrixLayout(memoryLayout);
let matrixPtr = __getStructuredBufferPtr(matrix);
+ int operands = 0; // NoneKHR
+ if (__isSignedInt<T>())
+ {
+ operands |= 0x08; // MatrixResultSignedComponentsKHR
+ }
return spirv_asm
{
- result:$$CoopVec<T, M> = OpCooperativeVectorMatrixMulNV $input $inputInterpretationSpirv $matrixPtr $matrixOffset $matrixInterpretationSpirv $m $k $memoryLayoutSpirv $transpose $matrixStride;
+ result:$$CoopVec<T, M> = OpCooperativeVectorMatrixMulNV $input $inputInterpretationSpirv $matrixPtr $matrixOffset $matrixInterpretationSpirv $m $k $memoryLayoutSpirv $transpose $matrixStride !operands;
};
}
}