diff options
author | Brian Paul <[email protected]> | 2012-01-16 11:48:18 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-01-27 18:02:39 -0800 |
commit | f5367c45031cac167f3ef8ee273880318156e787 (patch) | |
tree | f2cca25eb4df8eeecd2628909e1227aa4fc213bc /src/mesa/swrast | |
parent | d60bcbe31da5869f018ca73f43f93cc391e79f9a (diff) |
mesa: remove gl_renderbuffer:RowStride field
(cherry picked from commit 1e1b5cb01a10e39d01923e3c7e989c44210950cd)
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_drawpix.c | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_renderbuffer.c | 5 | ||||
-rw-r--r-- | src/mesa/swrast/s_texrender.c | 1 | ||||
-rw-r--r-- | src/mesa/swrast/s_texture.c | 1 |
4 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 5828a789ab9..5050ad92c23 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -522,7 +522,7 @@ fast_draw_depth_stencil(struct gl_context *ctx, GLint x, GLint y, srcRowStride = _mesa_image_row_stride(unpack, width, format, type); dst = _swrast_pixel_address(rb, x, y); - dstRowStride = rb->RowStride * 4; + dstRowStride = rb->RowStrideBytes; for (i = 0; i < height; i++) { _mesa_pack_uint_24_8_depth_stencil_row(rb->Format, width, diff --git a/src/mesa/swrast/s_renderbuffer.c b/src/mesa/swrast/s_renderbuffer.c index 267ec3b1501..2ef3e030cc2 100644 --- a/src/mesa/swrast/s_renderbuffer.c +++ b/src/mesa/swrast/s_renderbuffer.c @@ -214,7 +214,7 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, rb->Data = NULL; } - rb->RowStride = width; + rb->RowStrideBytes = width * _mesa_get_format_bytes(rb->Format); if (width > 0 && height > 0) { /* allocate new buffer storage */ @@ -223,7 +223,6 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, if (rb->Data == NULL) { rb->Width = 0; rb->Height = 0; - rb->RowStride = 0; _mesa_error(ctx, GL_OUT_OF_MEMORY, "software renderbuffer allocation (%d x %d x %d)", width, height, _mesa_get_format_bytes(rb->Format)); @@ -263,7 +262,7 @@ _swrast_map_soft_renderbuffer(struct gl_context *ctx, { GLubyte *map = rb->Data; int cpp = _mesa_get_format_bytes(rb->Format); - int stride = rb->RowStride * cpp; + int stride = rb->Width * cpp; ASSERT(rb->Data); diff --git a/src/mesa/swrast/s_texrender.c b/src/mesa/swrast/s_texrender.c index 1adf281fbd5..4a944310376 100644 --- a/src/mesa/swrast/s_texrender.c +++ b/src/mesa/swrast/s_texrender.c @@ -127,7 +127,6 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att) trb->Base.Width = trb->TexImage->Base.Width; trb->Base.Height = trb->TexImage->Base.Height; - trb->Base.RowStride = trb->TexImage->RowStride; trb->Base.InternalFormat = trb->TexImage->Base.InternalFormat; trb->Base.Format = trb->TexImage->Base.TexFormat; diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index fe44663878a..7c45126ba3c 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -374,7 +374,6 @@ unmap_attachment(struct gl_context *ctx, } rb->Map = NULL; - rb->RowStrideBytes = 0; } |