This will make it faster to check for nv40.
screen->base.channel->user_private = nvfx;
screen->base.channel->flush_notify = nv30_state_flush_notify;
+ nvfx->is_nv4x = screen->is_nv4x;
+
nv30_init_query_functions(nvfx);
nv30_init_surface_functions(nvfx);
nv30_init_state_functions(nvfx);
screen->base.channel->user_private = nvfx;
screen->base.channel->flush_notify = nv40_state_flush_notify;
+ nvfx->is_nv4x = screen->is_nv4x;
+
nv40_init_query_functions(nvfx);
nv40_init_surface_functions(nvfx);
nv40_init_state_functions(nvfx);
if (!screen)
return NULL;
+
+ screen->is_nv4x = ~0;
+
pscreen = &screen->base.base;
ret = nouveau_screen_init(&screen->base, dev);
struct nouveau_winsys *nvws;
struct nvfx_screen *screen;
+ unsigned is_nv4x; /* either 0 or ~0 */
+
struct draw_context *draw;
/* HW state derived from pipe states */
struct nvfx_context *cur_ctx;
+ unsigned is_nv4x; /* either 0 or ~0 */
+
/* HW graphics objects */
struct nv04_surface_2d *eng2d;
struct nouveau_grobj *eng3d;