diff options
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_context.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_context.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.h | 5 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_winsys.h | 7 |
5 files changed, 16 insertions, 7 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 2df2dcfcad9..14820ca8547 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -131,10 +131,11 @@ static void r300_setup_atoms(struct r300_context* r300) } struct pipe_context* r300_create_context(struct pipe_screen* screen, - struct radeon_winsys* radeon_winsys) + void *priv) { struct r300_context* r300 = CALLOC_STRUCT(r300_context); struct r300_screen* r300screen = r300_screen(screen); + struct radeon_winsys* radeon_winsys = r300screen->radeon_winsys; if (!r300) return NULL; @@ -143,6 +144,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300->context.winsys = (struct pipe_winsys*)radeon_winsys; r300->context.screen = screen; + r300->context.priv = priv; r300->context.destroy = r300_destroy_context; diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index ea9b4abfdeb..84617578128 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -336,6 +336,10 @@ static INLINE struct r300_context* r300_context(struct pipe_context* context) return (struct r300_context*)context; } + +struct pipe_context* r300_create_context(struct pipe_screen* screen, + void *priv); + /* Context initialization. */ struct draw_stage* r300_draw_stage(struct r300_context* r300); void r300_init_state_functions(struct r300_context* r300); diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 2e04e313767..da4ec542ade 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -30,6 +30,7 @@ #include "r300_texture.h" #include "radeon_winsys.h" +#include "r300_winsys.h" /* Return the identifier behind whom the brave coders responsible for this * amalgamation of code, sweat, and duct tape, routinely obscure their names. @@ -391,6 +392,7 @@ struct pipe_screen* r300_create_screen(struct radeon_winsys* radeon_winsys) r300_parse_chipset(caps); r300screen->caps = caps; + r300screen->radeon_winsys = radeon_winsys; r300screen->screen.winsys = (struct pipe_winsys*)radeon_winsys; r300screen->screen.destroy = r300_destroy_screen; r300screen->screen.get_name = r300_get_name; @@ -398,6 +400,7 @@ struct pipe_screen* r300_create_screen(struct radeon_winsys* radeon_winsys) r300screen->screen.get_param = r300_get_param; r300screen->screen.get_paramf = r300_get_paramf; r300screen->screen.is_format_supported = r300_is_format_supported; + r300screen->screen.context_create = r300_create_context; r300screen->screen.get_tex_transfer = r300_get_tex_transfer; r300screen->screen.tex_transfer_destroy = r300_tex_transfer_destroy; r300screen->screen.transfer_map = r300_transfer_map; diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h index 580fda3984e..502fbfa5a24 100644 --- a/src/gallium/drivers/r300/r300_screen.h +++ b/src/gallium/drivers/r300/r300_screen.h @@ -33,6 +33,8 @@ struct r300_screen { /* Parent class */ struct pipe_screen screen; + struct radeon_winsys* radeon_winsys; + /* Chipset capabilities */ struct r300_capabilities* caps; @@ -60,9 +62,6 @@ r300_transfer(struct pipe_transfer* transfer) return (struct r300_transfer*)transfer; } -/* Creates a new r300 screen. */ -struct pipe_screen* r300_create_screen(struct radeon_winsys* radeon_winsys); - /* Debug functionality. */ /** diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h index d4842e94ae9..f4a8ae120c8 100644 --- a/src/gallium/drivers/r300/r300_winsys.h +++ b/src/gallium/drivers/r300/r300_winsys.h @@ -29,7 +29,7 @@ extern "C" { /* The public interface header for the r300 pipe driver. * Any winsys hosting this pipe needs to implement r300_winsys and then - * call r300_create_context to start things. */ + * call r300_create_screen to start things. */ #include "pipe/p_defines.h" #include "pipe/p_state.h" @@ -37,8 +37,9 @@ extern "C" { #include "radeon_winsys.h" -struct pipe_context* r300_create_context(struct pipe_screen* screen, - struct radeon_winsys* radeon_winsys); +/* Creates a new r300 screen. */ +struct pipe_screen* r300_create_screen(struct radeon_winsys* radeon_winsys); + boolean r300_get_texture_buffer(struct pipe_screen* screen, struct pipe_texture* texture, |