add 'shaderatomics' field to love.graphics.getTextureFormats' usage table arg.

Currently only r32i and r32ui are supported (on capable systems).
This commit is contained in:
Sasha Szpakowski
2026-07-24 14:23:55 -03:00
parent 8c18d3ce8e
commit e4649253e8
4 changed files with 26 additions and 6 deletions
+10
View File
@@ -1237,6 +1237,16 @@ bool Graphics::isPixelFormatSupported(PixelFormat format, uint32 usage)
return false;
}
if (usage & PIXELFORMATUSAGEFLAGS_SHADERATOMICS)
{
if (!(featureFlags & VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT))
return false;
// TODO: supporting float formats when available may need GLSL extensions.
if (format != PIXELFORMAT_R32_INT && format != PIXELFORMAT_R32_UINT)
return false;
}
if (usage & PIXELFORMATUSAGEFLAGS_MSAA)
{
VkImageFormatProperties properties;