From b71bfc4400e1d7c15a2bebbbd3b26a8770fbf546 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 5 Apr 2010 03:19:08 +0200 Subject: r300g: simplify accessing screen from context --- src/gallium/drivers/r300/r300_context.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/r300/r300_context.c') diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 4b470b2c6a..1e1c7161ec 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -107,8 +107,8 @@ static void r300_flush_cb(void *data) static void r300_setup_atoms(struct r300_context* r300) { - boolean is_r500 = r300_screen(r300->context.screen)->caps->is_r500; - boolean has_tcl = r300_screen(r300->context.screen)->caps->has_tcl; + boolean is_r500 = r300->screen->caps.is_r500; + boolean has_tcl = r300->screen->caps.has_tcl; /* Create the actual atom list. * @@ -159,6 +159,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, return NULL; r300->rws = rws; + r300->screen = r300screen; r300->context.winsys = (struct pipe_winsys*)rws; r300->context.screen = screen; @@ -170,7 +171,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300->context.surface_copy = r300_surface_copy; r300->context.surface_fill = r300_surface_fill; - if (r300screen->caps->has_tcl) { + if (r300screen->caps.has_tcl) { r300->context.draw_arrays = r300_draw_arrays; r300->context.draw_elements = r300_draw_elements; r300->context.draw_range_elements = r300_draw_range_elements; -- cgit v1.2.3