summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_context.c
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2009-01-09 18:57:02 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2009-02-01 23:30:21 -0800
commitadb74f5c5262d22b3c60a555431c29d36e3170f7 (patch)
treeac9ccd60d151bc38546cc62625731b0f6d467138 /src/gallium/drivers/r300/r300_context.c
parent78b599fb4cac469f4208ae3057b2a33e3e9913c6 (diff)
r300: Hook up to winsys, add missing header.
In theory it works, which of course means that it doesn't.
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.c')
-rw-r--r--src/gallium/drivers/r300/r300_context.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 21bee5beae..68751dae17 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -41,10 +41,17 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300->winsys = amd_winsys;
r300->context.winsys = winsys;
- r300->context.screen = screen;
+ if (screen) {
+ r300->context.screen = screen;
+ } else {
+ /* XXX second arg should be pciid, find a way to get it from winsys */
+ r300->context.screen = r300_create_screen(winsys, 0x0);
+ }
r300->context.destroy = r300_destroy_context;
+ r300->draw = draw_create();
+
/* XXX this is almost certainly wrong
* put this all in winsys, where we can get an FD
struct radeon_cs_manager* csm = radeon_cs_manager_gem_ctor(fd);