mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 08:10:09 +01:00
Remove NEW_RENDERBUFFER stuff.
Now, OLD_RENDERBUFFER marks code that needs to eventually be removed when all the drivers are updated to no longer need the SetBuffer() function.
This commit is contained in:
parent
446e258940
commit
bb5c84fcbc
11 changed files with 18 additions and 35 deletions
|
|
@ -1204,9 +1204,7 @@ static GLboolean initialize_visual_and_buffer( int client,
|
|||
XMesaDrawable window,
|
||||
XMesaColormap cmap )
|
||||
{
|
||||
#if NEW_RENDERBUFFER
|
||||
struct xmesa_renderbuffer *front_xrb, *back_xrb;
|
||||
#endif
|
||||
#ifndef XFree86Server
|
||||
XGCValues gcvalues;
|
||||
#endif
|
||||
|
|
@ -1215,7 +1213,6 @@ static GLboolean initialize_visual_and_buffer( int client,
|
|||
assert(b->xm_visual == v);
|
||||
}
|
||||
|
||||
#if NEW_RENDERBUFFER
|
||||
if (b) {
|
||||
front_xrb = b->frontxrb;
|
||||
back_xrb = b->backxrb;
|
||||
|
|
@ -1223,7 +1220,6 @@ static GLboolean initialize_visual_and_buffer( int client,
|
|||
else {
|
||||
front_xrb = back_xrb = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Save true bits/pixel */
|
||||
v->BitsPerPixel = bits_per_pixel(v);
|
||||
|
|
@ -2637,8 +2633,12 @@ unsigned long XMesaDitherColor( XMesaContext xmesa, GLint x, GLint y,
|
|||
*/
|
||||
void XMesaResizeBuffers( XMesaBuffer b )
|
||||
{
|
||||
#if OLD_RENDERBUFFER
|
||||
xmesa_resize_buffers(ctx, &(b->mesa_buffer), 0, 0 );
|
||||
#endif
|
||||
Window root;
|
||||
int xpos, ypos;
|
||||
unsigned int width, height, bw, depth;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
XGetGeometry( b->xm_visual->display, b->frontxrb->pixmap,
|
||||
&root, &xpos, &ypos, &width, &height, &bw, &depth);
|
||||
xmesa_resize_buffers(ctx, &(b->mesa_buffer), width, height);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -563,9 +563,7 @@ xmesa_resize_buffers(GLcontext *ctx, GLframebuffer *buffer,
|
|||
|
||||
xmesa_alloc_back_buffer(xmBuffer, width, height);
|
||||
|
||||
#if NEW_RENDERBUFFER
|
||||
_mesa_resize_framebuffer(ctx, buffer, width, height);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1022,12 +1020,6 @@ xmesa_update_state( GLcontext *ctx, GLuint new_state )
|
|||
}
|
||||
}
|
||||
|
||||
#if OLD_RENDERBUFFER && 0
|
||||
if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)) {
|
||||
xmesa_update_span_funcs(ctx);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (xmesa->xm_visual->hpcr_clear_flag) {
|
||||
/* this depends on whether we're drawing to the front or back buffer */
|
||||
/* XXX FIX THIS! */
|
||||
|
|
|
|||
|
|
@ -322,9 +322,8 @@
|
|||
#define MAX_CLIPPED_VERTICES ((2 * (6 + MAX_CLIP_PLANES))+1)
|
||||
|
||||
|
||||
/* XXX these are temporary */
|
||||
#define NEW_RENDERBUFFER 1
|
||||
#define OLD_RENDERBUFFER 0
|
||||
/* XXX everything marked with OLD_RENDERBUFFER will be going away... */
|
||||
#define OLD_RENDERBUFFER 1
|
||||
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
|
|
|||
|
|
@ -1555,7 +1555,6 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
|
|||
if (drawBuffer && readBuffer) {
|
||||
/* TODO: check if newCtx and buffer's visual match??? */
|
||||
|
||||
#if NEW_RENDERBUFFER
|
||||
ASSERT(drawBuffer->Name == 0);
|
||||
ASSERT(readBuffer->Name == 0);
|
||||
newCtx->WinSysDrawBuffer = drawBuffer;
|
||||
|
|
@ -1565,10 +1564,7 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
|
|||
newCtx->DrawBuffer = drawBuffer;
|
||||
newCtx->ReadBuffer = readBuffer;
|
||||
}
|
||||
#else
|
||||
newCtx->DrawBuffer = drawBuffer;
|
||||
newCtx->ReadBuffer = readBuffer;
|
||||
#endif
|
||||
|
||||
newCtx->NewState |= _NEW_BUFFERS;
|
||||
|
||||
#if _HAVE_FULL_GL
|
||||
|
|
|
|||
|
|
@ -2184,7 +2184,7 @@ struct gl_framebuffer
|
|||
struct gl_renderbuffer *_ColorDrawBuffers[MAX_DRAW_BUFFERS][4];
|
||||
struct gl_renderbuffer *_ColorReadBuffer;
|
||||
|
||||
#if OLD_RENDERBUFFER || NEW_RENDERBUFFER
|
||||
#if OLD_RENDERBUFFER
|
||||
/* XXX THIS IS TEMPORARY */
|
||||
GLuint _ColorDrawBit[MAX_DRAW_BUFFERS][4];
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ clear_color_buffers(GLcontext *ctx)
|
|||
|
||||
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers[0]; i++) {
|
||||
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][i];
|
||||
#if OLD_RENDERBUFFER || NEW_RENDERBUFFER
|
||||
#if OLD_RENDERBUFFER
|
||||
/* SetBuffer will go away */
|
||||
if (swrast->Driver.SetBuffer)
|
||||
swrast->Driver.SetBuffer(ctx, ctx->DrawBuffer,
|
||||
|
|
|
|||
|
|
@ -88,9 +88,7 @@ _swrast_update_rasterflags( GLcontext *ctx )
|
|||
* MULTI_DRAW_BIT flag. Also set it if we're drawing to no
|
||||
* buffers or the RGBA or CI mask disables all writes.
|
||||
*/
|
||||
#if NEW_RENDERBUFFER
|
||||
if (ctx->DrawBuffer->_NumColorDrawBuffers[0] != 1) {
|
||||
#endif
|
||||
/* more than one color buffer designated for writing (or zero buffers) */
|
||||
rasterMask |= MULTI_DRAW_BIT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,9 +51,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
|
|||
const struct gl_pixelstore_attrib *unpack,
|
||||
const GLvoid *pixels)
|
||||
{
|
||||
#if NEW_RENDERBUFFER
|
||||
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][0];
|
||||
#endif
|
||||
SWcontext *swrast = SWRAST_CONTEXT(ctx);
|
||||
struct sw_span span;
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ _swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
|
|||
_swrast_read_rgba_span(ctx, rb, span->end, span->x, span->y, dest);
|
||||
}
|
||||
|
||||
/* NEW_RENDERBUFFER: XXX make this a runtime test */
|
||||
/* XXX make this a runtime test */
|
||||
#if CHAN_TYPE == GL_UNSIGNED_BYTE
|
||||
/* treat 4*GLubyte as GLuint */
|
||||
logicop_uint(ctx, span->end, (GLuint *) rgba,
|
||||
|
|
|
|||
|
|
@ -987,7 +987,7 @@ _swrast_write_index_span( GLcontext *ctx, struct sw_span *span)
|
|||
}
|
||||
}
|
||||
|
||||
#if OLD_RENDERBUFFER || NEW_RENDERBUFFER
|
||||
#if OLD_RENDERBUFFER
|
||||
/* restore default dest buffer */
|
||||
_swrast_use_draw_buffer(ctx);
|
||||
#endif
|
||||
|
|
@ -1033,7 +1033,7 @@ add_colors(GLuint n, GLchan rgba[][4], GLchan specular[][4] )
|
|||
static void
|
||||
multi_write_rgba_span( GLcontext *ctx, struct sw_span *span )
|
||||
{
|
||||
#if OLD_RENDERBUFFER || NEW_RENDERBUFFER
|
||||
#if OLD_RENDERBUFFER
|
||||
SWcontext *swrast = SWRAST_CONTEXT(ctx);
|
||||
#endif
|
||||
const GLuint colorMask = *((GLuint *) ctx->Color.ColorMask);
|
||||
|
|
@ -1048,7 +1048,7 @@ multi_write_rgba_span( GLcontext *ctx, struct sw_span *span )
|
|||
struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[output][i];
|
||||
GLchan rgbaTmp[MAX_WIDTH][4];
|
||||
|
||||
#if OLD_RENDERBUFFER || NEW_RENDERBUFFER
|
||||
#if OLD_RENDERBUFFER
|
||||
/* obsolete code */
|
||||
GLuint bufferBit = fb->_ColorDrawBit[output][i];
|
||||
/* Set the current read/draw buffer */
|
||||
|
|
@ -1085,7 +1085,7 @@ multi_write_rgba_span( GLcontext *ctx, struct sw_span *span )
|
|||
}
|
||||
}
|
||||
|
||||
#if OLD_RENDERBUFFER || NEW_RENDERBUFFER
|
||||
#if OLD_RENDERBUFFER
|
||||
/* restore default dest buffer */
|
||||
_swrast_use_draw_buffer(ctx);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ _swrast_copy_texsubimage3d(GLcontext *ctx,
|
|||
* Unless otherwise noted, all functions are mandatory.
|
||||
*/
|
||||
struct swrast_device_driver {
|
||||
#if OLD_RENDERBUFFER || NEW_RENDERBUFFER
|
||||
#if OLD_RENDERBUFFER
|
||||
void (*SetBuffer)(GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit);
|
||||
/*
|
||||
* Specifies the current color buffer for span/pixel writing/reading.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue