From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: nouveau@lists.freedesktop.org
Cc: mesa-dev@lists.freedesktop.org
Subject: [PATCH v2] nv50/nvc0: make transfers aware of PIPE_TRANSFER_MAP_DIRECTLY
Date: Mon, 9 May 2011 20:12:38 +0200 [thread overview]
Message-ID: <20110509181238.GA3018@joi.lan> (raw)
In-Reply-To: <20110508223900.GF10163@joi.lan>
If state tracker asked us to map resource directly and we can't
do it (because of tiling), return NULL instead of doing full transfer
- state tracker should handle it and fallback to some other method
or repeat transfer without PIPE_TRANSFER_MAP_DIRECTLY.
It greatly improves performance of xorg state tracker on nv50+,
because its fallback (DFS/UTS) is much faster than full transfer.
---
src/gallium/drivers/nv50/nv50_transfer.c | 3 +++
src/gallium/drivers/nvc0/nvc0_transfer.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/nv50/nv50_transfer.c b/src/gallium/drivers/nv50/nv50_transfer.c
index 7486977..d9fb22aa 100644
--- a/src/gallium/drivers/nv50/nv50_transfer.c
+++ b/src/gallium/drivers/nv50/nv50_transfer.c
@@ -209,6 +209,9 @@ nv50_miptree_transfer_new(struct pipe_context *pctx,
uint32_t w, h, d, z, layer;
int ret;
+ if (usage & PIPE_TRANSFER_MAP_DIRECTLY)
+ return NULL;
+
if (mt->layout_3d) {
z = box->z;
d = u_minify(res->depth0, level);
diff --git a/src/gallium/drivers/nvc0/nvc0_transfer.c b/src/gallium/drivers/nvc0/nvc0_transfer.c
index 7bbfe05..0509113 100644
--- a/src/gallium/drivers/nvc0/nvc0_transfer.c
+++ b/src/gallium/drivers/nvc0/nvc0_transfer.c
@@ -246,6 +246,9 @@ nvc0_miptree_transfer_new(struct pipe_context *pctx,
uint32_t w, h, d, z, layer;
int ret;
+ if (usage & PIPE_TRANSFER_MAP_DIRECTLY)
+ return NULL;
+
tx = CALLOC_STRUCT(nvc0_transfer);
if (!tx)
return NULL;
--
1.7.4.1
prev parent reply other threads:[~2011-05-09 18:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-08 22:39 [PATCH] nv50/nvc0: make transfers aware of PIPE_TRANSFER_MAP_DIRECTLY Marcin Slusarz
2011-05-09 18:12 ` Marcin Slusarz [this message]
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=20110509181238.GA3018@joi.lan \
--to=marcin.slusarz@gmail.com \
--cc=mesa-dev@lists.freedesktop.org \
--cc=nouveau@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.