diff options
author | Marek Olšák <[email protected]> | 2011-04-18 02:39:50 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-04-18 02:52:32 +0200 |
commit | d35aeff4bb0b03450b2c3c08bd7f84db5bf43283 (patch) | |
tree | 7572cae9f9022991404b3a9d74882858062fe095 /src/gallium/drivers/r300/r300_screen.c | |
parent | f79717d27aaf471b9cd6eed0d74cbf37ec697361 (diff) |
r300g/winsys: rename r300->radeon and do a little cleanup
Renaming a few files, types, and functions.
Also make the winsys independent of r300g.
Diffstat (limited to 'src/gallium/drivers/r300/r300_screen.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 642523d4d9b..a5d737c4b3c 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -30,7 +30,6 @@ #include "r300_texture.h" #include "r300_screen_buffer.h" #include "r300_state_inlines.h" -#include "r300_winsys.h" #include "r300_public.h" #include "draw/draw_context.h" @@ -311,9 +310,9 @@ static boolean r300_is_format_supported(struct pipe_screen* screen, unsigned sample_count, unsigned usage) { - struct r300_winsys_screen *rws = r300_screen(screen)->rws; + struct radeon_winsys *rws = r300_screen(screen)->rws; uint32_t retval = 0; - boolean drm_2_8_0 = rws->get_value(rws, R300_VID_DRM_2_8_0); + boolean drm_2_8_0 = rws->get_value(rws, RADEON_VID_DRM_2_8_0); boolean is_r500 = r300_screen(screen)->caps.is_r500; boolean is_r400 = r300_screen(screen)->caps.is_r400; boolean is_color2101010 = format == PIPE_FORMAT_R10G10B10A2_UNORM || @@ -412,7 +411,7 @@ static boolean r300_is_format_supported(struct pipe_screen* screen, static void r300_destroy_screen(struct pipe_screen* pscreen) { struct r300_screen* r300screen = r300_screen(pscreen); - struct r300_winsys_screen *rws = r300_winsys_screen(pscreen); + struct radeon_winsys *rws = radeon_winsys(pscreen); util_slab_destroy(&r300screen->pool_buffers); pipe_mutex_destroy(r300screen->num_contexts_mutex); @@ -427,15 +426,15 @@ static void r300_fence_reference(struct pipe_screen *screen, struct pipe_fence_handle **ptr, struct pipe_fence_handle *fence) { - r300_winsys_bo_reference((struct r300_winsys_bo**)ptr, - (struct r300_winsys_bo*)fence); + pb_reference((struct pb_buffer**)ptr, + (struct pb_buffer*)fence); } static boolean r300_fence_signalled(struct pipe_screen *screen, struct pipe_fence_handle *fence) { - struct r300_winsys_screen *rws = r300_screen(screen)->rws; - struct r300_winsys_bo *rfence = (struct r300_winsys_bo*)fence; + struct radeon_winsys *rws = r300_screen(screen)->rws; + struct pb_buffer *rfence = (struct pb_buffer*)fence; return !rws->buffer_is_busy(rfence); } @@ -444,8 +443,8 @@ static boolean r300_fence_finish(struct pipe_screen *screen, struct pipe_fence_handle *fence, uint64_t timeout) { - struct r300_winsys_screen *rws = r300_screen(screen)->rws; - struct r300_winsys_bo *rfence = (struct r300_winsys_bo*)fence; + struct radeon_winsys *rws = r300_screen(screen)->rws; + struct pb_buffer *rfence = (struct pb_buffer*)fence; if (timeout != PIPE_TIMEOUT_INFINITE) { int64_t start_time = os_time_get(); @@ -467,7 +466,7 @@ static boolean r300_fence_finish(struct pipe_screen *screen, return TRUE; } -struct pipe_screen* r300_screen_create(struct r300_winsys_screen *rws) +struct pipe_screen* r300_screen_create(struct radeon_winsys *rws) { struct r300_screen *r300screen = CALLOC_STRUCT(r300_screen); @@ -476,9 +475,9 @@ struct pipe_screen* r300_screen_create(struct r300_winsys_screen *rws) return NULL; } - r300screen->caps.pci_id = rws->get_value(rws, R300_VID_PCI_ID); - r300screen->caps.num_frag_pipes = rws->get_value(rws, R300_VID_GB_PIPES); - r300screen->caps.num_z_pipes = rws->get_value(rws, R300_VID_Z_PIPES); + r300screen->caps.pci_id = rws->get_value(rws, RADEON_VID_PCI_ID); + r300screen->caps.num_frag_pipes = rws->get_value(rws, RADEON_VID_R300_GB_PIPES); + r300screen->caps.num_z_pipes = rws->get_value(rws, RADEON_VID_R300_Z_PIPES); r300_init_debug(r300screen); r300_parse_chipset(&r300screen->caps); @@ -488,7 +487,7 @@ struct pipe_screen* r300_screen_create(struct r300_winsys_screen *rws) if (SCREEN_DBG_ON(r300screen, DBG_NO_HIZ)) r300screen->caps.hiz_ram = 0; - if (!rws->get_value(rws, R300_VID_DRM_2_8_0)) + if (!rws->get_value(rws, RADEON_VID_DRM_2_8_0)) r300screen->caps.has_us_format = FALSE; pipe_mutex_init(r300screen->num_contexts_mutex); |