Handle 32bit int ImageFormat (#1823)

This commit is contained in:
Marcin Mikołajczyk 2024-12-18 20:48:00 +01:00 committed by GitHub
parent ccfb1bbfa8
commit be4c38bf1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -696,6 +696,10 @@ spv::ImageFormat GetFormat(const AmdGpu::Image& image) {
image.GetNumberFmt() == AmdGpu::NumberFormat::Uint) { image.GetNumberFmt() == AmdGpu::NumberFormat::Uint) {
return spv::ImageFormat::R32ui; return spv::ImageFormat::R32ui;
} }
if (image.GetDataFmt() == AmdGpu::DataFormat::Format32 &&
image.GetNumberFmt() == AmdGpu::NumberFormat::Sint) {
return spv::ImageFormat::R32i;
}
if (image.GetDataFmt() == AmdGpu::DataFormat::Format32 && if (image.GetDataFmt() == AmdGpu::DataFormat::Format32 &&
image.GetNumberFmt() == AmdGpu::NumberFormat::Float) { image.GetNumberFmt() == AmdGpu::NumberFormat::Float) {
return spv::ImageFormat::R32f; return spv::ImageFormat::R32f;