summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/depthstencil.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-04-15 11:37:23 -0700
committerEric Anholt <[email protected]>2011-04-18 11:19:53 -0700
commit155200c15431f8364114d9a37ec527af81c773a5 (patch)
treecf0a8a877ee4bc313efad7803f7895843a6d9eb6 /src/mesa/main/depthstencil.c
parent348ea34d0310cc862ad3c078d8703c6c1f0b602f (diff)
mesa: Add a gl_renderbuffer.RowStride field like textures have.
This will allow some drivers to reuse the core renderbuffer.c get/put row functions in place of using the spantmp.h macros. Note that unlike textures, we use a signed integer here to allow for handling FBO orientation. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/depthstencil.c')
-rw-r--r--src/mesa/main/depthstencil.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/depthstencil.c b/src/mesa/main/depthstencil.c
index c5466dc9fcc..ab62c97fe5a 100644
--- a/src/mesa/main/depthstencil.c
+++ b/src/mesa/main/depthstencil.c
@@ -91,6 +91,7 @@ alloc_wrapper_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
if (retVal) {
rb->Width = width;
rb->Height = height;
+ rb->RowStride = dsrb->RowStride;
}
return retVal;
}
@@ -371,6 +372,7 @@ _mesa_new_z24_renderbuffer_wrapper(struct gl_context *ctx,
z24rb->RefCount = 0;
z24rb->Width = dsrb->Width;
z24rb->Height = dsrb->Height;
+ z24rb->RowStride = dsrb->RowStride;
z24rb->InternalFormat = GL_DEPTH_COMPONENT24;
z24rb->Format = MESA_FORMAT_X8_Z24;
z24rb->_BaseFormat = GL_DEPTH_COMPONENT;
@@ -657,6 +659,7 @@ _mesa_new_s8_renderbuffer_wrapper(struct gl_context *ctx, struct gl_renderbuffer
s8rb->RefCount = 0;
s8rb->Width = dsrb->Width;
s8rb->Height = dsrb->Height;
+ s8rb->RowStride = dsrb->RowStride;
s8rb->InternalFormat = GL_STENCIL_INDEX8_EXT;
s8rb->Format = MESA_FORMAT_S8;
s8rb->_BaseFormat = GL_STENCIL_INDEX;