From: Alyssa Rosenzweig Date: Fri, 1 May 2020 16:05:01 +0000 (-0400) Subject: panfrost: Setup gl_FragCoord as sysval on Bifrost X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=30f07e0d843935fcb34fc28e62bc4c832219c06b;p=mesa.git panfrost: Setup gl_FragCoord as sysval on Bifrost ..rather than a varying. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 89d038f2e22..c99469a82d9 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -1810,7 +1810,7 @@ panfrost_emit_varying_descriptor(struct panfrost_batch *batch, varyings[gl_FragCoord].elements = MALI_VARYING_FRAG_COORD; struct panfrost_device *device = pan_device(ctx->base.screen); - assert(!(device->quirks & IS_BIFROST) || !(reads_point_coord || fs->reads_face || fs->reads_frag_coord)); + assert(!(device->quirks & IS_BIFROST) || !(reads_point_coord)); /* Let's go ahead and link varying meta to the buffer in question, now * that that information is available. VARYING_SLOT_POS is mapped to diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 866c23adc93..ecfac6cddb0 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -93,6 +93,7 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param) { /* We expose in-dev stuff for dEQP that we don't want apps to use yet */ bool is_deqp = pan_debug & PAN_DBG_DEQP; + struct panfrost_device *dev = pan_device(screen); /* Our GLES3 implementation is WIP */ bool is_gles3 = pan_debug & PAN_DBG_GLES3; @@ -195,10 +196,10 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_GENERATE_MIPMAP: return 1; - /* We would prefer varyings */ + /* We would prefer varyings on Midgard, but proper sysvals on Bifrost */ case PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL: case PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL: - return 0; + return dev->quirks & IS_BIFROST; /* I really don't want to set this CAP but let's not swim against the * tide.. */