remove some temporary hacks

This commit is contained in:
Brian
2007-08-10 11:16:53 -06:00
parent 0aa8b1643b
commit 6349bd3112

View File

@@ -49,9 +49,6 @@
#include "rbadaptors.h"
#include "pipe/p_state.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "state_tracker/st_context.h"
@@ -950,7 +947,6 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
GLenum internalFormat,
GLuint width, GLuint height)
{
struct pipe_context *pipe = ctx->st->pipe;
GLuint pixelSize;
/* first clear these fields */
@@ -1067,11 +1063,6 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoValues = put_mono_values_ubyte;
rb->StencilBits = 8 * sizeof(GLubyte);
pixelSize = sizeof(GLubyte);
#if 0
if (!rb->surface)
rb->surface = (struct pipe_surface *)
pipe->surface_alloc(pipe, PIPE_FORMAT_U_S8);
#endif
break;
case GL_STENCIL_INDEX16_EXT:
rb->_ActualFormat = GL_STENCIL_INDEX16_EXT;
@@ -1102,11 +1093,6 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutValues = put_values_ushort;
rb->PutMonoValues = put_mono_values_ushort;
rb->DepthBits = 8 * sizeof(GLushort);
#if 0
if (!rb->surface)
rb->surface = (struct pipe_surface *)
pipe->surface_alloc(pipe, PIPE_FORMAT_U_Z16);
#endif
pixelSize = sizeof(GLushort);
break;
case GL_DEPTH_COMPONENT24:
@@ -1129,11 +1115,6 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->_ActualFormat = GL_DEPTH_COMPONENT32;
rb->DepthBits = 32;
}
#if 0
if (!rb->surface)
rb->surface = (struct pipe_surface *)
pipe->surface_alloc(pipe, PIPE_FORMAT_U_Z32);
#endif
pixelSize = sizeof(GLuint);
break;
case GL_DEPTH_STENCIL_EXT:
@@ -1151,11 +1132,6 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoValues = put_mono_values_uint;
rb->DepthBits = 24;
rb->StencilBits = 8;
#if 0
if (!rb->surface)
rb->surface = (struct pipe_surface *)
pipe->surface_alloc(pipe, PIPE_FORMAT_S8_Z24);
#endif
pixelSize = sizeof(GLuint);
break;
case GL_COLOR_INDEX8_EXT:
@@ -1218,34 +1194,14 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
ASSERT(rb->PutMonoValues);
/* free old buffer storage */
if (0/**rb->surface**/) {
/* pipe_surface/region */
}
else if (rb->Data) {
/* legacy renderbuffer (this will go away) */
if (rb->Data) {
_mesa_free(rb->Data);
rb->Data = NULL;
}
rb->Data = NULL;
if (width > 0 && height > 0) {
/* allocate new buffer storage */
if (0/**rb->surface**/) {
/* pipe_surface/region */
#if 0
if (rb->surface->region) {
pipe->region_unmap(pipe, rb->surface->region);
pipe->region_release(pipe, &rb->surface->region);
}
rb->surface->region = pipe->region_alloc(pipe, pixelSize, width, height);
/* XXX probably don't want to really map here */
pipe->region_map(pipe, rb->surface->region);
rb->Data = rb->surface->region->map;
#endif
}
else {
/* legacy renderbuffer (this will go away) */
rb->Data = malloc(width * height * pixelSize);
}
rb->Data = malloc(width * height * pixelSize);
if (rb->Data == NULL) {
rb->Width = 0;