Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Algorithm::createParameters()
KP_LOG_DEBUG("Kompute Algorithm createParameters started");

for (const std::shared_ptr<Memory>& mem : this->mMemObjects) {
if (mem->type() == Memory::Type::eImage) {
if (mem->getDescriptorType() == vk::DescriptorType::eStorageImage) {
numImages++;
} else {
numTensors++;
Expand Down
5 changes: 2 additions & 3 deletions src/OpAlgoDispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ OpAlgoDispatch::record(const vk::CommandBuffer& commandBuffer)

// For images the image layout needs to be set to eGeneral before using
// it for imageLoad/imageStore in a shader.
if (mem->type() == Memory::Type::eImage) {
std::shared_ptr<Image> image = std::static_pointer_cast<Image>(mem);

std::shared_ptr<Image> image = std::dynamic_pointer_cast<Image>(mem);
if (image) {
image->recordPrimaryImageBarrier(
commandBuffer,
vk::AccessFlagBits::eTransferWrite,
Expand Down
Loading