summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv40
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-05-13 12:16:35 +1000
committerBen Skeggs <skeggsb@gmail.com>2008-05-13 12:16:35 +1000
commit1ef08564d2a201a422db772a6bb23d1129888304 (patch)
tree3fec32e8a0c907394f7766fd197fe5cc9008876a /src/gallium/drivers/nv40
parent2f80d4d2a705835b272cf2274ea578fe5bbe1919 (diff)
nouveau: remove chipset fields in all nv pipe driver context/screen structs.
Diffstat (limited to 'src/gallium/drivers/nv40')
-rw-r--r--src/gallium/drivers/nv40/nv40_context.c2
-rw-r--r--src/gallium/drivers/nv40/nv40_context.h2
-rw-r--r--src/gallium/drivers/nv40/nv40_screen.c8
-rw-r--r--src/gallium/drivers/nv40/nv40_screen.h1
4 files changed, 4 insertions, 9 deletions
diff --git a/src/gallium/drivers/nv40/nv40_context.c b/src/gallium/drivers/nv40/nv40_context.c
index f9c93f7a2d..d9d9accea8 100644
--- a/src/gallium/drivers/nv40/nv40_context.c
+++ b/src/gallium/drivers/nv40/nv40_context.c
@@ -38,7 +38,6 @@ nv40_create(struct pipe_screen *pscreen, unsigned pctx_id)
struct nv40_screen *screen = nv40_screen(pscreen);
struct pipe_winsys *ws = pscreen->winsys;
struct nv40_context *nv40;
- unsigned chipset = screen->chipset;
struct nouveau_winsys *nvws = screen->nvws;
nv40 = CALLOC(1, sizeof(struct nv40_context));
@@ -47,7 +46,6 @@ nv40_create(struct pipe_screen *pscreen, unsigned pctx_id)
nv40->screen = screen;
nv40->pctx_id = pctx_id;
- nv40->chipset = chipset;
nv40->nvws = nvws;
nv40->pipe.winsys = ws;
diff --git a/src/gallium/drivers/nv40/nv40_context.h b/src/gallium/drivers/nv40/nv40_context.h
index 24e8cd2337..77b3da0ab9 100644
--- a/src/gallium/drivers/nv40/nv40_context.h
+++ b/src/gallium/drivers/nv40/nv40_context.h
@@ -111,8 +111,6 @@ struct nv40_context {
struct draw_context *draw;
- int chipset;
-
/* HW state derived from pipe states */
struct nv40_state state;
struct {
diff --git a/src/gallium/drivers/nv40/nv40_screen.c b/src/gallium/drivers/nv40/nv40_screen.c
index 7f68539a85..1bf0931e4d 100644
--- a/src/gallium/drivers/nv40/nv40_screen.c
+++ b/src/gallium/drivers/nv40/nv40_screen.c
@@ -12,9 +12,10 @@ static const char *
nv40_screen_get_name(struct pipe_screen *pscreen)
{
struct nv40_screen *screen = nv40_screen(pscreen);
+ struct nouveau_device *dev = screen->nvws->channel->device;
static char buffer[128];
- snprintf(buffer, sizeof(buffer), "NV%02X", screen->chipset);
+ snprintf(buffer, sizeof(buffer), "NV%02X", dev->chipset);
return buffer;
}
@@ -149,17 +150,16 @@ nv40_screen_destroy(struct pipe_screen *pscreen)
}
struct pipe_screen *
-nv40_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws,
- unsigned chipset)
+nv40_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
{
struct nv40_screen *screen = CALLOC_STRUCT(nv40_screen);
struct nouveau_stateobj *so;
unsigned curie_class;
+ unsigned chipset = nvws->channel->device;
int ret;
if (!screen)
return NULL;
- screen->chipset = chipset;
screen->nvws = nvws;
/* 3D object */
diff --git a/src/gallium/drivers/nv40/nv40_screen.h b/src/gallium/drivers/nv40/nv40_screen.h
index 3ea78aadfd..c04a1275a0 100644
--- a/src/gallium/drivers/nv40/nv40_screen.h
+++ b/src/gallium/drivers/nv40/nv40_screen.h
@@ -7,7 +7,6 @@ struct nv40_screen {
struct pipe_screen pipe;
struct nouveau_winsys *nvws;
- unsigned chipset;
unsigned cur_pctx;