From: Erik Faye-Lund Date: Thu, 25 Jul 2019 11:50:40 +0000 (+0200) Subject: zink: lower two-sided coloring X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7bcb6e5dcf33ed5f5dac676540c4eceb3e71899;p=mesa.git zink: lower two-sided coloring Acked-by: Jordan Justen --- diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index 2f75d5b70fa..96f1f543321 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -236,8 +236,10 @@ emit_input(struct ntv_context *ctx, struct nir_variable *var) if (var->data.location >= VARYING_SLOT_VAR0) spirv_builder_emit_location(&ctx->builder, var_id, var->data.location - VARYING_SLOT_VAR0); - else if (var->data.location >= VARYING_SLOT_COL0 && - var->data.location <= VARYING_SLOT_TEX7) { + else if ((var->data.location >= VARYING_SLOT_COL0 && + var->data.location <= VARYING_SLOT_TEX7) || + var->data.location == VARYING_SLOT_BFC0 || + var->data.location == VARYING_SLOT_BFC1) { spirv_builder_emit_location(&ctx->builder, var_id, var->data.location); } else { @@ -290,8 +292,10 @@ emit_output(struct ntv_context *ctx, struct nir_variable *var) if (var->data.location >= VARYING_SLOT_VAR0) spirv_builder_emit_location(&ctx->builder, var_id, var->data.location - VARYING_SLOT_VAR0); - else if (var->data.location >= VARYING_SLOT_COL0 && - var->data.location <= VARYING_SLOT_TEX7) { + else if ((var->data.location >= VARYING_SLOT_COL0 && + var->data.location <= VARYING_SLOT_TEX7) || + var->data.location == VARYING_SLOT_BFC0 || + var->data.location == VARYING_SLOT_BFC1) { spirv_builder_emit_location(&ctx->builder, var_id, var->data.location); } else { diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index f1a19a10431..e7dcebe0c8b 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -296,6 +296,7 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_ALPHA_TEST: case PIPE_CAP_CLIP_PLANES: case PIPE_CAP_POINT_SIZE_FIXED: + case PIPE_CAP_TWO_SIDED_COLOR: return 0; default: