vk_shader: Implement function ImageLoad (Used by Kirby Start Allies)

Please enter the commit message for your changes. Lines starting
This commit is contained in:
Nguyen Dac Nam 2020-02-18 21:34:01 +07:00 committed by namkazy
parent 72d4c6fee0
commit f6f0762e81

View File

@ -1748,8 +1748,12 @@ private:
}
Expression ImageLoad(Operation operation) {
UNIMPLEMENTED();
return {};
const auto& meta{std::get<MetaImage>(operation.GetMeta())};
const Id coords = GetCoordinates(operation, Type::Int);
const Id texel = OpImageRead(t_uint4, GetImage(operation), coords);
return {OpCompositeExtract(t_uint, texel, meta.element), Type::Uint};
}
Expression ImageStore(Operation operation) {