GLint x, GLint y,
GLsizei width, GLsizei height)
{
- struct gl_texture_object *texObj = texImage->TexObject;
GLuint fbo;
bool success = false;
GLbitfield mask;
if (!ctx->Extensions.ARB_framebuffer_object)
return false;
- _mesa_unlock_texture(ctx, texObj);
-
_mesa_meta_begin(ctx, MESA_META_ALL & ~MESA_META_DRAW_BUFFERS);
_mesa_GenFramebuffers(1, &fbo);
success = mask == 0x0;
out:
- _mesa_lock_texture(ctx, texObj);
_mesa_DeleteFramebuffers(1, &fbo);
_mesa_meta_end(ctx);
return success;
GLint x, GLint y,
GLsizei width, GLsizei height)
{
- struct gl_texture_object *texObj = texImage->TexObject;
GLenum format, type;
GLint bpp;
void *buf;
return;
}
- _mesa_unlock_texture(ctx, texObj); /* need to unlock first */
-
/*
* Read image from framebuffer (disable pixel transfer ops)
*/
_mesa_meta_end(ctx);
- _mesa_lock_texture(ctx, texObj); /* re-lock */
-
free(buf);
}
struct gl_texture_image *texImage)
{
if (_mesa_is_format_compressed(texImage->TexFormat)) {
- struct gl_texture_object *texObj = texImage->TexObject;
GLuint slice;
bool result;
- /* Need to unlock the texture here to prevent deadlock... */
- _mesa_unlock_texture(ctx, texObj);
for (slice = 0; slice < texImage->Depth; slice++) {
void *dst;
if (texImage->TexObject->Target == GL_TEXTURE_2D_ARRAY
if (!result)
break;
}
- /* ... and relock it */
- _mesa_lock_texture(ctx, texObj);
if (result)
return;
{
bool res;
- _mesa_unlock_texture(ctx, texImage->TexObject);
-
res = cleartexsubimage_using_fbo(ctx, texImage,
xoffset, yoffset, zoffset,
width, height, depth,
clearValue);
- _mesa_lock_texture(ctx, texImage->TexObject);
-
if (res)
return;
int dst_slice = slice + dst_image->TexObject->MinLayer + dst_image->Face;
int dst_level = dst_image->Level + dst_image->TexObject->MinLevel;
- _mesa_unlock_texture(ctx, dst_image->TexObject);
-
brw_blorp_blit_miptrees(brw,
src_mt, src_irb->mt_level, src_irb->mt_layer,
dst_mt, dst_level, dst_slice,
dstX0, dstY0, dstX1, dstY1,
GL_NEAREST, false, mirror_y);
- _mesa_lock_texture(ctx, dst_image->TexObject);
-
/* If we're copying to a packed depth stencil texture and the source
* framebuffer has separate stencil, we need to also copy the stencil data
* over.