[Mesa-dev] [PATCH 12/14] i965/blorp/gen7+: Skip disabling already disabled stages

Kenneth Graunke kenneth at whitecape.org
Fri May 27 08:34:11 UTC 2016


On Wednesday, May 25, 2016 7:08:47 PM PDT Topi Pohjolainen wrote:
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/gen7_blorp.c | 16 ++++++++++++++++
>  src/mesa/drivers/dri/i965/gen8_blorp.c | 12 ++++++++++++
>  2 files changed, 28 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.c b/src/mesa/drivers/dri/i965/gen7_blorp.c
> index 3a12bb5..2e57d6b 100644
> --- a/src/mesa/drivers/dri/i965/gen7_blorp.c
> +++ b/src/mesa/drivers/dri/i965/gen7_blorp.c
> @@ -273,6 +273,10 @@ gen7_blorp_emit_vs_disable(struct brw_context *brw)
>  static void
>  gen7_blorp_emit_hs_disable(struct brw_context *brw)
>  {
> +   if (!brw->tess_eval_program &&
> +       !(gen7_hs_state.dirty.brw & brw->ctx.NewDriverState))
> +      return;
> +

I'm not crazy about inspecting the dirty flags.  It seems like we might
want to instead track whether a stage was previously disabled via some
booleans.

Jason noticed that the main drawing code re-emits 3DSTATE_URB whenever
we switch tess and geometry shaders, even if it's just going from
active->active, which is kind of lame.  Maybe we could use something
for both...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160527/939120b3/attachment.sig>


More information about the mesa-dev mailing list