winsys: return null for DONTBLOCK flag on existing winsys
authorKeith Whitwell <keithw@vmware.com>
Tue, 3 Mar 2009 12:11:08 +0000 (12:11 +0000)
committerKeith Whitwell <keithw@vmware.com>
Tue, 3 Mar 2009 12:11:08 +0000 (12:11 +0000)
Add code so that existing driver behaviour doesn't change.

src/gallium/winsys/drm/intel/gem/intel_be_device.c
src/gallium/winsys/drm/nouveau/common/nouveau_winsys_pipe.c
src/gallium/winsys/drm/radeon/radeon_buffer.c

index 595de447267a1d1a18be2493bbc9f9f08d4f368e..2e191a6d126e0a6375cc48225cd24aa733a5f754 100644 (file)
@@ -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;
 
index e3ee985afcd7f69a1c7839c17247493c4202706f..54c7dd46b141d9f17ebe9280f6b7680f54710548 100644 (file)
@@ -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)
index 259a505c0a614e761c6abd316983650d8320f4db..918d2f98e2a01528906a814054aa639d2ef2a632 100644 (file)
@@ -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;
     }