summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_context.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-04-05 03:19:08 +0200
committerMarek Olšák <maraeo@gmail.com>2010-04-05 07:09:46 +0200
commitb71bfc4400e1d7c15a2bebbbd3b26a8770fbf546 (patch)
tree9988c965cb23b78c5eeeb032b39dccc6da961551 /src/gallium/drivers/r300/r300_context.c
parent32327196f7f7a97bebc462a1ba94270580ef3fe9 (diff)
r300g: simplify accessing screen from context
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.c')
-rw-r--r--src/gallium/drivers/r300/r300_context.c7
1 files changed, 4 insertions, 3 deletions
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;