}
/* 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...
}
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;
}
}while(0)
extern void nouveauWaitForIdle(nouveauContextPtr nmesa);
+extern void nouveauWaitForIdleLocked(nouveauContextPtr nmesa);
extern GLboolean nouveauFifoInit(nouveauContextPtr nmesa);
#endif /* __NOUVEAU_FIFO_H__ */
unsigned num_modes;
unsigned depth_buffer_factor;
unsigned back_buffer_factor;
- unsigned fb_format_factor;
int i;
static const struct {
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 {
/* 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;
NV30FPUploadToHW(GLcontext *ctx, nouveauShader *nvs)
{
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
- drm_nouveau_mem_alloc_t mem;
if (!nvs->program_buffer) {
nouveau_mem *fpbuf;
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
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;
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;
#include "nouveau_shader.h"
#include "nv30_shader.h"
-extern nvsSwzComp NV20VP_TX_SWIZZLE[4];
-extern void NV20VPTXSwizzle(int hwswz, nvsSwzComp *swz);
-
/*****************************************************************************
* Support routines
*/
#include "nouveau_msg.h"
#include "nv40_shader.h"
-extern nvsSwzComp NV20VP_TX_SWIZZLE[4];
-extern void NV20VPTXSwizzle(int hwswz, nvsSwzComp *swz);
-
/*****************************************************************************
* Assembly routines
*/