fix texture coordinate type

This commit is contained in:
Asuka 2022-06-21 14:34:16 +08:00
parent 0fcb0e6e47
commit 9777336757

View file

@ -625,7 +625,9 @@ namespace sce::gcn
coord.id = m_module.opCompositeConstruct(getVectorTypeId(coord.type),
components.size(), components.data());
// spir-v image instruction requires float coordinate
coord = emitRegisterBitcast(coord, GcnScalarType::Float32);
coord.type.ctype = GcnScalarType::Float32;
coord.id = m_module.opConvertUtoF(getVectorTypeId(coord.type),
coord.id);
}
auto result = emitCalcTexCoord(coord, imageInfo);