summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-validate.cpp
diff options
context:
space:
mode:
authorvenkataram-nv <vedavamadath@nvidia.com>2025-07-18 09:38:00 -0700
committerGitHub <noreply@github.com>2025-07-18 16:38:00 +0000
commit48b6e2432ea28c06d04931fccd633e31eed6d995 (patch)
treeb976380fd3464b231275e0ae2c1c6ac8af1bb6c3 /source/slang/slang-ir-validate.cpp
parent85edfb178cd243134f4bb3d35ad71f154d76c81c (diff)
Lower int/uint/bool matrices to arrays for SPIRV (#7687)
* Add tests for expected behaviour * Allow matrix types in logical or/and * Legalize int/bool matrix types and construction with makeMatrix * Legalize uint matrices and operations * Limit testing to only SPIRV * Better tests for int and bool * Add test for uint * Remove GLSL tests * Remove old test for diagnosing int matrices * Emit SPIRV directly in tests * format code * Address PR comments * Improve testing * Address PR comments * format code * Add tests for matrix intrinsic operations * Move matrix lowering to dedicated legalization pass * Fix compiler warning * Remove signal again * Reorder matrix and vector legalization * Fix formatting * Add shift and comparison tests --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-ir-validate.cpp')
-rw-r--r--source/slang/slang-ir-validate.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/source/slang/slang-ir-validate.cpp b/source/slang/slang-ir-validate.cpp
index bf5d8ed5d..156fe249f 100644
--- a/source/slang/slang-ir-validate.cpp
+++ b/source/slang/slang-ir-validate.cpp
@@ -598,21 +598,9 @@ void validateVectorsAndMatrices(
}
}
- // Verify that the element type is a floating point type, or an allowed integral type
- auto elementType = matrixType->getElementType();
- uint32_t allowedWidths = 0U;
- if (isCPUTarget(targetRequest))
- allowedWidths = 8U | 16U | 32U | 64U;
- else if (isCUDATarget(targetRequest))
- allowedWidths = 32U | 64U;
- else if (isD3DTarget(targetRequest))
- allowedWidths = 16U | 32U;
- validateVectorOrMatrixElementType(
- sink,
- matrixType->sourceLoc,
- elementType,
- allowedWidths,
- Diagnostics::matrixWithDisallowedElementTypeEncountered);
+ // Matrix element type validation removed to allow integer/bool matrices
+ // which will be lowered to arrays of vectors on targets that don't support them
+ // natively
}
else if (auto vectorType = as<IRVectorType>(globalInst))
{