From 3cb30e55e48d86aa5f660e670e055d6b258ea54a Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Sat, 12 Sep 2009 16:34:55 +0200 Subject: r300g: There is no such thing as "texture stride" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Individual texture images have a stride, but textures as a whole do not. There are still pieces of code which are confused about this, but the core of the confusion is hopefully gone. Signed-off-by: Nicolai Hähnle --- src/gallium/drivers/r300/r300_context.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/r300/r300_context.h') diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index 6c5914baa35..52b1c9a6b26 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -184,8 +184,15 @@ struct r300_texture { /* Offsets into the buffer. */ unsigned offset[PIPE_MAX_TEXTURE_LEVELS]; - /* Stride (pitch?) of this texture in bytes */ - unsigned stride; + /** + * If non-zero, override the natural texture layout with + * a custom stride (in bytes). + * + * \note Mipmapping fails for textures with a non-natural layout! + * + * \sa r300_texture_get_stride + */ + unsigned stride_override; /* Total size of this texture, in bytes. */ unsigned size; -- cgit v1.2.3