summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_texrender.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-04-19 11:44:53 -0700
committerEric Anholt <[email protected]>2013-04-30 10:40:43 -0700
commit0c883e46d871797cd1141498850d51cde6e54b76 (patch)
tree54019d9f77240229e7da69de95be45eb47de4984 /src/mesa/swrast/s_texrender.c
parente7ecc11311d142a8ac919627011372a265224bcd (diff)
swrast: Replace ImageOffsets with an ImageSlices pointer.
This is a step toward allowing drivers to use their normal mapping paths, instead of requiring that all slice mappings come from an aligned offset from the first slice's map. This incidentally fixes missing slice handling in FXT1 swrast. v2: Use slice height helper function. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_texrender.c')
-rw-r--r--src/mesa/swrast/s_texrender.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/mesa/swrast/s_texrender.c b/src/mesa/swrast/s_texrender.c
index 7b25a7b7d81..92d4edcd835 100644
--- a/src/mesa/swrast/s_texrender.c
+++ b/src/mesa/swrast/s_texrender.c
@@ -88,18 +88,8 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
/* Want to store linear values, not sRGB */
rb->Format = _mesa_get_srgb_format_linear(format);
-
- /* Set the gl_renderbuffer::Buffer field so that mapping the buffer
- * succeeds.
- */
- if (att->Texture->Target == GL_TEXTURE_3D ||
- att->Texture->Target == GL_TEXTURE_2D_ARRAY_EXT) {
- srb->Buffer = swImage->Buffer +
- swImage->ImageOffsets[zOffset] * _mesa_get_format_bytes(format);
- }
- else {
- srb->Buffer = swImage->Buffer;
- }
+
+ srb->Buffer = swImage->ImageSlices[zOffset];
}