Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] intel: Make use of the new GPU-unsynchronized map functionality in libdrm.
Date: Fri, 24 Feb 2012 19:53:23 -0800	[thread overview]
Message-ID: <1330142003-570-2-git-send-email-eric@anholt.net> (raw)
In-Reply-To: <1330142003-570-1-git-send-email-eric@anholt.net>

Improves Unigine Tropics performance at 1024x768 by 2.06236% +/-
0.50272% (n=11).

DO NOT PUSH: need to depend on a new libdrm release first.
---
 src/mesa/drivers/dri/intel/intel_buffer_objects.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index 26f23fd0..d2a0709 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -367,7 +367,9 @@ intel_bufferobj_map_range(struct gl_context * ctx,
       return obj->Pointer;
    }
 
-   if (!(access & GL_MAP_READ_BIT)) {
+   if (access & GL_MAP_UNSYNCHRONIZED_BIT)
+      drm_intel_gem_bo_map_unsynchronized(intel_obj->buffer);
+   else if (!(access & GL_MAP_READ_BIT)) {
       drm_intel_gem_bo_map_gtt(intel_obj->buffer);
    } else {
       drm_intel_bo_map(intel_obj->buffer, (access & GL_MAP_WRITE_BIT) != 0);
-- 
1.7.9.1

  reply	other threads:[~2012-02-25  3:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-25  3:53 [PATCH] intel: Add support for (possibly) unsynchronized maps Eric Anholt
2012-02-25  3:53 ` Eric Anholt [this message]
2012-02-25  8:55 ` Chris Wilson
2012-02-25  9:03 ` Paul Menzel
2012-02-25 11:00 ` Daniel Vetter
2012-02-25 11:16   ` Chris Wilson
2012-02-26 20:28   ` Kenneth Graunke
2012-02-27 11:15     ` Ben Widawsky
2012-02-27 19:05   ` Eric Anholt
2012-02-28  7:35 ` [PATCH 1/2] intel: Fix error check for I915_PARAM_HAS_LLC Eric Anholt
2012-02-28  7:35   ` [PATCH 2/2] intel: Add support for (possibly) unsynchronized maps Eric Anholt

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=1330142003-570-2-git-send-email-eric@anholt.net \
    --to=eric@anholt.net \
    --cc=intel-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox