panfrost: Set PIPE_CAP_TGSI_TEXCOORD
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 7 Aug 2019 19:00:14 +0000 (12:00 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 13 Aug 2019 16:43:09 +0000 (09:43 -0700)
It doesn't really make sense, since we don't have special texture
coordinate varyings, but it'll make some code simpler for XFB and it
doesn't hurt us, even if I lose a bit of my soul setting it.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
src/gallium/drivers/panfrost/pan_screen.c
src/gallium/drivers/panfrost/pan_varyings.c

index d56897729a382ddb2e6221c6ba7a024093b7b49f..de34a2e26cab8460b02754f7a767a4deddd76603 100644 (file)
@@ -180,6 +180,11 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
         case PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL:
                 return 0;
 
+        /* I really don't want to set this CAP but let's not swim against the
+         * tide.. */
+        case PIPE_CAP_TGSI_TEXCOORD:
+                return 1;
+
         case PIPE_CAP_SEAMLESS_CUBE_MAP:
         case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
                 return 1;
index b4ed512917a2d4c26306259a95fae55518167be2..40d7d98bf650a44490b2da089273a03751a68fa8 100644 (file)
@@ -143,7 +143,7 @@ panfrost_emit_varying_descriptor(
 
                 unsigned loc = fs->varyings_loc[i];
                 unsigned pnt_loc =
-                        (loc >= VARYING_SLOT_VAR0) ? (loc - VARYING_SLOT_VAR0) :
+                        (loc >= VARYING_SLOT_TEX0) ? (loc - VARYING_SLOT_TEX0) :
                         (loc == VARYING_SLOT_PNTC) ? 8 :
                         ~0;