shader_recompiler: Fixups from stencil changes (#1776)

This commit is contained in:
squidbus 2024-12-14 04:33:24 -08:00 committed by GitHub
parent cafd40f2c2
commit e752f04cde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -13,7 +13,7 @@ void Translator::EmitExport(const GcnInst& inst) {
const auto& exp = inst.control.exp;
const IR::Attribute attrib{exp.target};
if (attrib == IR::Attribute::Depth && exp.en != 1) {
if (attrib == IR::Attribute::Depth && exp.en != 0 && exp.en != 1) {
LOG_WARNING(Render_Vulkan, "Unsupported depth export");
return;
}

View file

@ -131,7 +131,8 @@ ImageView::ImageView(const Vulkan::Instance& instance, const ImageViewInfo& info
format = image.info.pixel_format;
aspect = vk::ImageAspectFlagBits::eDepth;
}
if (image.aspect_mask & vk::ImageAspectFlagBits::eStencil && format == vk::Format::eR8Uint) {
if (image.aspect_mask & vk::ImageAspectFlagBits::eStencil &&
(format == vk::Format::eR8Uint || format == vk::Format::eR8Unorm)) {
format = image.info.pixel_format;
aspect = vk::ImageAspectFlagBits::eStencil;
}