You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only Metal pixel formats that support MTLTextureUsageShaderAtomic are R32Int, R32UInt and RG32UInt. Currently other textures can be assigned that usage, causing an assertion. That's fallout from #2164.
First case is buffer views. We should only add atomic usage to the supported formats. VK_EXT_shader_atomic_float needs to be handled in some other way - maybe we could just use the old emulated path. However, we don't know the format when setting up the layout, which maybe is a problem in some cases..
Second is images which support integer views, but the base pixel format does not support atomics. My initial idea was to make the base Metal texture be integer instead, and return views on that, which seems to work, but I'm a bit worried about it breaking something, and we could instead try just not setting MTLTextureUsageShaderAtomic - that's wrong by the docs, but in my testing, Metal does not seem to sound any alarms.
The only Metal pixel formats that support
MTLTextureUsageShaderAtomic
are R32Int, R32UInt and RG32UInt. Currently other textures can be assigned that usage, causing an assertion. That's fallout from #2164.First case is buffer views. We should only add atomic usage to the supported formats. VK_EXT_shader_atomic_float needs to be handled in some other way - maybe we could just use the old emulated path. However, we don't know the format when setting up the layout, which maybe is a problem in some cases..
Second is images which support integer views, but the base pixel format does not support atomics. My initial idea was to make the base Metal texture be integer instead, and return views on that, which seems to work, but I'm a bit worried about it breaking something, and we could instead try just not setting
MTLTextureUsageShaderAtomic
- that's wrong by the docs, but in my testing, Metal does not seem to sound any alarms.This issue was initially reported here.
@billhollings @cdavis5e
The text was updated successfully, but these errors were encountered: