summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
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
parent2f80d4d2a705835b272cf2274ea578fe5bbe1919 (diff)
nouveau: remove chipset fields in all nv pipe driver context/screen structs.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_winsys.h13
-rw-r--r--src/gallium/drivers/nv10/nv10_context.c2
-rw-r--r--src/gallium/drivers/nv10/nv10_context.h2
-rw-r--r--src/gallium/drivers/nv10/nv10_screen.c8
-rw-r--r--src/gallium/drivers/nv10/nv10_screen.h1
-rw-r--r--src/gallium/drivers/nv30/nv30_context.c2
-rw-r--r--src/gallium/drivers/nv30/nv30_context.h2
-rw-r--r--src/gallium/drivers/nv30/nv30_screen.c8
-rw-r--r--src/gallium/drivers/nv30/nv30_screen.h1
-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
-rw-r--r--src/gallium/drivers/nv50/nv50_screen.c8
-rw-r--r--src/gallium/drivers/nv50/nv50_screen.h1
15 files changed, 21 insertions, 40 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
index fbde7adc6a..07a41dcf4a 100644
--- a/src/gallium/drivers/nouveau/nouveau_winsys.h
+++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
@@ -8,6 +8,7 @@
#include "nouveau/nouveau_bo.h"
#include "nouveau/nouveau_channel.h"
#include "nouveau/nouveau_class.h"
+#include "nouveau/nouveau_device.h"
#include "nouveau/nouveau_grobj.h"
#include "nouveau/nouveau_notifier.h"
#include "nouveau/nouveau_resource.h"
@@ -56,29 +57,25 @@ struct nouveau_winsys {
};
extern struct pipe_screen *
-nv10_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *,
- unsigned chipset);
+nv10_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *);
extern struct pipe_context *
nv10_create(struct pipe_screen *, unsigned pctx_id);
extern struct pipe_screen *
-nv30_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *,
- unsigned chipset);
+nv30_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *);
extern struct pipe_context *
nv30_create(struct pipe_screen *, unsigned pctx_id);
extern struct pipe_screen *
-nv40_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *,
- unsigned chipset);
+nv40_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *);
extern struct pipe_context *
nv40_create(struct pipe_screen *, unsigned pctx_id);
extern struct pipe_screen *
-nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *,
- unsigned chipset);
+nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *);
extern struct pipe_context *
nv50_create(struct pipe_screen *, unsigned pctx_id);
diff --git a/src/gallium/drivers/nv10/nv10_context.c b/src/gallium/drivers/nv10/nv10_context.c
index a25c082a5d..79253f8a2b 100644
--- a/src/gallium/drivers/nv10/nv10_context.c
+++ b/src/gallium/drivers/nv10/nv10_context.c
@@ -264,7 +264,6 @@ nv10_create(struct pipe_screen *pscreen, unsigned pctx_id)
struct nv10_screen *screen = nv10_screen(pscreen);
struct pipe_winsys *ws = pscreen->winsys;
struct nv10_context *nv10;
- unsigned chipset = screen->chipset;
struct nouveau_winsys *nvws = screen->nvws;
nv10 = CALLOC(1, sizeof(struct nv10_context));
@@ -273,7 +272,6 @@ nv10_create(struct pipe_screen *pscreen, unsigned pctx_id)
nv10->screen = screen;
nv10->pctx_id = pctx_id;
- nv10->chipset = chipset;
nv10->nvws = nvws;
nv10->pipe.winsys = ws;
diff --git a/src/gallium/drivers/nv10/nv10_context.h b/src/gallium/drivers/nv10/nv10_context.h
index 1b794c1872..433d04dc2a 100644
--- a/src/gallium/drivers/nv10/nv10_context.h
+++ b/src/gallium/drivers/nv10/nv10_context.h
@@ -43,8 +43,6 @@ struct nv10_context {
struct draw_context *draw;
- int chipset;
-
uint32_t dirty;
struct nv10_sampler_state *tex_sampler[PIPE_MAX_SAMPLERS];
diff --git a/src/gallium/drivers/nv10/nv10_screen.c b/src/gallium/drivers/nv10/nv10_screen.c
index cf6b2fac84..fad96058b8 100644
--- a/src/gallium/drivers/nv10/nv10_screen.c
+++ b/src/gallium/drivers/nv10/nv10_screen.c
@@ -8,9 +8,10 @@ static const char *
nv10_screen_get_name(struct pipe_screen *screen)
{
struct nv10_screen *nv10screen = nv10_screen(screen);
+ struct nouveau_device *dev = nv10screen->nvws->channel->device;
static char buffer[128];
- snprintf(buffer, sizeof(buffer), "NV%02X", nv10screen->chipset);
+ snprintf(buffer, sizeof(buffer), "NV%02X", dev->chipset);
return buffer;
}
@@ -129,16 +130,15 @@ nv10_screen_destroy(struct pipe_screen *pscreen)
}
struct pipe_screen *
-nv10_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws,
- unsigned chipset)
+nv10_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
{
struct nv10_screen *screen = CALLOC_STRUCT(nv10_screen);
unsigned celsius_class;
+ unsigned chipset = nvws->channel->device->chipset;
int ret;
if (!screen)
return NULL;
- screen->chipset = chipset;
screen->nvws = nvws;
/* 3D object */
diff --git a/src/gallium/drivers/nv10/nv10_screen.h b/src/gallium/drivers/nv10/nv10_screen.h
index 4192fe11ef..3f8750a13f 100644
--- a/src/gallium/drivers/nv10/nv10_screen.h
+++ b/src/gallium/drivers/nv10/nv10_screen.h
@@ -7,7 +7,6 @@ struct nv10_screen {
struct pipe_screen pipe;
struct nouveau_winsys *nvws;
- unsigned chipset;
/* HW graphics objects */
struct nouveau_grobj *celsius;
diff --git a/src/gallium/drivers/nv30/nv30_context.c b/src/gallium/drivers/nv30/nv30_context.c
index 4b0892971e..7a2fee7875 100644
--- a/src/gallium/drivers/nv30/nv30_context.c
+++ b/src/gallium/drivers/nv30/nv30_context.c
@@ -44,7 +44,6 @@ nv30_create(struct pipe_screen *pscreen, unsigned pctx_id)
struct nv30_screen *screen = nv30_screen(pscreen);
struct pipe_winsys *ws = pscreen->winsys;
struct nv30_context *nv30;
- unsigned chipset = screen->chipset;
struct nouveau_winsys *nvws = screen->nvws;
nv30 = CALLOC(1, sizeof(struct nv30_context));
@@ -53,7 +52,6 @@ nv30_create(struct pipe_screen *pscreen, unsigned pctx_id)
nv30->screen = screen;
nv30->pctx_id = pctx_id;
- nv30->chipset = chipset;
nv30->nvws = nvws;
nv30->pipe.winsys = ws;
diff --git a/src/gallium/drivers/nv30/nv30_context.h b/src/gallium/drivers/nv30/nv30_context.h
index 1a016405e6..f49450f82d 100644
--- a/src/gallium/drivers/nv30/nv30_context.h
+++ b/src/gallium/drivers/nv30/nv30_context.h
@@ -85,8 +85,6 @@ struct nv30_context {
struct draw_context *draw;
- int chipset;
-
uint32_t dirty;
struct nv30_sampler_state *tex_sampler[PIPE_MAX_SAMPLERS];
diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c
index 1de4507904..9b0ac55ff8 100644
--- a/src/gallium/drivers/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nv30/nv30_screen.c
@@ -12,9 +12,10 @@ static const char *
nv30_screen_get_name(struct pipe_screen *pscreen)
{
struct nv30_screen *screen = nv30_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;
}
@@ -140,17 +141,16 @@ nv30_screen_destroy(struct pipe_screen *pscreen)
}
struct pipe_screen *
-nv30_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws,
- unsigned chipset)
+nv30_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
{
struct nv30_screen *screen = CALLOC_STRUCT(nv30_screen);
struct nouveau_stateobj *so;
unsigned rankine_class = 0;
+ unsigned chipset = nvws->channel->device->chipset;
int ret, i;
if (!screen)
return NULL;
- screen->chipset = chipset;
screen->nvws = nvws;
/* 3D object */
diff --git a/src/gallium/drivers/nv30/nv30_screen.h b/src/gallium/drivers/nv30/nv30_screen.h
index 56f8776a17..816ece94c4 100644
--- a/src/gallium/drivers/nv30/nv30_screen.h
+++ b/src/gallium/drivers/nv30/nv30_screen.h
@@ -7,7 +7,6 @@ struct nv30_screen {
struct pipe_screen pipe;
struct nouveau_winsys *nvws;
- unsigned chipset;
/* HW graphics objects */
struct nouveau_grobj *rankine;
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;
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index e4ca72c717..d069639dc4 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -45,9 +45,10 @@ static const char *
nv50_screen_get_name(struct pipe_screen *pscreen)
{
struct nv50_screen *screen = nv50_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;
}
@@ -123,17 +124,16 @@ nv50_screen_destroy(struct pipe_screen *pscreen)
}
struct pipe_screen *
-nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws,
- unsigned chipset)
+nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
{
struct nv50_screen *screen = CALLOC_STRUCT(nv50_screen);
struct nouveau_stateobj *so;
unsigned tesla_class = 0, ret;
+ unsigned chipset = nvws->channel->device->chipset;
int i;
if (!screen)
return NULL;
- screen->chipset = chipset;
screen->nvws = nvws;
/* 3D object */
diff --git a/src/gallium/drivers/nv50/nv50_screen.h b/src/gallium/drivers/nv50/nv50_screen.h
index 6e4120d669..5a2732e37f 100644
--- a/src/gallium/drivers/nv50/nv50_screen.h
+++ b/src/gallium/drivers/nv50/nv50_screen.h
@@ -7,7 +7,6 @@ struct nv50_screen {
struct pipe_screen pipe;
struct nouveau_winsys *nvws;
- unsigned chipset;
unsigned cur_pctx;