summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_resource.h')
-rw-r--r--src/gallium/drivers/nv50/nv50_resource.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_resource.h b/src/gallium/drivers/nv50/nv50_resource.h
index 6cf7662124..f435a5892e 100644
--- a/src/gallium/drivers/nv50/nv50_resource.h
+++ b/src/gallium/drivers/nv50/nv50_resource.h
@@ -4,6 +4,8 @@
#include "util/u_transfer.h"
+#include "nouveau/nouveau_winsys.h"
+
struct pipe_resource;
struct nouveau_bo;
@@ -49,6 +51,12 @@ struct nv50_resource *nv50_resource(struct pipe_resource *resource)
return (struct nv50_resource *)resource;
}
+/* is resource mapped into the GPU's address space (i.e. VRAM or GART) ? */
+static INLINE boolean
+nv50_resource_mapped_by_gpu(struct pipe_resource *resource)
+{
+ return nv50_resource(resource)->bo->handle;
+}
void
nv50_init_resource_functions(struct pipe_context *pcontext);