vulkan/meta: Use demote instead of discard
We don't have the NIR options when we go to create the shader so
nir_discard_if() will segfault.
Fixes: 9b1a748b5e ("nir: remove nir_intrinsic_discard")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30028>
This commit is contained in:
committed by
Marge Bot
parent
5a9c052ba7
commit
37d58b816b
@@ -315,8 +315,8 @@ build_blit_shader(const struct vk_meta_blit_key *key)
|
||||
if (key->stencil_as_discard) {
|
||||
assert(key->aspects == VK_IMAGE_ASPECT_STENCIL_BIT);
|
||||
nir_def *stencil_bit = nir_channel(b, z_xform, 3);
|
||||
nir_discard_if(b, nir_ieq(b, nir_iand(b, val, stencil_bit),
|
||||
nir_imm_int(b, 0)));
|
||||
nir_demote_if(b, nir_ieq(b, nir_iand(b, val, stencil_bit),
|
||||
nir_imm_int(b, 0)));
|
||||
} else {
|
||||
const struct glsl_type *out_type =
|
||||
glsl_vector_type(base_type, out_comps);
|
||||
|
||||
Reference in New Issue
Block a user