Fix a few issues with the intel anv vulkan driver from mesa (#514)

* add fallback format for d16UnormS8Uint which is not supported by intel

* fix depth/stencil buffer creation issues causing asserts in intel driver
This commit is contained in:
Random 2024-08-24 14:50:46 +02:00 committed by GitHub
parent 2c540fbecb
commit fc745ee767
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 6 deletions

View file

@ -306,6 +306,7 @@ std::span<const vk::Format> GetAllFormats() {
vk::Format::eBc7UnormBlock,
vk::Format::eD16Unorm,
vk::Format::eD16UnormS8Uint,
vk::Format::eD24UnormS8Uint,
vk::Format::eD32Sfloat,
vk::Format::eD32SfloatS8Uint,
vk::Format::eR4G4B4A4UnormPack16,

View file

@ -481,6 +481,8 @@ bool Instance::IsFormatSupported(const vk::Format format) const {
vk::Format Instance::GetAlternativeFormat(const vk::Format format) const {
if (format == vk::Format::eB5G6R5UnormPack16) {
return vk::Format::eR5G6B5UnormPack16;
} else if (format == vk::Format::eD16UnormS8Uint) {
return vk::Format::eD24UnormS8Uint;
}
return format;
}