Add stencil reference check for shader export support

This commit is contained in:
Hog 2026-06-08 20:55:08 +01:00 committed by GitHub
parent 954de76b68
commit 041e985761
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -675,7 +675,7 @@ void EmitContext::DefineOutputs() {
sample_mask = DefineVariable(TypeArray(U32[1], u32_one_value), spv::BuiltIn::SampleMask,
spv::StorageClass::Output);
}
if (info.stores.Get(IR::Attribute::StencilRef)) {
if (info.stores.Get(IR::Attribute::StencilRef) && profile.supports_shader_stencil_export) {
stencil_ref = DefineVariable(S32[1], spv::BuiltIn::FragStencilRefEXT,
spv::StorageClass::Output);
}