zink: lower two-sided coloring
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 25 Jul 2019 11:50:40 +0000 (13:50 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 08:51:48 +0000 (08:51 +0000)
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
src/gallium/drivers/zink/zink_screen.c

index 2f75d5b70fa22e32d3641a56413f885afed3ec35..96f1f5433213952e364f0c56bbb72529d72c52b3 100644 (file)
@@ -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 {
index f1a19a10431e7f5bbef87784073d0c9a1d12965c..e7dcebe0c8b77fdd7547c8c86833dc752a431352 100644 (file)
@@ -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: