mesa: add swrast_texture_image::Buffer
In the past, swrast_texture_image::Data has been overloaded. It could either point to malloc'd memory storing texture data, or it could point to a current mapping of GPU memory. Now, Buffer always points to malloc'd memory (if we're not using GPU memory) and Data always points to mapped memory. The next step would be to rename Data -> Map. This change also involves adding swrast functions for mapping textures and renderbuffers prior to rendering to setup the Data pointer. Plus, corresponding functions to unmap texures and renderbuffers. This is very much like similar code in the dri drivers.
This commit is contained in:
@@ -134,9 +134,9 @@ intel_free_texture_image_buffer(struct gl_context * ctx,
|
|||||||
|
|
||||||
intel_miptree_release(&intelImage->mt);
|
intel_miptree_release(&intelImage->mt);
|
||||||
|
|
||||||
if (intelImage->base.Data) {
|
if (intelImage->base.Buffer) {
|
||||||
_mesa_align_free(intelImage->base.Data);
|
_mesa_align_free(intelImage->base.Buffer);
|
||||||
intelImage->base.Data = NULL;
|
intelImage->base.Buffer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intelImage->base.ImageOffsets) {
|
if (intelImage->base.ImageOffsets) {
|
||||||
@@ -214,11 +214,11 @@ intel_map_texture_image(struct gl_context *ctx,
|
|||||||
assert(map);
|
assert(map);
|
||||||
|
|
||||||
*stride = _mesa_format_row_stride(tex_image->TexFormat, width);
|
*stride = _mesa_format_row_stride(tex_image->TexFormat, width);
|
||||||
*map = intel_image->base.Data + (slice * height + y) * *stride + x * texelSize;
|
*map = intel_image->base.Buffer + (slice * height + y) * *stride + x * texelSize;
|
||||||
|
|
||||||
DBG("%s: %d,%d %dx%d from data %p = %p/%d\n", __FUNCTION__,
|
DBG("%s: %d,%d %dx%d from data %p = %p/%d\n", __FUNCTION__,
|
||||||
x, y, w, h,
|
x, y, w, h,
|
||||||
intel_image->base.Data, *map, *stride);
|
intel_image->base.Buffer, *map, *stride);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -104,7 +104,7 @@ void radeonFreeTextureImageBuffer(struct gl_context *ctx, struct gl_texture_imag
|
|||||||
|
|
||||||
if (image->mt) {
|
if (image->mt) {
|
||||||
radeon_miptree_unreference(&image->mt);
|
radeon_miptree_unreference(&image->mt);
|
||||||
assert(!image->base.Data);
|
assert(!image->base.Buffer);
|
||||||
} else {
|
} else {
|
||||||
_swrast_free_texture_image_buffer(ctx, timage);
|
_swrast_free_texture_image_buffer(ctx, timage);
|
||||||
}
|
}
|
||||||
@@ -112,9 +112,9 @@ void radeonFreeTextureImageBuffer(struct gl_context *ctx, struct gl_texture_imag
|
|||||||
radeon_bo_unref(image->bo);
|
radeon_bo_unref(image->bo);
|
||||||
image->bo = NULL;
|
image->bo = NULL;
|
||||||
}
|
}
|
||||||
if (image->base.Data) {
|
if (image->base.Buffer) {
|
||||||
_mesa_align_free(image->base.Data);
|
_mesa_align_free(image->base.Buffer);
|
||||||
image->base.Data = NULL;
|
image->base.Buffer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (image->base.ImageOffsets) {
|
if (image->base.ImageOffsets) {
|
||||||
@@ -314,7 +314,7 @@ radeon_map_texture_image(struct gl_context *ctx,
|
|||||||
assert(map);
|
assert(map);
|
||||||
|
|
||||||
*stride = _mesa_format_row_stride(texImage->TexFormat, width);
|
*stride = _mesa_format_row_stride(texImage->TexFormat, width);
|
||||||
*map = image->base.Data + (slice * height) * *stride;
|
*map = image->base.Buffer + (slice * height) * *stride;
|
||||||
}
|
}
|
||||||
|
|
||||||
*map += y * *stride + x * texel_size;
|
*map += y * *stride + x * texel_size;
|
||||||
@@ -828,12 +828,12 @@ static void radeon_teximage(
|
|||||||
texImage->Width,
|
texImage->Width,
|
||||||
texImage->Height,
|
texImage->Height,
|
||||||
texImage->Depth);
|
texImage->Depth);
|
||||||
image->base.Data = _mesa_align_malloc(size, 512);
|
image->base.Buffer = _mesa_align_malloc(size, 512);
|
||||||
|
|
||||||
radeon_print(RADEON_TEXTURE, RADEON_VERBOSE,
|
radeon_print(RADEON_TEXTURE, RADEON_VERBOSE,
|
||||||
"%s %dd: texObj %p, texImage %p, "
|
"%s %dd: texObj %p, texImage %p, "
|
||||||
" no miptree assigned, using local memory %p\n",
|
" no miptree assigned, using local memory %p\n",
|
||||||
__func__, dims, texObj, texImage, image->base.Data);
|
__func__, dims, texObj, texImage, image->base.Buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -747,6 +747,12 @@ _swrast_CreateContext( struct gl_context *ctx )
|
|||||||
swrast->AllowVertexFog = GL_TRUE;
|
swrast->AllowVertexFog = GL_TRUE;
|
||||||
swrast->AllowPixelFog = GL_TRUE;
|
swrast->AllowPixelFog = GL_TRUE;
|
||||||
|
|
||||||
|
swrast->Driver.SpanRenderStart = _swrast_span_render_start;
|
||||||
|
swrast->Driver.SpanRenderFinish = _swrast_span_render_finish;
|
||||||
|
|
||||||
|
ctx->Driver.MapTexture = _swrast_map_texture;
|
||||||
|
ctx->Driver.UnmapTexture = _swrast_unmap_texture;
|
||||||
|
|
||||||
/* Optimized Accum buffer */
|
/* Optimized Accum buffer */
|
||||||
swrast->_IntegerAccumMode = GL_FALSE;
|
swrast->_IntegerAccumMode = GL_FALSE;
|
||||||
swrast->_IntegerAccumScaler = 0.0;
|
swrast->_IntegerAccumScaler = 0.0;
|
||||||
@@ -837,6 +843,24 @@ _swrast_render_primitive( struct gl_context *ctx, GLenum prim )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** called via swrast->Driver.SpanRenderStart() */
|
||||||
|
void
|
||||||
|
_swrast_span_render_start(struct gl_context *ctx)
|
||||||
|
{
|
||||||
|
_swrast_map_textures(ctx);
|
||||||
|
_swrast_map_renderbuffers(ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** called via swrast->Driver.SpanRenderFinish() */
|
||||||
|
void
|
||||||
|
_swrast_span_render_finish(struct gl_context *ctx)
|
||||||
|
{
|
||||||
|
_swrast_unmap_textures(ctx);
|
||||||
|
_swrast_unmap_renderbuffers(ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_swrast_render_start( struct gl_context *ctx )
|
_swrast_render_start( struct gl_context *ctx )
|
||||||
{
|
{
|
||||||
|
@@ -144,6 +144,9 @@ struct swrast_texture_image
|
|||||||
each 2D slice in 'Data', in texels */
|
each 2D slice in 'Data', in texels */
|
||||||
GLubyte *Data; /**< Image data, accessed via FetchTexel() */
|
GLubyte *Data; /**< Image data, accessed via FetchTexel() */
|
||||||
|
|
||||||
|
/** Malloc'd texure memory */
|
||||||
|
GLubyte *Buffer;
|
||||||
|
|
||||||
FetchTexelFunc FetchTexel;
|
FetchTexelFunc FetchTexel;
|
||||||
StoreTexelFunc Store;
|
StoreTexelFunc Store;
|
||||||
};
|
};
|
||||||
@@ -333,6 +336,31 @@ swrast_render_finish(struct gl_context *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_swrast_span_render_start(struct gl_context *ctx);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_swrast_span_render_finish(struct gl_context *ctx);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_swrast_map_textures(struct gl_context *ctx);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_swrast_unmap_textures(struct gl_context *ctx);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_swrast_map_texture(struct gl_context *ctx, struct gl_texture_object *texObj);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_swrast_unmap_texture(struct gl_context *ctx, struct gl_texture_object *texObj);
|
||||||
|
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_swrast_map_renderbuffers(struct gl_context *ctx);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_swrast_unmap_renderbuffers(struct gl_context *ctx);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Size of an RGBA pixel, in bytes, for given datatype.
|
* Size of an RGBA pixel, in bytes, for given datatype.
|
||||||
|
@@ -31,6 +31,15 @@ struct texture_renderbuffer
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/** cast wrapper */
|
||||||
|
static inline struct texture_renderbuffer *
|
||||||
|
texture_renderbuffer(struct gl_renderbuffer *rb)
|
||||||
|
{
|
||||||
|
return (struct texture_renderbuffer *) rb;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get row of values from the renderbuffer that wraps a texture image.
|
* Get row of values from the renderbuffer that wraps a texture image.
|
||||||
*/
|
*/
|
||||||
@@ -38,8 +47,7 @@ static void
|
|||||||
texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
|
texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
|
||||||
GLint x, GLint y, void *values)
|
GLint x, GLint y, void *values)
|
||||||
{
|
{
|
||||||
const struct texture_renderbuffer *trb
|
struct texture_renderbuffer *trb = texture_renderbuffer(rb);
|
||||||
= (const struct texture_renderbuffer *) rb;
|
|
||||||
const GLint z = trb->Zoffset;
|
const GLint z = trb->Zoffset;
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
@@ -107,8 +115,7 @@ static void
|
|||||||
texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
|
texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
|
||||||
const GLint x[], const GLint y[], void *values)
|
const GLint x[], const GLint y[], void *values)
|
||||||
{
|
{
|
||||||
const struct texture_renderbuffer *trb
|
struct texture_renderbuffer *trb = texture_renderbuffer(rb);
|
||||||
= (const struct texture_renderbuffer *) rb;
|
|
||||||
const GLint z = trb->Zoffset;
|
const GLint z = trb->Zoffset;
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
@@ -174,8 +181,7 @@ static void
|
|||||||
texture_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
|
texture_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
|
||||||
GLint x, GLint y, const void *values, const GLubyte *mask)
|
GLint x, GLint y, const void *values, const GLubyte *mask)
|
||||||
{
|
{
|
||||||
const struct texture_renderbuffer *trb
|
struct texture_renderbuffer *trb = texture_renderbuffer(rb);
|
||||||
= (const struct texture_renderbuffer *) rb;
|
|
||||||
const GLint z = trb->Zoffset;
|
const GLint z = trb->Zoffset;
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
@@ -236,8 +242,7 @@ static void
|
|||||||
texture_put_row_rgb(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
|
texture_put_row_rgb(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
|
||||||
GLint x, GLint y, const void *values, const GLubyte *mask)
|
GLint x, GLint y, const void *values, const GLubyte *mask)
|
||||||
{
|
{
|
||||||
const struct texture_renderbuffer *trb
|
struct texture_renderbuffer *trb = texture_renderbuffer(rb);
|
||||||
= (const struct texture_renderbuffer *) rb;
|
|
||||||
const GLint z = trb->Zoffset;
|
const GLint z = trb->Zoffset;
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
@@ -296,8 +301,7 @@ static void
|
|||||||
texture_put_mono_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
|
texture_put_mono_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
|
||||||
GLint x, GLint y, const void *value, const GLubyte *mask)
|
GLint x, GLint y, const void *value, const GLubyte *mask)
|
||||||
{
|
{
|
||||||
const struct texture_renderbuffer *trb
|
struct texture_renderbuffer *trb = texture_renderbuffer(rb);
|
||||||
= (const struct texture_renderbuffer *) rb;
|
|
||||||
const GLint z = trb->Zoffset;
|
const GLint z = trb->Zoffset;
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
@@ -356,8 +360,7 @@ texture_put_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint co
|
|||||||
const GLint x[], const GLint y[], const void *values,
|
const GLint x[], const GLint y[], const void *values,
|
||||||
const GLubyte *mask)
|
const GLubyte *mask)
|
||||||
{
|
{
|
||||||
const struct texture_renderbuffer *trb
|
struct texture_renderbuffer *trb = texture_renderbuffer(rb);
|
||||||
= (const struct texture_renderbuffer *) rb;
|
|
||||||
const GLint z = trb->Zoffset;
|
const GLint z = trb->Zoffset;
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
@@ -415,8 +418,7 @@ texture_put_mono_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
|
|||||||
GLuint count, const GLint x[], const GLint y[],
|
GLuint count, const GLint x[], const GLint y[],
|
||||||
const void *value, const GLubyte *mask)
|
const void *value, const GLubyte *mask)
|
||||||
{
|
{
|
||||||
const struct texture_renderbuffer *trb
|
struct texture_renderbuffer *trb = texture_renderbuffer(rb);
|
||||||
= (const struct texture_renderbuffer *) rb;
|
|
||||||
const GLint z = trb->Zoffset;
|
const GLint z = trb->Zoffset;
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
@@ -610,7 +612,6 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
|
|||||||
trb->Base.DataType = CHAN_TYPE;
|
trb->Base.DataType = CHAN_TYPE;
|
||||||
trb->Base._BaseFormat = GL_RGBA;
|
trb->Base._BaseFormat = GL_RGBA;
|
||||||
}
|
}
|
||||||
trb->Base.Data = trb->TexImage->Data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -76,9 +76,9 @@ _swrast_alloc_texture_image_buffer(struct gl_context *ctx,
|
|||||||
assert(texImage->Height == height);
|
assert(texImage->Height == height);
|
||||||
assert(texImage->Depth == depth);
|
assert(texImage->Depth == depth);
|
||||||
|
|
||||||
assert(!swImg->Data);
|
assert(!swImg->Buffer);
|
||||||
swImg->Data = _mesa_align_malloc(bytes, 512);
|
swImg->Buffer = _mesa_align_malloc(bytes, 512);
|
||||||
if (!swImg->Data)
|
if (!swImg->Buffer)
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
||||||
/* RowStride and ImageOffsets[] describe how to address texels in 'Data' */
|
/* RowStride and ImageOffsets[] describe how to address texels in 'Data' */
|
||||||
@@ -128,9 +128,9 @@ _swrast_free_texture_image_buffer(struct gl_context *ctx,
|
|||||||
struct gl_texture_image *texImage)
|
struct gl_texture_image *texImage)
|
||||||
{
|
{
|
||||||
struct swrast_texture_image *swImage = swrast_texture_image(texImage);
|
struct swrast_texture_image *swImage = swrast_texture_image(texImage);
|
||||||
if (swImage->Data) {
|
if (swImage->Buffer) {
|
||||||
_mesa_align_free(swImage->Data);
|
_mesa_align_free(swImage->Buffer);
|
||||||
swImage->Data = NULL;
|
swImage->Buffer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (swImage->ImageOffsets) {
|
if (swImage->ImageOffsets) {
|
||||||
@@ -189,9 +189,9 @@ _swrast_map_teximage(struct gl_context *ctx,
|
|||||||
stride = _mesa_format_row_stride(texImage->TexFormat, texImage->Width);
|
stride = _mesa_format_row_stride(texImage->TexFormat, texImage->Width);
|
||||||
_mesa_get_format_block_size(texImage->TexFormat, &bw, &bh);
|
_mesa_get_format_block_size(texImage->TexFormat, &bw, &bh);
|
||||||
|
|
||||||
assert(swImage->Data);
|
assert(swImage->Buffer);
|
||||||
|
|
||||||
map = swImage->Data;
|
map = swImage->Buffer;
|
||||||
|
|
||||||
if (texImage->TexObject->Target == GL_TEXTURE_3D ||
|
if (texImage->TexObject->Target == GL_TEXTURE_3D ||
|
||||||
texImage->TexObject->Target == GL_TEXTURE_2D_ARRAY) {
|
texImage->TexObject->Target == GL_TEXTURE_2D_ARRAY) {
|
||||||
@@ -224,3 +224,138 @@ _swrast_unmap_teximage(struct gl_context *ctx,
|
|||||||
{
|
{
|
||||||
/* nop */
|
/* nop */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_swrast_map_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
|
||||||
|
{
|
||||||
|
const GLuint faces = texObj->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
|
||||||
|
GLuint face, level;
|
||||||
|
|
||||||
|
for (face = 0; face < faces; face++) {
|
||||||
|
for (level = texObj->BaseLevel; level < MAX_TEXTURE_LEVELS; level++) {
|
||||||
|
struct gl_texture_image *texImage = texObj->Image[face][level];
|
||||||
|
if (texImage) {
|
||||||
|
struct swrast_texture_image *swImage =
|
||||||
|
swrast_texture_image(texImage);
|
||||||
|
|
||||||
|
/* XXX we'll eventually call _swrast_map_teximage() here */
|
||||||
|
swImage->Data = swImage->Buffer;
|
||||||
|
assert(swImage->Buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_swrast_unmap_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
|
||||||
|
{
|
||||||
|
const GLuint faces = texObj->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
|
||||||
|
GLuint face, level;
|
||||||
|
|
||||||
|
for (face = 0; face < faces; face++) {
|
||||||
|
for (level = texObj->BaseLevel; level < MAX_TEXTURE_LEVELS; level++) {
|
||||||
|
struct gl_texture_image *texImage = texObj->Image[face][level];
|
||||||
|
if (texImage) {
|
||||||
|
struct swrast_texture_image *swImage
|
||||||
|
= swrast_texture_image(texImage);
|
||||||
|
|
||||||
|
/* XXX we'll eventually call _swrast_unmap_teximage() here */
|
||||||
|
swImage->Data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map all textures for reading prior to software rendering.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
_swrast_map_textures(struct gl_context *ctx)
|
||||||
|
{
|
||||||
|
GLbitfield enabledUnits = ctx->Texture._EnabledUnits;
|
||||||
|
|
||||||
|
/* loop over enabled texture units */
|
||||||
|
while (enabledUnits) {
|
||||||
|
GLuint unit = ffs(enabledUnits) - 1;
|
||||||
|
struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current;
|
||||||
|
|
||||||
|
_swrast_map_texture(ctx, texObj);
|
||||||
|
|
||||||
|
enabledUnits &= ~(1 << unit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unmap all textures for reading prior to software rendering.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
_swrast_unmap_textures(struct gl_context *ctx)
|
||||||
|
{
|
||||||
|
GLbitfield enabledUnits = ctx->Texture._EnabledUnits;
|
||||||
|
|
||||||
|
/* loop over enabled texture units */
|
||||||
|
while (enabledUnits) {
|
||||||
|
GLuint unit = ffs(enabledUnits) - 1;
|
||||||
|
struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current;
|
||||||
|
|
||||||
|
_swrast_unmap_texture(ctx, texObj);
|
||||||
|
|
||||||
|
enabledUnits &= ~(1 << unit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map or unmap any textures that we may be rendering to as renderbuffers.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
map_unmap_renderbuffers(struct gl_context *ctx,
|
||||||
|
struct gl_framebuffer *fb,
|
||||||
|
GLboolean map)
|
||||||
|
{
|
||||||
|
GLuint i;
|
||||||
|
|
||||||
|
for (i = 0; i < Elements(fb->Attachment); i++) {
|
||||||
|
struct gl_texture_object *texObj = fb->Attachment[i].Texture;
|
||||||
|
if (texObj) {
|
||||||
|
const GLuint level = fb->Attachment[i].TextureLevel;
|
||||||
|
const GLuint face = fb->Attachment[i].CubeMapFace;
|
||||||
|
struct gl_texture_image *texImage = texObj->Image[face][level];
|
||||||
|
if (texImage) {
|
||||||
|
struct swrast_texture_image *swImage
|
||||||
|
= swrast_texture_image(texImage);
|
||||||
|
|
||||||
|
if (map) {
|
||||||
|
/* XXX we'll eventually call _swrast_map_teximage() here */
|
||||||
|
swImage->Data = swImage->Buffer;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* XXX we'll eventually call _swrast_unmap_teximage() here */
|
||||||
|
swImage->Data = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_swrast_map_renderbuffers(struct gl_context *ctx)
|
||||||
|
{
|
||||||
|
map_unmap_renderbuffers(ctx, ctx->DrawBuffer, GL_TRUE);
|
||||||
|
if (ctx->ReadBuffer != ctx->DrawBuffer)
|
||||||
|
map_unmap_renderbuffers(ctx, ctx->ReadBuffer, GL_TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_swrast_unmap_renderbuffers(struct gl_context *ctx)
|
||||||
|
{
|
||||||
|
map_unmap_renderbuffers(ctx, ctx->DrawBuffer, GL_FALSE);
|
||||||
|
if (ctx->ReadBuffer != ctx->DrawBuffer)
|
||||||
|
map_unmap_renderbuffers(ctx, ctx->ReadBuffer, GL_FALSE);
|
||||||
|
}
|
||||||
|
@@ -528,7 +528,6 @@ typedef struct
|
|||||||
GLuint nr_blocks;
|
GLuint nr_blocks;
|
||||||
|
|
||||||
GLuint CurInstance;
|
GLuint CurInstance;
|
||||||
|
|
||||||
} TNLcontext;
|
} TNLcontext;
|
||||||
|
|
||||||
|
|
||||||
|
@@ -68,6 +68,8 @@ struct vp_stage_data {
|
|||||||
GLubyte *clipmask; /**< clip flags */
|
GLubyte *clipmask; /**< clip flags */
|
||||||
GLubyte ormask, andmask; /**< for clipping */
|
GLubyte ormask, andmask; /**< for clipping */
|
||||||
|
|
||||||
|
GLboolean vertex_textures;
|
||||||
|
|
||||||
struct gl_program_machine machine;
|
struct gl_program_machine machine;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user