0, 0, false,
image->Width, image->Height, GL_COPY)) {
DBG("%s: blit failed\n", __FUNCTION__);
+ intel_miptree_release(&pbo_mt);
return false;
}
GLenum format, GLenum type, const void *pixels,
const struct gl_pixelstore_attrib *unpack)
{
- bool ok;
-
DBG("%s target %s level %d %dx%dx%d\n", __FUNCTION__,
_mesa_lookup_enum_by_nr(texImage->TexObject->Target),
texImage->Level, texImage->Width, texImage->Height, texImage->Depth);
- ok = intel_texsubimage_tiled_memcpy(ctx, dims, texImage,
- 0, 0, 0, /*x,y,z offsets*/
- texImage->Width,
- texImage->Height,
- texImage->Depth,
- format, type, pixels, unpack,
- true /*for_glTexImage*/);
- if (ok)
- return;
-
/* Attempt to use the blitter for PBO image uploads.
*/
if (dims <= 2 &&
struct intel_region *region,
GLenum target,
GLenum internalFormat,
- gl_format format,
+ mesa_format format,
uint32_t offset,
GLuint width,
GLuint height,
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
int level = 0, internalFormat = 0;
- gl_format texFormat = MESA_FORMAT_NONE;
+ mesa_format texFormat = MESA_FORMAT_NONE;
texObj = _mesa_get_current_tex_object(ctx, target);
intelObj = intel_texture_object(texObj);
if (rb->mt->cpp == 4) {
if (texture_format == __DRI_TEXTURE_FORMAT_RGB) {
internalFormat = GL_RGB;
- texFormat = MESA_FORMAT_XRGB8888;
+ texFormat = MESA_FORMAT_B8G8R8X8_UNORM;
}
else {
internalFormat = GL_RGBA;
- texFormat = MESA_FORMAT_ARGB8888;
+ texFormat = MESA_FORMAT_B8G8R8A8_UNORM;
}
} else if (rb->mt->cpp == 2) {
internalFormat = GL_RGB;
- texFormat = MESA_FORMAT_RGB565;
+ texFormat = MESA_FORMAT_B5G6R5_UNORM;
}
_mesa_lock_texture(&intel->ctx, texObj);