diff options
author | Victor Stinner <[email protected]> | 2009-03-06 14:03:15 +0100 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2009-03-07 17:49:08 +1000 |
commit | f2ec26cf52fcbf98139cb9e31520183189d09861 (patch) | |
tree | 3e8266705d7073b7ed53b9595b0efdf78f58c125 /src | |
parent | 19229fcf3a6eaf5e64b10b43aa5e8619444791b4 (diff) |
Fix nv50_screen_create()
Setup screen->pipe before using it (screen->constbuf =
screen->pipe.buffer_create(...))
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_screen.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c index bbfe42e4789..9bf5e8c7b3f 100644 --- a/src/gallium/drivers/nv50/nv50_screen.c +++ b/src/gallium/drivers/nv50/nv50_screen.c @@ -124,9 +124,9 @@ nv50_screen_get_param(struct pipe_screen *pscreen, int param) return 1; case PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS: return 0; - case NOUVEAU_CAP_HW_VTXBUF: + case NOUVEAU_CAP_HW_VTXBUF: return 1; - case NOUVEAU_CAP_HW_IDXBUF: + case NOUVEAU_CAP_HW_IDXBUF: return 0; default: NOUVEAU_ERR("Unknown PIPE_CAP %d\n", param); @@ -234,6 +234,22 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws) return NULL; } + /* Setup the pipe */ + screen->pipe.winsys = ws; + + screen->pipe.destroy = nv50_screen_destroy; + + screen->pipe.get_name = nv50_screen_get_name; + screen->pipe.get_vendor = nv50_screen_get_vendor; + screen->pipe.get_param = nv50_screen_get_param; + screen->pipe.get_paramf = nv50_screen_get_paramf; + + screen->pipe.is_format_supported = nv50_screen_is_format_supported; + + nv50_screen_init_miptree_functions(&screen->pipe); + nv50_transfer_init_screen_functions(&screen->pipe); + u_simple_screen_init(&screen->pipe); + /* Static M2MF init */ so = so_new(32, 0); so_method(so, screen->m2mf, 0x0180, 3); @@ -353,21 +369,6 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws) so_ref(so, &screen->static_init); nvws->push_flush(nvws, 0, NULL); - screen->pipe.winsys = ws; - - screen->pipe.destroy = nv50_screen_destroy; - - screen->pipe.get_name = nv50_screen_get_name; - screen->pipe.get_vendor = nv50_screen_get_vendor; - screen->pipe.get_param = nv50_screen_get_param; - screen->pipe.get_paramf = nv50_screen_get_paramf; - - screen->pipe.is_format_supported = nv50_screen_is_format_supported; - - nv50_screen_init_miptree_functions(&screen->pipe); - nv50_transfer_init_screen_functions(&screen->pipe); - u_simple_screen_init(&screen->pipe); - return &screen->pipe; } |