Mesa (master): winsys: return null for DONTBLOCK flag on existing winsys
Keith Whitwell
keithw at kemper.freedesktop.org
Tue Mar 3 12:12:13 UTC 2009
Module: Mesa
Branch: master
Commit: 0f3d226143d21b60cba63b8234340ae31d6d7281
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f3d226143d21b60cba63b8234340ae31d6d7281
Author: Keith Whitwell <keithw at vmware.com>
Date: Tue Mar 3 12:11:08 2009 +0000
winsys: return null for DONTBLOCK flag on existing winsys
Add code so that existing driver behaviour doesn't change.
---
src/gallium/winsys/drm/intel/gem/intel_be_device.c | 6 ++++++
.../drm/nouveau/common/nouveau_winsys_pipe.c | 6 ++++++
src/gallium/winsys/drm/radeon/radeon_buffer.c | 6 ++++++
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_device.c b/src/gallium/winsys/drm/intel/gem/intel_be_device.c
index 595de44..2e191a6 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_be_device.c
+++ b/src/gallium/winsys/drm/intel/gem/intel_be_device.c
@@ -26,6 +26,12 @@ intel_be_buffer_map(struct pipe_winsys *winsys,
int write = 0;
int ret;
+ if (flags & PIPE_BUFFER_USAGE_DONTBLOCK) {
+ /* Remove this when drm_intel_bo_map supports DONTBLOCK
+ */
+ return NULL;
+ }
+
if (flags & PIPE_BUFFER_USAGE_CPU_WRITE)
write = 1;
diff --git a/src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.c b/src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.c
index e3ee985..54c7dd4 100644
--- a/src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.c
+++ b/src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.c
@@ -119,6 +119,12 @@ nouveau_pipe_bo_map(struct pipe_winsys *pws, struct pipe_buffer *buf,
struct nouveau_pipe_buffer *nvbuf = nouveau_pipe_buffer(buf);
uint32_t map_flags = 0;
+ if (flags & PIPE_BUFFER_USAGE_DONTBLOCK) {
+ /* Remove this when this code is modified to support DONTBLOCK
+ */
+ return NULL;
+ }
+
if (flags & PIPE_BUFFER_USAGE_CPU_READ)
map_flags |= NOUVEAU_BO_RD;
if (flags & PIPE_BUFFER_USAGE_CPU_WRITE)
diff --git a/src/gallium/winsys/drm/radeon/radeon_buffer.c b/src/gallium/winsys/drm/radeon/radeon_buffer.c
index 259a505..918d2f9 100644
--- a/src/gallium/winsys/drm/radeon/radeon_buffer.c
+++ b/src/gallium/winsys/drm/radeon/radeon_buffer.c
@@ -112,6 +112,12 @@ static void *radeon_buffer_map(struct pipe_winsys *ws,
struct radeon_pipe_buffer *radeon_buffer = (struct radeon_pipe_buffer*)buffer;
int write = 0;
+ if (flags & PIPE_BUFFER_USAGE_DONTBLOCK) {
+ /* Remove this when radeon_bo_map supports DONTBLOCK
+ */
+ return NULL;
+ }
+
if (flags & PIPE_BUFFER_USAGE_CPU_WRITE) {
write = 1;
}
More information about the mesa-commit
mailing list