All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Kenneth Graunke <kenneth@whitecape.org>
Subject: Re: [PATCH] drm/i915: Enable provoking vertex fix on Gen9 systems.
Date: Mon, 18 Jun 2018 12:03:24 +0300	[thread overview]
Message-ID: <152931260384.5041.14443452784171616679@mbolton-mobl.ger.corp.intel.com> (raw)
In-Reply-To: <20180615190605.16238-1-chris@chris-wilson.co.uk>

Quoting Chris Wilson (2018-06-15 22:06:05)
> From: Kenneth Graunke <kenneth@whitecape.org>
> 
> The SF and clipper units mishandle the provoking vertex in some cases,
> which can cause misrendering with shaders that use flat shaded inputs.
> 
> There are chicken bits in 3D_CHICKEN3 (for SF) and FF_SLICE_CHICKEN
> (for the clipper) that work around the issue.  These registers are
> unfortunately not part of the logical context (even the power context),
> and so we must reload them every time we start executing in a context.
> 
> Bugzilla: https://bugs.freedesktop.org/103047
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

One note below.

> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1575,11 +1575,21 @@ static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch)
>         /* WaFlushCoherentL3CacheLinesAtContextSwitch:skl,bxt,glk */
>         batch = gen8_emit_flush_coherentl3_wa(engine, batch);
>  
> +       *batch++ = MI_LOAD_REGISTER_IMM(3);
> +
>         /* WaDisableGatherAtSetShaderCommonSlice:skl,bxt,kbl,glk */
> -       *batch++ = MI_LOAD_REGISTER_IMM(1);
>         *batch++ = i915_mmio_reg_offset(COMMON_SLICE_CHICKEN2);
>         *batch++ = _MASKED_BIT_DISABLE(
>                         GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE);
> +
> +       /* BSpec: 11391 */
> +       *batch++ = i915_mmio_reg_offset(FF_SLICE_CHICKEN);
> +       *batch++ = _MASKED_BIT_ENABLE(FF_SLICE_CHICKEN_CL_PROVOKING_VERTEX_FIX);
> +
> +       /* BSpec: 11299 */
> +       *batch++ = i915_mmio_reg_offset(_3D_CHICKEN3);
> +       *batch++ = _MASKED_BIT_ENABLE(_3D_CHICKEN_SF_PROVOKING_VERTEX_FIX);

I'm almost betting that somebody will take one of these 3 off without
noticing the distant LOAD_REGISTER_IMM(). To perfect this, const table
of pairs and use ARRAY_SIZE()? Then we're also one step closer to the
const W/A tables...

Regards, Joonas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-06-18  9:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14 21:53 [PATCH] drm/i915: Enable provoking vertex fix on Gen9+ systems Kenneth Graunke
2018-06-14 22:37 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-06-14 22:53 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-06-15  7:16   ` Chris Wilson
2018-06-15  7:51     ` Chris Wilson
2018-06-15 14:52 ` Patchwork
2018-06-15 18:31 ` [PATCH] " Chris Wilson
2018-06-15 18:34 ` ✗ Fi.CI.BAT: failure for drm/i915: Enable provoking vertex fix on Gen9+ systems. (rev2) Patchwork
2018-06-15 19:06 ` [PATCH] drm/i915: Enable provoking vertex fix on Gen9 systems Chris Wilson
2018-06-16  5:07   ` Kenneth Graunke
2018-06-18  9:03   ` Joonas Lahtinen [this message]
2018-06-18  9:12     ` Chris Wilson
2018-06-15 20:09 ` ✓ Fi.CI.BAT: success for drm/i915: Enable provoking vertex fix on Gen9+ systems. (rev3) Patchwork
2018-06-16  9:35 ` ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=152931260384.5041.14443452784171616679@mbolton-mobl.ger.corp.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kenneth@whitecape.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.