summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/radeon/drm/radeon_winsys.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/radeon/drm/radeon_winsys.h')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_winsys.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h
index 1367982850c..581cd841cd8 100644
--- a/src/gallium/winsys/radeon/drm/radeon_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h
@@ -208,6 +208,11 @@ struct radeon_winsys {
struct pipe_reference reference;
/**
+ * The screen object this winsys was created for
+ */
+ struct pipe_screen *screen;
+
+ /**
* Destroy this winsys.
*
* \param ws The winsys this function is called from.
@@ -501,6 +506,16 @@ struct radeon_winsys {
enum radeon_value_id value);
};
+/**
+ * Decrement the winsys reference count.
+ *
+ * \param ws The winsys this function is called for.
+ */
+static INLINE boolean radeon_winsys_unref(struct radeon_winsys *ws)
+{
+ return pipe_reference(&ws->reference, NULL);
+}
+
static INLINE void radeon_emit(struct radeon_winsys_cs *cs, uint32_t value)
{
cs->buf[cs->cdw++] = value;