[amdgpu] Minor UInt8 fix

This commit is contained in:
Ivan Chikish 2023-07-30 11:55:54 +03:00
parent e0a43d8960
commit a96269938e
2 changed files with 6 additions and 0 deletions

View file

@ -137,6 +137,9 @@ public:
spirv::UIntType getUInt64Type() {
return spirv::cast<spirv::UIntType>(getType(TypeId::UInt64));
}
spirv::UIntType getUInt8Type() {
return spirv::cast<spirv::UIntType>(getType(TypeId::UInt8));
}
spirv::VectorOfType<spirv::UIntType> getUint32x2Type() {
return spirv::cast<spirv::VectorOfType<spirv::UIntType>>(

View file

@ -5312,6 +5312,9 @@ spirv::Value Fragment::createBitcast(spirv::Type to, spirv::Type from,
return value;
}
if (from == context->getUInt8Type())
value = builder.createUConvert(to, spirv::cast<spirv::UIntValue>(value));
if (from == context->getFloat32Type()) {
if (auto origValue = context->findFloat32Value(value)) {
if (to == context->getUInt32Type()) {