diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2005-05-04 20:11:35 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2005-05-04 20:11:35 +0000 |
commit | e4b2356c07d31fbeeabb13b2fb47db703b473080 (patch) | |
tree | d8b7f1c7c9e7c84d84349485f942dd205dd4c16d /src/mesa/drivers/dri/ffb | |
parent | ebef61f5c0950572f9c6a81b08f447957461675c (diff) |
Major check-in of changes for GL_EXT_framebuffer_object extension.
Main driver impacts:
- new code for creating the Mesa GLframebuffer
- new span/pixel read/write code
Some drivers not yet updated/tested.
Diffstat (limited to 'src/mesa/drivers/dri/ffb')
-rw-r--r-- | src/mesa/drivers/dri/ffb/ffb_clear.c | 20 | ||||
-rw-r--r-- | src/mesa/drivers/dri/ffb/ffb_state.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/ffb/ffb_xmesa.c | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/ffb/ffb_clear.c b/src/mesa/drivers/dri/ffb/ffb_clear.c index 2bb0eb047b..c63179149a 100644 --- a/src/mesa/drivers/dri/ffb/ffb_clear.c +++ b/src/mesa/drivers/dri/ffb/ffb_clear.c @@ -267,7 +267,7 @@ void ffbDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all, { ffbContextPtr fmesa = FFB_CONTEXT(ctx); __DRIdrawablePrivate *dPriv = fmesa->driDrawable; - unsigned int stcmask = DD_STENCIL_BIT; + unsigned int stcmask = BUFFER_BIT_STENCIL; #ifdef CLEAR_TRACE fprintf(stderr, "ffbDDClear: mask(%08x) all(%d) " @@ -277,7 +277,7 @@ void ffbDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all, if (!(fmesa->ffb_sarea->flags & FFB_DRI_FFB2PLUS)) stcmask = 0; - if (mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT | DD_DEPTH_BIT | stcmask)) { + if (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT | BUFFER_BIT_DEPTH | stcmask)) { ffb_fbcPtr ffb = fmesa->regs; unsigned int fbc, ppc; @@ -288,20 +288,20 @@ void ffbDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all, FFB_PPC_ZS_CONST | FFB_PPC_CS_CONST); /* Y/X enables must be both on or both off. */ - if (mask & (DD_DEPTH_BIT | stcmask)) { + if (mask & (BUFFER_BIT_DEPTH | stcmask)) { fbc |= (FFB_FBC_ZE_ON | FFB_FBC_YE_ON | FFB_FBC_WB_C); } else fbc |= FFB_FBC_ZE_OFF | FFB_FBC_YE_OFF; /* All RGB enables must be both on or both off. */ - if (mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) { - if (mask & DD_FRONT_LEFT_BIT) { + if (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)) { + if (mask & BUFFER_BIT_FRONT_LEFT) { if (fmesa->back_buffer == 0) fbc |= FFB_FBC_WB_B; else fbc |= FFB_FBC_WB_A; } - if (mask & DD_BACK_LEFT_BIT) { + if (mask & BUFFER_BIT_BACK_LEFT) { if (fmesa->back_buffer == 0) fbc |= FFB_FBC_WB_A; else @@ -321,9 +321,9 @@ void ffbDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all, ffb->cmp = 0x80808080; ffb->rop = FFB_ROP_NEW; - if (mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) + if (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)) ffb->fg = fmesa->clear_pixel; - if (mask & DD_DEPTH_BIT) + if (mask & BUFFER_BIT_DEPTH) ffb->constz = fmesa->clear_depth; if (mask & stcmask) ffb->consty = fmesa->clear_stencil; @@ -344,8 +344,8 @@ void ffbDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all, UNLOCK_HARDWARE(fmesa); - mask &= ~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT | - DD_DEPTH_BIT | stcmask); + mask &= ~(BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT | + BUFFER_BIT_DEPTH | stcmask); } if (mask) diff --git a/src/mesa/drivers/dri/ffb/ffb_state.c b/src/mesa/drivers/dri/ffb/ffb_state.c index 53d56d2043..48b58e0993 100644 --- a/src/mesa/drivers/dri/ffb/ffb_state.c +++ b/src/mesa/drivers/dri/ffb/ffb_state.c @@ -522,14 +522,14 @@ static void ffbDDSetBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, #endif fbc &= ~(FFB_FBC_RB_MASK); switch (bufferBit) { - case DD_FRONT_LEFT_BIT: + case BUFFER_BIT_FRONT_LEFT: if (fmesa->back_buffer == 0) fbc |= FFB_FBC_RB_B; else fbc |= FFB_FBC_RB_A; break; - case DD_BACK_LEFT_BIT: + case BUFFER_BIT_BACK_LEFT: if (fmesa->back_buffer == 0) fbc |= FFB_FBC_RB_A; else diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c index 722b870f5e..cdaafac15f 100644 --- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c +++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c @@ -515,8 +515,8 @@ ffbMakeCurrent(__DRIcontextPrivate *driContextPriv, * we need to clear all the hw buffers. */ ffbDDClear(fmesa->glCtx, - (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT | - DD_DEPTH_BIT | DD_STENCIL_BIT), + (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT | + BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL), 1, 0, 0, 0, 0); } } else { |