Mesa (master): st/egl: native_helper: Add resource_surface_import_resource

Kristian Høgsberg krh at kemper.freedesktop.org
Mon Feb 7 14:10:22 UTC 2011


Module: Mesa
Branch: master
Commit: 464cb3a09ea61b6e7fe7f5d2a69e3cdab210da8f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=464cb3a09ea61b6e7fe7f5d2a69e3cdab210da8f

Author: Benjamin Franzke <benjaminfranzke at googlemail.com>
Date:   Fri Feb  4 12:25:04 2011 +0100

st/egl: native_helper: Add resource_surface_import_resource

---

 .../state_trackers/egl/common/native_helper.c      |    8 ++++++++
 .../state_trackers/egl/common/native_helper.h      |    5 +++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/egl/common/native_helper.c b/src/gallium/state_trackers/egl/common/native_helper.c
index 0f2d020..a9d8f32 100644
--- a/src/gallium/state_trackers/egl/common/native_helper.c
+++ b/src/gallium/state_trackers/egl/common/native_helper.c
@@ -143,6 +143,14 @@ resource_surface_add_resources(struct resource_surface *rsurf,
    return ((rsurf->resource_mask & resource_mask) == resource_mask);
 }
 
+void
+resource_surface_import_resource(struct resource_surface *rsurf,
+                                 enum native_attachment which,
+                                 struct pipe_resource *pres)
+{
+	pipe_resource_reference(&rsurf->resources[which], pres);
+	rsurf->resource_mask |= 1 << which;
+}
 
 void
 resource_surface_get_resources(struct resource_surface *rsurf,
diff --git a/src/gallium/state_trackers/egl/common/native_helper.h b/src/gallium/state_trackers/egl/common/native_helper.h
index d1569ac..03995de 100644
--- a/src/gallium/state_trackers/egl/common/native_helper.h
+++ b/src/gallium/state_trackers/egl/common/native_helper.h
@@ -51,6 +51,11 @@ resource_surface_add_resources(struct resource_surface *rsurf,
                                uint resource_mask);
 
 void
+resource_surface_import_resource(struct resource_surface *rsurf,
+                                 enum native_attachment which,
+                                 struct pipe_resource *pres);
+
+void
 resource_surface_get_resources(struct resource_surface *rsurf,
                                struct pipe_resource **resources,
                                uint resource_mask);




More information about the mesa-commit mailing list