summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2006-12-24 00:50:13 +1100
committerBen Skeggs <[email protected]>2006-12-24 00:50:13 +1100
commitd79323bd42864fc4768874f56734bad9dc6d8a9c (patch)
tree31b2adafef5082f137df54c9ac2442136cce9d83 /src/mesa/drivers/dri
parentf54c725497cac19294e1465413d21a9416d4245f (diff)
nouveau: Kill some compile warnings.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_driver.c3
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_fifo.c10
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_fifo.h1
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_screen.c1
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_shader.h3
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_state.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv30_fragprog.c1
-rw-r--r--src/mesa/drivers/dri/nouveau/nv30_state.c7
-rw-r--r--src/mesa/drivers/dri/nouveau/nv30_vertprog.c3
-rw-r--r--src/mesa/drivers/dri/nouveau/nv40_vertprog.c3
10 files changed, 13 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
index f85dc62e748..00956aa8f8b 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
@@ -129,8 +129,7 @@ static void nouveauFinish( GLcontext *ctx )
}
/* glClear */
-static void nouveauClear( GLcontext *ctx, GLbitfield mask, GLboolean all,
- GLint cx, GLint cy, GLint cw, GLint ch )
+static void nouveauClear( GLcontext *ctx, GLbitfield mask )
{
// XXX we really should do something here...
}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c
index fcfc0ebe14c..5c2b2c75523 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.c
@@ -133,12 +133,14 @@ GLboolean nouveauFifoInit(nouveauContextPtr nmesa)
return GL_FALSE;
}
- if (drmMap(nmesa->driFd, fifo_init.cmdbuf, fifo_init.cmdbuf_size, &nmesa->fifo.buffer)) {
- FATAL("Unable to map the fifo\n",ret);
+ ret = drmMap(nmesa->driFd, fifo_init.cmdbuf, fifo_init.cmdbuf_size, &nmesa->fifo.buffer);
+ if (ret) {
+ FATAL("Unable to map the fifo (returned %d)\n",ret);
return GL_FALSE;
}
- if (drmMap(nmesa->driFd, fifo_init.ctrl, fifo_init.ctrl_size, &nmesa->fifo.mmio)) {
- FATAL("Unable to map the control regs\n",ret);
+ ret = drmMap(nmesa->driFd, fifo_init.ctrl, fifo_init.ctrl_size, &nmesa->fifo.mmio);
+ if (ret) {
+ FATAL("Unable to map the control regs (returned %d)\n",ret);
return GL_FALSE;
}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h
index 51993cf5565..05d00d47690 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h
@@ -145,6 +145,7 @@ int i; for(i=0;i<sz;i++) OUT_RING_CACHE(*(p+i)); \
}while(0)
extern void nouveauWaitForIdle(nouveauContextPtr nmesa);
+extern void nouveauWaitForIdleLocked(nouveauContextPtr nmesa);
extern GLboolean nouveauFifoInit(nouveauContextPtr nmesa);
#endif /* __NOUVEAU_FIFO_H__ */
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
index 99992b838a5..97bca84d8b8 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c
@@ -232,7 +232,6 @@ nouveauFillInModes( unsigned pixel_bits, unsigned depth_bits,
unsigned num_modes;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
- unsigned fb_format_factor;
int i;
static const struct {
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.h b/src/mesa/drivers/dri/nouveau/nouveau_shader.h
index 652775e6c23..6e934f2908e 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_shader.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.h
@@ -241,6 +241,9 @@ extern unsigned int NVFP_TX_BOP_COUNT;
extern struct _op_xlat NVFP_TX_AOP[];
extern struct _op_xlat NVFP_TX_BOP[];
+extern void NV20VPTXSwizzle(int hwswz, nvsSwzComp *swz);
+extern nvsSwzComp NV20VP_TX_SWIZZLE[4];
+
#define SCAP_SRC_ABS (1<<0)
struct _nvsFunc {
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c
index 8df334d7006..1ff881f0542 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_state.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c
@@ -59,11 +59,9 @@ static void nouveauCalcViewport(GLcontext *ctx)
/* Calculate the Viewport Matrix */
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
- nouveau_renderbuffer *nrb;
const GLfloat *v = ctx->Viewport._WindowMap.m;
GLfloat *m = nmesa->viewport.m;
GLfloat xoffset = nmesa->drawX, yoffset = nmesa->drawY;
- GLint h = 0;
nmesa->depth_scale = 1.0 / ctx->DrawBuffer->_DepthMaxF;
diff --git a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c
index 98aa27ea9c1..b11bc1809e7 100644
--- a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c
+++ b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c
@@ -24,7 +24,6 @@ static void
NV30FPUploadToHW(GLcontext *ctx, nouveauShader *nvs)
{
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
- drm_nouveau_mem_alloc_t mem;
if (!nvs->program_buffer) {
nouveau_mem *fpbuf;
diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c
index 7ccf5f98756..45befd0e776 100644
--- a/src/mesa/drivers/dri/nouveau/nv30_state.c
+++ b/src/mesa/drivers/dri/nouveau/nv30_state.c
@@ -573,7 +573,6 @@ void (*RenderMode)(GLcontext *ctx, GLenum mode );
static void nv30Scissor(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
{
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
- nouveau_renderbuffer *nrb;
/* There's no scissor enable bit, so adjust the scissor to cover the
* maximum draw buffer bounds
@@ -677,7 +676,6 @@ static void nv30TextureMatrix(GLcontext *ctx, GLuint unit, const GLmatrix *mat)
static void nv30WindowMoved(nouveauContextPtr nmesa)
{
GLcontext *ctx = nmesa->glCtx;
- nouveau_renderbuffer *nrb;
GLfloat *v = nmesa->viewport.m;
GLuint w = ctx->Viewport.Width;
GLuint h = ctx->Viewport.Height;
@@ -759,11 +757,10 @@ static GLboolean nv30BindBuffers(nouveauContextPtr nmesa, int num_color,
nouveau_renderbuffer **color,
nouveau_renderbuffer *depth)
{
- nouveau_renderbuffer *nrb;
GLuint x, y, w, h;
- w = nrb->mesa.Width;
- h = nrb->mesa.Height;
+ w = color[0]->mesa.Width;
+ h = color[0]->mesa.Height;
x = nmesa->drawX;
y = nmesa->drawY;
diff --git a/src/mesa/drivers/dri/nouveau/nv30_vertprog.c b/src/mesa/drivers/dri/nouveau/nv30_vertprog.c
index e60422dad10..6ba8e35d55f 100644
--- a/src/mesa/drivers/dri/nouveau/nv30_vertprog.c
+++ b/src/mesa/drivers/dri/nouveau/nv30_vertprog.c
@@ -6,9 +6,6 @@
#include "nouveau_shader.h"
#include "nv30_shader.h"
-extern nvsSwzComp NV20VP_TX_SWIZZLE[4];
-extern void NV20VPTXSwizzle(int hwswz, nvsSwzComp *swz);
-
/*****************************************************************************
* Support routines
*/
diff --git a/src/mesa/drivers/dri/nouveau/nv40_vertprog.c b/src/mesa/drivers/dri/nouveau/nv40_vertprog.c
index f2cb3fb166a..0493e184033 100644
--- a/src/mesa/drivers/dri/nouveau/nv40_vertprog.c
+++ b/src/mesa/drivers/dri/nouveau/nv40_vertprog.c
@@ -2,9 +2,6 @@
#include "nouveau_msg.h"
#include "nv40_shader.h"
-extern nvsSwzComp NV20VP_TX_SWIZZLE[4];
-extern void NV20VPTXSwizzle(int hwswz, nvsSwzComp *swz);
-
/*****************************************************************************
* Assembly routines
*/