/* Image is stored in hardware format in a buffer managed by the
* kernel. Need to explicitly map and unmap it.
*/
+ unsigned face = _mesa_tex_target_to_face(target);
- st_teximage_flush_before_map(ctx->st, stImage->pt, 0, level,
+ st_teximage_flush_before_map(ctx->st, stImage->pt, face, level,
PIPE_TRANSFER_READ);
texImage->Data = st_texture_image_map(ctx->st, stImage, 0,
* from uploading the buffer under us.
*/
if (stImage->pt) {
+ unsigned face = _mesa_tex_target_to_face(target);
+
if (format == GL_DEPTH_COMPONENT &&
pf_is_depth_and_stencil(stImage->pt->format))
transfer_usage = PIPE_TRANSFER_READ_WRITE;
else
transfer_usage = PIPE_TRANSFER_WRITE;
- st_teximage_flush_before_map(ctx->st, stImage->pt, 0, level,
+ st_teximage_flush_before_map(ctx->st, stImage->pt, face, level,
transfer_usage);
texImage->Data = st_texture_image_map(ctx->st, stImage, zoffset,
transfer_usage,
int y;
if (stImage->pt) {
- st_teximage_flush_before_map(ctx->st, stImage->pt, 0, level,
+ unsigned face = _mesa_tex_target_to_face(target);
+
+ st_teximage_flush_before_map(ctx->st, stImage->pt, face, level,
PIPE_TRANSFER_WRITE);
texImage->Data = st_texture_image_map(ctx->st, stImage, 0,
PIPE_TRANSFER_WRITE,