Skip to content

Commit e752f04

Browse files
authored
shader_recompiler: Fixups from stencil changes (#1776)
1 parent cafd40f commit e752f04

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/shader_recompiler/frontend/translate/export.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ void Translator::EmitExport(const GcnInst& inst) {
1313

1414
const auto& exp = inst.control.exp;
1515
const IR::Attribute attrib{exp.target};
16-
if (attrib == IR::Attribute::Depth && exp.en != 1) {
16+
if (attrib == IR::Attribute::Depth && exp.en != 0 && exp.en != 1) {
1717
LOG_WARNING(Render_Vulkan, "Unsupported depth export");
1818
return;
1919
}

src/video_core/texture_cache/image_view.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ ImageView::ImageView(const Vulkan::Instance& instance, const ImageViewInfo& info
131131
format = image.info.pixel_format;
132132
aspect = vk::ImageAspectFlagBits::eDepth;
133133
}
134-
if (image.aspect_mask & vk::ImageAspectFlagBits::eStencil && format == vk::Format::eR8Uint) {
134+
if (image.aspect_mask & vk::ImageAspectFlagBits::eStencil &&
135+
(format == vk::Format::eR8Uint || format == vk::Format::eR8Unorm)) {
135136
format = image.info.pixel_format;
136137
aspect = vk::ImageAspectFlagBits::eStencil;
137138
}

0 commit comments

Comments
 (0)