1
0
Fork 0
forked from suyu/suyu

shader_decompiler: add check in case of device not support ShaderStorageImageReadWithoutFormat

This commit is contained in:
Nguyen Dac Nam 2020-02-19 12:57:22 +07:00 committed by GitHub
parent e61c7e9310
commit 88cb05e6e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1749,6 +1749,10 @@ private:
} }
Expression ImageLoad(Operation operation) { Expression ImageLoad(Operation operation) {
if (!device.IsShaderStorageImageReadWithoutFormatSupported()) {
return {v_float_zero, Type::Float};
}
const auto& meta{std::get<MetaImage>(operation.GetMeta())}; const auto& meta{std::get<MetaImage>(operation.GetMeta())};
const Id coords = GetCoordinates(operation, Type::Int); const Id coords = GetCoordinates(operation, Type::Int);