aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-07-25 13:50:40 +0200
committerErik Faye-Lund <[email protected]>2019-10-28 08:51:48 +0000
commitc7bcb6e5dcf33ed5f5dac676540c4eceb3e71899 (patch)
treeebf44dd81c6c11fa9d5737f8bb8d42cb6dcd704f /src/gallium
parent67a9749adac7cd3f204e9b00389f03d083fbed5a (diff)
zink: lower two-sided coloring
Acked-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c12
-rw-r--r--src/gallium/drivers/zink/zink_screen.c1
2 files changed, 9 insertions, 4 deletions
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: