diff options
Diffstat (limited to 'src/gallium/winsys/radeon/drm')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 4 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_winsys.h | 15 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c index 61f091323f4..4f43093d71d 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -424,10 +424,6 @@ static void radeon_winsys_destroy(struct radeon_winsys *rws) { struct radeon_drm_winsys *ws = (struct radeon_drm_winsys*)rws; - if (!pipe_reference(&ws->base.reference, NULL)) { - return; - } - if (ws->thread) { ws->kill_thread = 1; pipe_semaphore_signal(&ws->cs_queued); 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; |