-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[spirv] Remove BufferBlock for array types #3039
Conversation
✅ Build DirectXShaderCompiler 1.0.3434 completed (commit a677681280 by @jaebaek) |
Just tested, this fixes the issue for us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of nits. Thanks
@@ -33,6 +33,23 @@ bool RemoveBufferBlockVisitor::visit(SpirvModule *mod, Phase phase) { | |||
return true; | |||
} | |||
|
|||
bool RemoveBufferBlockVisitor::HasStorageBufferInterfaceType( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/HasStorageBufferInterfaceType/hasStorageBufferInterfaceType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ptrResultType->getStorageClass() != | ||
spv::StorageClass::StorageBuffer) { | ||
if (ptrResultType->getStorageClass() != | ||
spv::StorageClass::StorageBuffer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can now do
if (hasStorageBufferInterfaceType(ptrResultType->getPointeeType()) &&
ptrResultType->getStorageClass() != spv::StorageClass::StorageBuffer) {
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your code review. PTAL!
@@ -33,6 +33,23 @@ bool RemoveBufferBlockVisitor::visit(SpirvModule *mod, Phase phase) { | |||
return true; | |||
} | |||
|
|||
bool RemoveBufferBlockVisitor::HasStorageBufferInterfaceType( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ptrResultType->getStorageClass() != | ||
spv::StorageClass::StorageBuffer) { | ||
if (ptrResultType->getStorageClass() != | ||
spv::StorageClass::StorageBuffer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
✅ Build DirectXShaderCompiler 1.0.3437 completed (commit cff50187cc by @jaebaek) |
Removing BufferBlock and replacing Uniform to StorageBuffer
must be done for not only the struct type whose interface type
is StorageBuffer but also for an array or runtime array type whose
element type is such struct type.
Fixes #3035