summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_context.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-04-19 13:10:55 -0700
committerEric Anholt <[email protected]>2013-04-30 10:40:44 -0700
commitadf958d9c2b4cbfbeef36c253b8889967d83c272 (patch)
tree0c8625f21f09461eb807f1afb59987d1a2675422 /src/mesa/swrast/s_context.h
parentea05e259c9490657a5062480a06ff1cd1b924043 (diff)
swrast: Always use MapTextureImage for mapping textures for swrast.
Now that everything goes through ImageSlices[], we can rely on the driver's existing texture mapping function. A big block of code goes away on Radeon that looks like it was to deal with the validate that happened at SpanRenderStart, which no longer occurs since we don't need validation for the MapTextureImage hook. v2: Rewrite comment about ImageSlices, fix duplicated swImages, touch up unmap loop. Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r--src/mesa/swrast/s_context.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 38015483597..2525e8e2d38 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -148,8 +148,14 @@ struct swrast_texture_image
* between all slices.
*/
GLint RowStride;
- void **ImageSlices; /**< if 3D texture: array [Depth] of offsets to
- each 2D slice in 'Data', in texels */
+ /**
+ * When a texture image is mapped for swrast, this array contains pointers
+ * to the beginning of each slice.
+ *
+ * For swrast-allocated textures, these pointers will always stay
+ * initialized to point within Buffer.
+ */
+ void **ImageSlices;
GLubyte *Map; /**< Pointer to mapped image memory */
/** Malloc'd texture memory */