Created
October 10, 2013 23:16
-
-
Save grigorig/6927130 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 32de663ae6a03ea40f307160ea6c6926d70ca18d | |
Author: Grigori Goronzy <greg@chown.ath.cx> | |
Date: Fri Oct 11 01:14:14 2013 +0200 | |
radeon/winsys: make fd_tab a public symbol | |
Required to properly share resources e.g. for VDPAU interop. | |
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | |
index 4f43093..1538e25 100644 | |
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | |
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | |
@@ -101,7 +101,7 @@ | |
#define RADEON_CS_RING_UVD 3 | |
#endif | |
-static struct util_hash_table *fd_tab = NULL; | |
+PUBLIC struct util_hash_table *radeon_drm_winsys_fd_tab = NULL; | |
/* Enable/disable feature access for one command stream. | |
* If enable == TRUE, return TRUE on success. | |
@@ -440,8 +440,8 @@ static void radeon_winsys_destroy(struct radeon_winsys *rws) | |
if (ws->gen >= DRV_R600) { | |
radeon_surface_manager_free(ws->surf_man); | |
} | |
- if (fd_tab) { | |
- util_hash_table_remove(fd_tab, intptr_to_pointer(ws->fd)); | |
+ if (radeon_drm_winsys_fd_tab) { | |
+ util_hash_table_remove(radeon_drm_winsys_fd_tab, intptr_to_pointer(ws->fd)); | |
} | |
FREE(rws); | |
} | |
@@ -603,11 +603,11 @@ struct radeon_winsys *radeon_drm_winsys_create(int fd) | |
{ | |
struct radeon_drm_winsys *ws; | |
- if (!fd_tab) { | |
- fd_tab = util_hash_table_create(hash_fd, compare_fd); | |
+ if (!radeon_drm_winsys_fd_tab) { | |
+ radeon_drm_winsys_fd_tab = util_hash_table_create(hash_fd, compare_fd); | |
} | |
- ws = util_hash_table_get(fd_tab, intptr_to_pointer(fd)); | |
+ ws = util_hash_table_get(radeon_drm_winsys_fd_tab, intptr_to_pointer(fd)); | |
if (ws) { | |
pipe_reference(NULL, &ws->base.reference); | |
return &ws->base; | |
@@ -618,7 +618,7 @@ struct radeon_winsys *radeon_drm_winsys_create(int fd) | |
return NULL; | |
} | |
ws->fd = fd; | |
- util_hash_table_set(fd_tab, intptr_to_pointer(fd), ws); | |
+ util_hash_table_set(radeon_drm_winsys_fd_tab, intptr_to_pointer(fd), ws); | |
if (!do_winsys_init(ws)) | |
goto fail; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment