rb->Format = mt->format;
rb->_BaseFormat = _mesa_get_format_base_format(rb->Format);
- rb->DataType = intel_mesa_format_to_rb_datatype(rb->Format);
rb->InternalFormat = rb->_BaseFormat;
rb->Width = mt->level[level].width;
rb->Height = mt->level[level].height;
rb->Width = width;
rb->Height = height;
rb->_BaseFormat = _mesa_base_fbo_format(ctx, internalFormat);
- rb->DataType = intel_mesa_format_to_rb_datatype(rb->Format);
intel_miptree_release(&irb->mt);
rb->Width = image->region->width;
rb->Height = image->region->height;
rb->Format = image->format;
- rb->DataType = image->data_type;
rb->_BaseFormat = _mesa_base_fbo_format(&intel->ctx,
image->internal_format);
}
irb->Base._BaseFormat = _mesa_get_format_base_format(format);
irb->Base.Format = format;
irb->Base.InternalFormat = irb->Base._BaseFormat;
- irb->Base.DataType = intel_mesa_format_to_rb_datatype(format);
/* intel-specific methods */
irb->Base.Delete = intel_delete_renderbuffer;
rb->Format = format;
rb->InternalFormat = internal_format;
- rb->DataType = intel_mesa_format_to_rb_datatype(rb->Format);
rb->_BaseFormat = _mesa_get_format_base_format(rb->Format);
rb->Width = mt->level[level].width;
rb->Height = mt->level[level].height;
image->internal_format = rb->InternalFormat;
image->format = rb->Format;
- image->data_type = rb->DataType;
+ image->data_type = GL_UNSIGNED_BYTE;
image->data = loaderPrivate;
intel_region_reference(&image->region, irb->mt->region);
case GL_RGB8:
rb->_BaseFormat = GL_RGB;
rb->Format = MESA_FORMAT_XRGB8888;
- rb->DataType = GL_UNSIGNED_BYTE;
s->cpp = 4;
break;
case GL_RGBA:
case GL_RGBA8:
rb->_BaseFormat = GL_RGBA;
rb->Format = MESA_FORMAT_ARGB8888;
- rb->DataType = GL_UNSIGNED_BYTE;
s->cpp = 4;
break;
case GL_RGB5:
rb->_BaseFormat = GL_RGB;
rb->Format = MESA_FORMAT_RGB565;
- rb->DataType = GL_UNSIGNED_BYTE;
s->cpp = 2;
break;
case GL_DEPTH_COMPONENT16:
rb->_BaseFormat = GL_DEPTH_COMPONENT;
rb->Format = MESA_FORMAT_Z16;
- rb->DataType = GL_UNSIGNED_SHORT;
s->cpp = 2;
break;
case GL_DEPTH_COMPONENT:
case GL_DEPTH24_STENCIL8_EXT:
rb->_BaseFormat = GL_DEPTH_STENCIL;
rb->Format = MESA_FORMAT_Z24_S8;
- rb->DataType = GL_UNSIGNED_INT_24_8_EXT;
s->cpp = 4;
break;
default:
case GL_RGB4:
case GL_RGB5:
rb->Format = _radeon_texformat_rgb565;
- rb->DataType = GL_UNSIGNED_BYTE;
cpp = 2;
break;
case GL_RGB:
case GL_RGB12:
case GL_RGB16:
rb->Format = _radeon_texformat_argb8888;
- rb->DataType = GL_UNSIGNED_BYTE;
cpp = 4;
break;
case GL_RGBA:
case GL_RGBA12:
case GL_RGBA16:
rb->Format = _radeon_texformat_argb8888;
- rb->DataType = GL_UNSIGNED_BYTE;
cpp = 4;
break;
case GL_STENCIL_INDEX:
case GL_STENCIL_INDEX16_EXT:
/* alloc a depth+stencil buffer */
rb->Format = MESA_FORMAT_S8_Z24;
- rb->DataType = GL_UNSIGNED_INT_24_8_EXT;
cpp = 4;
break;
case GL_DEPTH_COMPONENT16:
rb->Format = MESA_FORMAT_Z16;
- rb->DataType = GL_UNSIGNED_SHORT;
cpp = 2;
break;
case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT24:
case GL_DEPTH_COMPONENT32:
rb->Format = MESA_FORMAT_X8_Z24;
- rb->DataType = GL_UNSIGNED_INT;
cpp = 4;
break;
case GL_DEPTH_STENCIL_EXT:
case GL_DEPTH24_STENCIL8_EXT:
rb->Format = MESA_FORMAT_S8_Z24;
- rb->DataType = GL_UNSIGNED_INT_24_8_EXT;
cpp = 4;
break;
default:
rb->Width = image->width;
rb->Height = image->height;
rb->Format = image->format;
- rb->DataType = image->data_type;
rb->_BaseFormat = _mesa_base_fbo_format(radeon->glCtx,
image->internal_format);
}
rrb->base.Format = format;
- switch (format) {
- case MESA_FORMAT_RGB565:
- assert(_mesa_little_endian());
- rrb->base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_RGB565_REV:
- assert(!_mesa_little_endian());
- rrb->base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_XRGB8888:
- assert(_mesa_little_endian());
- rrb->base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_XRGB8888_REV:
- assert(!_mesa_little_endian());
- rrb->base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_ARGB8888:
- assert(_mesa_little_endian());
- rrb->base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_ARGB8888_REV:
- assert(!_mesa_little_endian());
- rrb->base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_S8:
- rrb->base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_Z16:
- rrb->base.DataType = GL_UNSIGNED_SHORT;
- break;
- case MESA_FORMAT_X8_Z24:
- rrb->base.DataType = GL_UNSIGNED_INT;
- break;
- case MESA_FORMAT_S8_Z24:
- rrb->base.DataType = GL_UNSIGNED_INT_24_8_EXT;
- break;
- default:
- fprintf(stderr, "%s: Unknown format %s\n",
- __FUNCTION__, _mesa_get_format_name(format));
- _mesa_delete_renderbuffer(&rrb->base);
- return NULL;
- }
rrb->base._BaseFormat = _mesa_get_format_base_format(format);
rrb->dPriv = driDrawPriv;
"%s(%p, rrb %p, texImage %p, texFormat %s) \n",
__func__, ctx, rrb, texImage, _mesa_get_format_name(texImage->TexFormat));
- switch (texImage->TexFormat) {
- case MESA_FORMAT_RGBA8888:
- case MESA_FORMAT_RGBA8888_REV:
- case MESA_FORMAT_ARGB8888:
- case MESA_FORMAT_ARGB8888_REV:
- case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_XRGB8888_REV:
- case MESA_FORMAT_RGB565:
- case MESA_FORMAT_RGB565_REV:
- case MESA_FORMAT_RGBA5551:
- case MESA_FORMAT_ARGB1555:
- case MESA_FORMAT_ARGB1555_REV:
- case MESA_FORMAT_ARGB4444:
- case MESA_FORMAT_ARGB4444_REV:
- rrb->base.DataType = GL_UNSIGNED_BYTE;
- break;
- case MESA_FORMAT_Z16:
- rrb->base.DataType = GL_UNSIGNED_SHORT;
- break;
- case MESA_FORMAT_X8_Z24:
- rrb->base.DataType = GL_UNSIGNED_INT;
- break;
- case MESA_FORMAT_S8_Z24:
- rrb->base.DataType = GL_UNSIGNED_INT_24_8_EXT;
- break;
- default:
- _mesa_problem(ctx, "Unexpected texture format in radeon_update_wrapper()");
- }
-
rrb->cpp = _mesa_get_format_bytes(texImage->TexFormat);
rrb->pitch = texImage->Width * rrb->cpp;
rrb->base.Format = texImage->TexFormat;
image->internal_format = rb->InternalFormat;
image->format = rb->Format;
image->cpp = rrb->cpp;
- image->data_type = rb->DataType;
+ image->data_type = GL_UNSIGNED_BYTE;
image->data = loaderPrivate;
radeon_bo_ref(rrb->bo);
image->bo = rrb->bo;
xrb->Base.Format = MESA_FORMAT_ARGB8888;
xrb->Base.InternalFormat = GL_RGBA;
xrb->Base._BaseFormat = GL_RGBA;
- xrb->Base.DataType = GL_UNSIGNED_BYTE;
xrb->bpp = 32;
break;
case PF_X8R8G8B8:
xrb->Base.Format = MESA_FORMAT_ARGB8888; /* XXX */
xrb->Base.InternalFormat = GL_RGB;
xrb->Base._BaseFormat = GL_RGB;
- xrb->Base.DataType = GL_UNSIGNED_BYTE;
xrb->bpp = 32;
break;
case PF_R5G6B5:
xrb->Base.Format = MESA_FORMAT_RGB565;
xrb->Base.InternalFormat = GL_RGB;
xrb->Base._BaseFormat = GL_RGB;
- xrb->Base.DataType = GL_UNSIGNED_BYTE;
xrb->bpp = 16;
break;
case PF_R3G3B2:
xrb->Base.Format = MESA_FORMAT_RGB332;
xrb->Base.InternalFormat = GL_RGB;
xrb->Base._BaseFormat = GL_RGB;
- xrb->Base.DataType = GL_UNSIGNED_BYTE;
xrb->bpp = 8;
break;
default:
GLvoid *rowaddr[MAX_HEIGHT]; /*< address of first pixel in each image row */
GLboolean yup; /*< TRUE -> Y increases upward */
/*< FALSE -> Y increases downward */
+ GLboolean DataType;
};
const OSMesaContext osmesa = OSMESA_CONTEXT(ctx);
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
- if (osmesa->rb->DataType != GL_UNSIGNED_BYTE)
- return NULL;
-
if (ctx->RenderMode != GL_RENDER) return NULL;
if (ctx->Line.SmoothFlag) return NULL;
if (ctx->Texture._EnabledUnits) return NULL;
const OSMesaContext osmesa = OSMESA_CONTEXT(ctx);
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
- if (osmesa->rb->DataType != GL_UNSIGNED_BYTE)
- return (swrast_tri_func) NULL;
-
if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL;
if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) NULL;
if (ctx->Polygon.StippleFlag) return (swrast_tri_func) NULL;
* XXX The 8-bit/channel formats should all be OK.
*/
if (osmesa->format == OSMESA_RGBA) {
- if (rb->DataType == GL_UNSIGNED_BYTE) {
+ if (osmesa->DataType == GL_UNSIGNED_BYTE) {
if (_mesa_little_endian())
rb->Format = MESA_FORMAT_RGBA8888_REV;
else
rb->Format = MESA_FORMAT_RGBA8888;
}
- else if (rb->DataType == GL_UNSIGNED_SHORT) {
+ else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
rb->Format = MESA_FORMAT_RGBA_16;
}
else {
}
}
else if (osmesa->format == OSMESA_BGRA) {
- if (rb->DataType == GL_UNSIGNED_BYTE) {
+ if (osmesa->DataType == GL_UNSIGNED_BYTE) {
if (_mesa_little_endian())
rb->Format = MESA_FORMAT_ARGB8888;
else
rb->Format = MESA_FORMAT_ARGB8888_REV;
}
- else if (rb->DataType == GL_UNSIGNED_SHORT) {
+ else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format BGRA/GLushort");
rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */
}
}
}
else if (osmesa->format == OSMESA_ARGB) {
- if (rb->DataType == GL_UNSIGNED_BYTE) {
+ if (osmesa->DataType == GL_UNSIGNED_BYTE) {
if (_mesa_little_endian())
rb->Format = MESA_FORMAT_ARGB8888_REV;
else
rb->Format = MESA_FORMAT_ARGB8888;
}
- else if (rb->DataType == GL_UNSIGNED_SHORT) {
+ else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format ARGB/GLushort");
rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */
}
}
}
else if (osmesa->format == OSMESA_RGB) {
- if (rb->DataType == GL_UNSIGNED_BYTE) {
+ if (osmesa->DataType == GL_UNSIGNED_BYTE) {
rb->Format = MESA_FORMAT_RGB888;
}
- else if (rb->DataType == GL_UNSIGNED_SHORT) {
+ else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format RGB/GLushort");
rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */
}
}
}
else if (osmesa->format == OSMESA_BGR) {
- if (rb->DataType == GL_UNSIGNED_BYTE) {
+ if (osmesa->DataType == GL_UNSIGNED_BYTE) {
rb->Format = MESA_FORMAT_BGR888;
}
- else if (rb->DataType == GL_UNSIGNED_SHORT) {
+ else if (osmesa->DataType == GL_UNSIGNED_SHORT) {
_mesa_warning(ctx, "Unsupported OSMesa format BGR/GLushort");
rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */
}
}
}
else if (osmesa->format == OSMESA_RGB_565) {
- ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
+ ASSERT(osmesa->DataType == GL_UNSIGNED_BYTE);
rb->Format = MESA_FORMAT_RGB565;
}
else {
rb->InternalFormat = GL_RGBA;
rb->_BaseFormat = GL_RGBA;
- rb->DataType = type;
}
return rb;
}
assert(osmesa->rb->RefCount == 2);
}
+ osmesa->DataType = type;
+
/* Set renderbuffer fields. Set width/height = 0 to force
* osmesa_renderbuffer_storage() being called by _mesa_resize_framebuffer()
*/
case OSMESA_TYPE:
/* current color buffer's data type */
if (osmesa->rb) {
- *value = osmesa->rb->DataType;
+ *value = osmesa->DataType;
}
else {
*value = 0;
rb->_BaseFormat = GL_RGBA;
rb->InternalFormat = GL_RGBA;
- rb->DataType = CHAN_TYPE;
rb->Delete = wmesa_delete_renderbuffer;
rb->AllocStorage = wmesa_renderbuffer_storage;
return rb;
xrb->Base.InternalFormat = GL_RGBA;
xrb->Base._BaseFormat = GL_RGBA;
- xrb->Base.DataType = GL_UNSIGNED_BYTE;
xrb->Base.ClassID = XMESA_RENDERBUFFER;
switch (xmvis->undithered_pf) {
/* XXX the following fields are obsolete and wil go away */
GLvoid *Data; /**< This may not be used by some kinds of RBs */
- GLenum DataType; /**< Type of values passed to the Get/Put functions */
/** The following fields are only valid while the buffer is mapped */
GLubyte *Map;
rb->InternalFormat = GL_RGBA;
rb->Format = MESA_FORMAT_NONE;
- rb->DataType = GL_NONE;
rb->Data = NULL;
/* Point back to ourself so that we don't have to check for Wrapped==NULL
#include "swrast/s_renderbuffer.h"
-
-/**
- * This is the default software fallback for gl_renderbuffer's span
- * access functions.
- *
- * The assumptions are that rb->Data will be a pointer to (0,0), that pixels
- * are packed in the type of rb->Format, and that subsequent rows appear
- * rb->RowStride pixels later.
- */
-void
-_swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
-{
- switch (rb->Format) {
- case MESA_FORMAT_RGB888:
- rb->DataType = GL_UNSIGNED_BYTE;
- break;
-
- case MESA_FORMAT_RGBA8888:
- case MESA_FORMAT_RGBA8888_REV:
- rb->DataType = GL_UNSIGNED_BYTE;
- break;
-
- case MESA_FORMAT_R8:
- rb->DataType = GL_UNSIGNED_BYTE;
-
- break;
-
- case MESA_FORMAT_GR88:
- rb->DataType = GL_UNSIGNED_BYTE;
- break;
-
- case MESA_FORMAT_R16:
- rb->DataType = GL_UNSIGNED_SHORT;
-
- break;
-
- case MESA_FORMAT_RG1616:
- rb->DataType = GL_UNSIGNED_SHORT;
- break;
-
- case MESA_FORMAT_SIGNED_RGBA_16:
- rb->DataType = GL_SHORT;
- break;
-
- case MESA_FORMAT_S8:
- rb->DataType = GL_UNSIGNED_BYTE;
- break;
-
- case MESA_FORMAT_Z16:
- rb->DataType = GL_UNSIGNED_SHORT;
- break;
-
- case MESA_FORMAT_Z32:
- case MESA_FORMAT_X8_Z24:
- case MESA_FORMAT_Z24_X8:
- rb->DataType = GL_UNSIGNED_INT;
- break;
-
- case MESA_FORMAT_Z24_S8:
- case MESA_FORMAT_S8_Z24:
- rb->DataType = GL_UNSIGNED_INT_24_8_EXT;
- break;
-
- case MESA_FORMAT_RGBA_FLOAT32:
- rb->DataType = GL_FLOAT;
- break;
-
- case MESA_FORMAT_INTENSITY_FLOAT32:
- rb->DataType = GL_FLOAT;
- break;
-
- case MESA_FORMAT_LUMINANCE_FLOAT32:
- rb->DataType = GL_FLOAT;
- break;
-
- case MESA_FORMAT_ALPHA_FLOAT32:
- rb->DataType = GL_FLOAT;
- break;
-
- case MESA_FORMAT_RG_FLOAT32:
- rb->DataType = GL_FLOAT;
- break;
-
- case MESA_FORMAT_R_FLOAT32:
- rb->DataType = GL_FLOAT;
- break;
-
- default:
- break;
- }
-}
-
/**
* This is a software fallback for the gl_renderbuffer->AllocStorage
* function.
return GL_FALSE;
}
- _swrast_set_renderbuffer_accessors(rb);
-
- ASSERT(rb->DataType);
-
/* free old buffer storage */
if (rb->Data) {
free(rb->Data);
/** Put colors at x/y locations into a renderbuffer */
static void
put_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
+ GLenum datatype,
GLuint count, const GLint x[], const GLint y[],
const void *values, const GLubyte *mask)
{
if (mask[i]) {
GLubyte *dst = _swrast_pixel_address(rb, x[i], y[i]);
- if (rb->DataType == GL_UNSIGNED_BYTE) {
+ if (datatype == GL_UNSIGNED_BYTE) {
_mesa_pack_ubyte_rgba_row(rb->Format, 1,
(const GLubyte (*)[4]) values + i, dst);
}
else {
- assert(rb->DataType == GL_FLOAT);
+ assert(datatype == GL_FLOAT);
_mesa_pack_float_rgba_row(rb->Format, count,
(const GLfloat (*)[4]) values + i, dst);
}
/** Put row of colors into renderbuffer */
void
_swrast_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb,
+ GLenum datatype,
GLuint count, GLint x, GLint y,
const void *values, const GLubyte *mask)
{
GLubyte *dst = _swrast_pixel_address(rb, x, y);
if (!mask) {
- if (rb->DataType == GL_UNSIGNED_BYTE) {
+ if (datatype == GL_UNSIGNED_BYTE) {
_mesa_pack_ubyte_rgba_row(rb->Format, count,
(const GLubyte (*)[4]) values, dst);
}
else {
- assert(rb->DataType == GL_FLOAT);
+ assert(datatype == GL_FLOAT);
_mesa_pack_float_rgba_row(rb->Format, count,
(const GLfloat (*)[4]) values, dst);
}
if (!mask[i] || i == count - 1) {
/* might be the end of a run of pixels */
if (runLen > 0) {
- if (rb->DataType == GL_UNSIGNED_BYTE) {
+ if (datatype == GL_UNSIGNED_BYTE) {
_mesa_pack_ubyte_rgba_row(rb->Format, runLen,
(const GLubyte (*)[4]) values + runStart,
dst + runStart * bpp);
}
else {
- assert(rb->DataType == GL_FLOAT);
+ assert(datatype == GL_FLOAT);
_mesa_pack_float_rgba_row(rb->Format, runLen,
(const GLfloat (*)[4]) values + runStart,
dst + runStart * bpp);
if (rb) {
GLchan rgbaSave[MAX_WIDTH][4];
- const GLuint fragOutput = multiFragOutputs ? buf : 0;
- /* set span->array->rgba to colors for render buffer's datatype */
- if (rb->DataType != span->array->ChanType || fragOutput > 0) {
- convert_color_type(span, rb->DataType, fragOutput);
+ if (span->array->ChanType == GL_UNSIGNED_BYTE) {
+ span->array->rgba = span->array->rgba8;
}
else {
- if (rb->DataType == GL_UNSIGNED_BYTE) {
- span->array->rgba = span->array->rgba8;
- }
- else if (rb->DataType == GL_UNSIGNED_SHORT) {
- span->array->rgba = (void *) span->array->rgba16;
- }
- else {
- span->array->rgba = (void *)
- span->array->attribs[FRAG_ATTRIB_COL0];
- }
+ span->array->rgba = (void *)
+ span->array->attribs[FRAG_ATTRIB_COL0];
}
if (!multiFragOutputs && numBuffers > 1) {
if (span->arrayMask & SPAN_XY) {
/* array of pixel coords */
- put_values(ctx, rb, span->end,
+ put_values(ctx, rb,
+ span->array->ChanType, span->end,
span->array->x, span->array->y,
span->array->rgba, span->array->mask);
}
else {
/* horizontal run of pixels */
- _swrast_put_row(ctx, rb, span->end, span->x, span->y,
+ _swrast_put_row(ctx, rb,
+ span->array->ChanType,
+ span->end, span->x, span->y,
span->array->rgba,
span->writeAll ? NULL: span->array->mask);
}
extern void
_swrast_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb,
+ GLenum datatype,
GLuint count, GLint x, GLint y,
const void *values, const GLubyte *mask);
/* XXX may need more special cases here */
switch (trb->TexImage->Base.TexFormat) {
case MESA_FORMAT_Z24_S8:
- trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
trb->Base._BaseFormat = GL_DEPTH_STENCIL;
break;
case MESA_FORMAT_S8_Z24:
- trb->Base.DataType = GL_UNSIGNED_INT_8_24_REV_MESA;
trb->Base._BaseFormat = GL_DEPTH_STENCIL;
break;
case MESA_FORMAT_Z24_X8:
- trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
break;
case MESA_FORMAT_X8_Z24:
- trb->Base.DataType = GL_UNSIGNED_INT_8_24_REV_MESA;
trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
break;
case MESA_FORMAT_Z16:
- trb->Base.DataType = GL_UNSIGNED_SHORT;
trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
break;
case MESA_FORMAT_Z32:
- trb->Base.DataType = GL_UNSIGNED_INT;
trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
break;
/* SRGB formats pre EXT_framebuffer_sRGB don't do sRGB translations on FBO readback */
case MESA_FORMAT_SRGB8:
trb->Fetch = _mesa_get_texel_fetch_func(MESA_FORMAT_RGB888, _mesa_get_texture_dimensions(att->Texture->Target));
- trb->Base.DataType = CHAN_TYPE;
trb->Base._BaseFormat = GL_RGBA;
break;
case MESA_FORMAT_SRGBA8:
trb->Fetch = _mesa_get_texel_fetch_func(MESA_FORMAT_RGBA8888, _mesa_get_texture_dimensions(att->Texture->Target));
- trb->Base.DataType = CHAN_TYPE;
trb->Base._BaseFormat = GL_RGBA;
break;
case MESA_FORMAT_SARGB8:
trb->Fetch = _mesa_get_texel_fetch_func(MESA_FORMAT_ARGB8888, _mesa_get_texture_dimensions(att->Texture->Target));
- trb->Base.DataType = CHAN_TYPE;
trb->Base._BaseFormat = GL_RGBA;
break;
default:
- trb->Base.DataType = CHAN_TYPE;
trb->Base._BaseFormat = GL_RGBA;
}
}
span.intTex[0] += span.intTexStep[0]; \
span.intTex[1] += span.intTexStep[1]; \
} \
- _swrast_put_row(ctx, rb, span.end, span.x, span.y, rgba, NULL);
+ _swrast_put_row(ctx, rb, GL_UNSIGNED_BYTE, span.end, \
+ span.x, span.y, rgba, NULL);
#include "s_tritemp.h"
span.intTex[1] += span.intTexStep[1]; \
span.z += span.zStep; \
} \
- _swrast_put_row(ctx, rb, span.end, span.x, span.y, rgba, span.array->mask);
+ _swrast_put_row(ctx, rb, GL_UNSIGNED_BYTE, \
+ span.end, span.x, span.y, rgba, span.array->mask);
#include "s_tritemp.h"