All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org,
	Mesa Devs <mesa-dev@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [Intel-gfx] [PATCH] i965: use nonblocking maps MapRangeBuffer
Date: Fri, 23 Sep 2011 11:56:59 -0700	[thread overview]
Message-ID: <20110923115659.2aa3feae@bwidawsk.net> (raw)
In-Reply-To: <20110923114641.3ba6c361@bwidawsk.net>

On Fri, 23 Sep 2011 11:46:41 -0700
Ben Widawsky <ben@bwidawsk.net> wrote:

> On Fri, 23 Sep 2011 10:15:02 -0700
> Eric Anholt <eric@anholt.net> wrote:
> 
> > On Thu, 22 Sep 2011 16:27:12 -0700, Ben Widawsky <ben@bwidawsk.net>
> > wrote:
> > > This makes the code a lot cleaner, and theoretically faster (not
> > > many real world tests use this GL extension).
> > > 
> > > Cc: Eric Anholt <eric@anholt.net>
> > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > > Cc: Mesa Devs <mesa-dev@lists.freedesktop.org>
> > > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> > > ---
> > >  src/mesa/drivers/dri/intel/intel_buffer_objects.c |   48
> > > ++------------------ 1 files changed, 5 insertions(+), 43
> > > deletions(-)
> > > 
> > > diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
> > > b/src/mesa/drivers/dri/intel/intel_buffer_objects.c index
> > > d35a50e..91dddce 100644 ---
> > > a/src/mesa/drivers/dri/intel/intel_buffer_objects.c +++
> > > b/src/mesa/drivers/dri/intel/intel_buffer_objects.c @@ -296,8
> > > +296,6 @@ intel_bufferobj_get_subdata(struct gl_context * ctx, }
> > >  }
> > >  
> > > -
> > > -
> > >  /**
> > >   * Called via glMapBufferRange and glMapBuffer
> > >   *
> > > @@ -363,50 +361,14 @@ intel_bufferobj_map_range(struct gl_context
> > > * ctx, return NULL;
> > >     }
> > >  
> > > -   /* If the user doesn't care about existing buffer contents and
> > > mapping
> > > -    * would cause us to block, then throw out the old buffer.
> > > -    */
> > > -   if (!(access & GL_MAP_UNSYNCHRONIZED_BIT) &&
> > > -       (access & GL_MAP_INVALIDATE_BUFFER_BIT) &&
> > > -       drm_intel_bo_busy(intel_obj->buffer)) {
> > > -      drm_intel_bo_unreference(intel_obj->buffer);
> > > -      intel_bufferobj_alloc_buffer(intel, intel_obj);
> > > -   }
> > 
> > Why did you delete this code?  Applications rely on this happening.
> 
> Maybe I got confused by the order of operations, but I thought this
> should be,
> If synchronized and invalidate and busy, just create a new buffer.
> This *should* be handled correctly by the nonblocking call below.
> Maybe I'm mistaken.

Sorry, want to clarify this some more:

So we no longer ever create a new buffer to try to speed things up. I
was hoping the nonblocking stuff would fix this. Actually this patch was
sort of my attempt to remove as much as possible and see what you'd say.
If you already know which cases REALLY need the new buffeobj, I'll add
those back.

Ben

  reply	other threads:[~2011-09-23 18:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22 23:27 [PATCH 0/4] Nonblocking maps Ben Widawsky
2011-09-22 23:27 ` [PATCH] drm/i915: IOCTL to query the cache level of a BO Ben Widawsky
2011-09-23  8:04   ` Daniel Vetter
2011-09-23  9:00   ` Chris Wilson
2011-09-22 23:27 ` [PATCH] intel: non-blocking mmaps on the cheap Ben Widawsky
2011-09-22 23:35   ` Ben Widawsky
2011-09-23  8:52     ` Daniel Vetter
2011-10-06 20:55   ` Eric Anholt
2011-10-06 22:56     ` Ben Widawsky
2011-09-22 23:27 ` [PATCH] i965: use nonblocking maps MapRangeBuffer Ben Widawsky
2011-09-23 17:15   ` Eric Anholt
2011-09-23 18:46     ` Ben Widawsky
2011-09-23 18:56       ` Ben Widawsky [this message]
2011-09-23 19:21         ` Ben Widawsky
2011-09-22 23:27 ` [PATCH] gpu-tools: nonblocking map test Ben Widawsky

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=20110923115659.2aa3feae@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mesa-dev@lists.freedesktop.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.