Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wgsl missing float image format inference #5716

Merged
merged 13 commits into from
Dec 5, 2024
14 changes: 14 additions & 0 deletions source/slang/slang-check-decl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,20 @@ ImageFormat inferImageFormatFromTextureType(
break;
}
break;
case BaseType::Float:
switch (vectorWidth)
{
case 1:
format = ImageFormat::r32f;
break;
case 2:
format = ImageFormat::rg32f;
break;
case 4:
format = ImageFormat::rgba32f;
break;
}
break;
}
}
}
Expand Down
Loading