mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-20 03:40:30 +01:00
zink: check the variable mode before taking samplemask path in ntv
this otherwise may break for function temps cc: mesa-stable Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18375>
This commit is contained in:
parent
e2773d67fe
commit
8abbc6b19b
1 changed files with 3 additions and 1 deletions
|
|
@ -2415,7 +2415,9 @@ emit_store_deref(struct ntv_context *ctx, nir_intrinsic_instr *intr)
|
|||
|
||||
}
|
||||
SpvId result;
|
||||
if (ctx->stage == MESA_SHADER_FRAGMENT && var->data.location == FRAG_RESULT_SAMPLE_MASK) {
|
||||
if (ctx->stage == MESA_SHADER_FRAGMENT &&
|
||||
var->data.mode == nir_var_shader_out &&
|
||||
var->data.location == FRAG_RESULT_SAMPLE_MASK) {
|
||||
src = emit_bitcast(ctx, type, src);
|
||||
/* SampleMask is always an array in spirv, so we need to construct it into one */
|
||||
result = spirv_builder_emit_composite_construct(&ctx->builder, ctx->sample_mask_type, &src, 1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue