d3d12: assert DeviceState exposes the memory types LEONIDA_GEOMETRY_HOST picks from

TitleBufferWindows::system_memory_types falls back to every allowed type, the BAR included, when its device has no
memory properties; the assert keeps DeviceState from silently losing them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jan Trencansky
2026-11-25 23:36:01 -05:00
parent 36771ec53d
commit dc9ef1a0b7

View File

@ -7102,6 +7102,12 @@ struct DeviceState {
return nullptr;
}
};
// TitleBufferWindows::system_memory_types reads the memory types through these (LEONIDA_GEOMETRY_HOST): without them
// it would leave every type allowed, the BAR included.
static_assert(requires(const DeviceState& d) {
d.memory.memoryTypes[0].propertyFlags;
d.memory.memoryTypeCount;
});
// The Vulkan format for a texture this layer can create, with the D24 fallback; VK_FORMAT_UNDEFINED, after a log
// line, when it cannot. Committed and placed textures share it so both refuse the same formats for the same reason.