Skip to content

Commit 27697df

Browse files
committed
algorithm: check DescriptorType when creating pool
The function that was prevously used, `mem->type()`, is not explicitly the same as the descriptor type, so using `mem->getDescriptorType()` is more accurate. It also makes it easier to create new image-like subclasses of `kp::Memory` because as long as they specify the correct descriptor type, the correct pools will be created.
1 parent 6e5380d commit 27697df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Algorithm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Algorithm::createParameters()
134134
KP_LOG_DEBUG("Kompute Algorithm createParameters started");
135135

136136
for (const std::shared_ptr<Memory>& mem : this->mMemObjects) {
137-
if (mem->type() == Memory::Type::eImage) {
137+
if (mem->getDescriptorType() == vk::DescriptorType::eStorageImage) {
138138
numImages++;
139139
} else {
140140
numTensors++;

0 commit comments

Comments
 (0)