mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 09:25:25 +00:00
sem::Matrix: Pass the column type to the constructor
It's common to want this when indexing matrices. Change-Id: Ic60a3a8d05873119d78a3cb0860d129e33ac3525 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49880 Reviewed-by: James Price <jrprice@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
b432f232b5
commit
6c1cf6569e
@@ -58,7 +58,8 @@ TEST_F(CreateASTTypeForTest, Basic) {
|
||||
|
||||
TEST_F(CreateASTTypeForTest, Matrix) {
|
||||
auto* mat = create([](ProgramBuilder& b) {
|
||||
return b.create<sem::Matrix>(b.create<sem::F32>(), 2, 3);
|
||||
auto* column_type = b.create<sem::Vector>(b.create<sem::F32>(), 2u);
|
||||
return b.create<sem::Matrix>(column_type, 3u);
|
||||
});
|
||||
ASSERT_TRUE(mat->Is<ast::Matrix>());
|
||||
ASSERT_TRUE(mat->As<ast::Matrix>()->type()->Is<ast::F32>());
|
||||
|
||||
Reference in New Issue
Block a user