mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
swrast: When asked to map a slice of a 1D array, give back that slice.
Until now, we've been treating 1D arrays as a single slice, and each array slice is actually just a row of the 2D texture. While swrast still stores them this way, hardware drivers think that 1D arrays have actual separate slices not stored as contiguous rows. Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
b07c78bfe9
commit
5324f9c48d
1 changed files with 7 additions and 0 deletions
|
|
@ -177,6 +177,13 @@ _swrast_map_teximage(struct gl_context *ctx,
|
|||
1);
|
||||
assert(slice < texImage->Depth);
|
||||
map += slice * sliceSize;
|
||||
} else if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
|
||||
GLuint sliceSize = _mesa_format_image_size(texImage->TexFormat,
|
||||
texImage->Width,
|
||||
1,
|
||||
1);
|
||||
assert(slice < texImage->Height);
|
||||
map += slice * sliceSize;
|
||||
}
|
||||
|
||||
/* apply x/y offset to map address */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue