softpipe: Refactor pipe_get/put_tile_rgba_* paths.

We always want the same behavior of choosing which unpack to do to
generate our 4x32-bit RGBA values, so just sink that choice down below
the pipe_get/put_tile API.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2744>
This commit is contained in:
Eric Anholt
2019-11-08 13:39:09 -08:00
committed by Marge Bot
parent 8bc56551da
commit b2a2cf492d
7 changed files with 151 additions and 412 deletions
@@ -220,6 +220,7 @@ debug_dump_transfer_bmp(UNUSED struct pipe_context *pipe,
pipe_get_tile_rgba(transfer, ptr, 0, 0,
transfer->box.width, transfer->box.height,
transfer->resource->format,
rgba);
debug_dump_float_rgba_bmp(filename,
+1 -1
View File
@@ -229,7 +229,7 @@ util_probe_rect_rgba_multi(struct pipe_context *ctx, struct pipe_resource *tex,
map = pipe_transfer_map(ctx, tex, 0, 0, PIPE_TRANSFER_READ,
offx, offy, w, h, &transfer);
pipe_get_tile_rgba(transfer, map, 0, 0, w, h, pixels);
pipe_get_tile_rgba(transfer, map, 0, 0, w, h, tex->format, pixels);
pipe_transfer_unmap(ctx, transfer);
for (e = 0; e < num_expected_colors; e++) {
+111 -254
View File
@@ -354,93 +354,78 @@ x32_s8_get_tile_rgba(const unsigned *src,
}
}
static void
pipe_tile_raw_to_rgba(enum pipe_format format,
const void *src,
uint w, uint h,
float *dst, unsigned dst_stride)
void
pipe_put_tile_rgba(struct pipe_transfer *pt,
void *dst,
uint x, uint y, uint w, uint h,
enum pipe_format format, const void *p)
{
switch (format) {
case PIPE_FORMAT_Z16_UNORM:
z16_get_tile_rgba((ushort *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_Z32_UNORM:
z32_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
s8z24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_S8_UINT:
s8_get_tile_rgba((unsigned char *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_X24S8_UINT:
s8x24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
z24s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_S8X24_UINT:
x24s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_Z32_FLOAT:
z32f_get_tile_rgba((float *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
z32f_x24s8_get_tile_rgba((float *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_X32_S8X24_UINT:
x32_s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
default:
util_format_read_4f(format,
dst, dst_stride * sizeof(float),
src, util_format_get_stride(format, w),
0, 0, w, h);
unsigned src_stride = w * 4;
void *packed;
if (u_clip_tile(x, y, &w, &h, &pt->box))
return;
packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
if (!packed)
return;
/* softpipe's S8_UINT texture cache fetch needs to take the rgba_format
* path, not ui (since there's no ui unpack for s8, but it's technically
* pure integer).
*/
if (util_format_is_pure_uint(format)) {
util_format_write_4ui(format,
p, src_stride * sizeof(float),
packed, util_format_get_stride(format, w),
0, 0, w, h);
} else if (util_format_is_pure_sint(format)) {
util_format_write_4i(format,
p, src_stride * sizeof(float),
packed, util_format_get_stride(format, w),
0, 0, w, h);
} else {
switch (format) {
case PIPE_FORMAT_Z16_UNORM:
/*z16_put_tile_rgba((ushort *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_Z32_UNORM:
/*z32_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
/*s8z24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
/*z24s8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_Z32_FLOAT:
/*z32f_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
/*z32f_s8x24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
default:
util_format_write_4f(format,
p, src_stride * sizeof(float),
packed, util_format_get_stride(format, w),
0, 0, w, h);
}
}
}
static void
pipe_tile_raw_to_unsigned(enum pipe_format format,
const void *src,
uint w, uint h,
unsigned *dst, unsigned dst_stride)
{
util_format_read_4ui(format,
dst, dst_stride * sizeof(float),
src, util_format_get_stride(format, w),
0, 0, w, h);
}
static void
pipe_tile_raw_to_signed(enum pipe_format format,
void *src,
uint w, uint h,
int *dst, unsigned dst_stride)
{
util_format_read_4i(format,
dst, dst_stride * sizeof(float),
src, util_format_get_stride(format, w),
0, 0, w, h);
pipe_put_tile_raw(pt, dst, x, y, w, h, packed, 0);
FREE(packed);
}
void
pipe_get_tile_rgba(struct pipe_transfer *pt,
const void *src,
uint x, uint y, uint w, uint h,
float *p)
{
pipe_get_tile_rgba_format(pt, src, x, y, w, h, pt->resource->format, p);
}
void
pipe_get_tile_rgba_format(struct pipe_transfer *pt,
const void *src,
uint x, uint y, uint w, uint h,
enum pipe_format format,
float *p)
enum pipe_format format,
void *dst)
{
unsigned dst_stride = w * 4;
void *packed;
@@ -460,186 +445,58 @@ pipe_get_tile_rgba_format(struct pipe_transfer *pt,
pipe_get_tile_raw(pt, src, x, y, w, h, packed, 0);
pipe_tile_raw_to_rgba(format, packed, w, h, p, dst_stride);
FREE(packed);
}
void
pipe_put_tile_rgba(struct pipe_transfer *pt,
void *dst,
uint x, uint y, uint w, uint h,
const float *p)
{
pipe_put_tile_rgba_format(pt, dst, x, y, w, h, pt->resource->format, p);
}
void
pipe_put_tile_rgba_format(struct pipe_transfer *pt,
void *dst,
uint x, uint y, uint w, uint h,
enum pipe_format format,
const float *p)
{
unsigned src_stride = w * 4;
void *packed;
if (u_clip_tile(x, y, &w, &h, &pt->box))
return;
packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
if (!packed)
return;
switch (format) {
case PIPE_FORMAT_Z16_UNORM:
/*z16_put_tile_rgba((ushort *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_Z32_UNORM:
/*z32_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
/*s8z24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
/*z24s8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_Z32_FLOAT:
/*z32f_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
/*z32f_s8x24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
default:
util_format_write_4f(format,
p, src_stride * sizeof(float),
if (util_format_is_pure_uint(format) &&
!util_format_is_depth_or_stencil(format)) {
util_format_read_4ui(format,
dst, dst_stride * sizeof(float),
packed, util_format_get_stride(format, w),
0, 0, w, h);
} else if (util_format_is_pure_sint(format)) {
util_format_read_4i(format,
dst, dst_stride * sizeof(float),
packed, util_format_get_stride(format, w),
0, 0, w, h);
} else {
switch (format) {
case PIPE_FORMAT_Z16_UNORM:
z16_get_tile_rgba((ushort *) packed, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_Z32_UNORM:
z32_get_tile_rgba((unsigned *) packed, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
s8z24_get_tile_rgba((unsigned *) packed, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_S8_UINT:
s8_get_tile_rgba((unsigned char *) packed, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_X24S8_UINT:
s8x24_get_tile_rgba((unsigned *) packed, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
z24s8_get_tile_rgba((unsigned *) packed, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_S8X24_UINT:
x24s8_get_tile_rgba((unsigned *) packed, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_Z32_FLOAT:
z32f_get_tile_rgba((float *) packed, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
z32f_x24s8_get_tile_rgba((float *) packed, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_X32_S8X24_UINT:
x32_s8_get_tile_rgba((unsigned *) packed, w, h, dst, dst_stride);
break;
default:
util_format_read_4f(format,
dst, dst_stride * sizeof(float),
packed, util_format_get_stride(format, w),
0, 0, w, h);
}
}
pipe_put_tile_raw(pt, dst, x, y, w, h, packed, 0);
FREE(packed);
}
void
pipe_put_tile_i_format(struct pipe_transfer *pt,
void *dst,
uint x, uint y, uint w, uint h,
enum pipe_format format,
const int *p)
{
unsigned src_stride = w * 4;
void *packed;
if (u_clip_tile(x, y, &w, &h, &pt->box))
return;
packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
if (!packed)
return;
util_format_write_4i(format,
p, src_stride * sizeof(float),
packed, util_format_get_stride(format, w),
0, 0, w, h);
pipe_put_tile_raw(pt, dst, x, y, w, h, packed, 0);
FREE(packed);
}
void
pipe_put_tile_ui_format(struct pipe_transfer *pt,
void *dst,
uint x, uint y, uint w, uint h,
enum pipe_format format,
const unsigned int *p)
{
unsigned src_stride = w * 4;
void *packed;
if (u_clip_tile(x, y, &w, &h, &pt->box))
return;
packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
if (!packed)
return;
util_format_write_4ui(format,
p, src_stride * sizeof(float),
packed, util_format_get_stride(format, w),
0, 0, w, h);
pipe_put_tile_raw(pt, dst, x, y, w, h, packed, 0);
FREE(packed);
}
void
pipe_get_tile_ui_format(struct pipe_transfer *pt,
const void *src,
uint x, uint y, uint w, uint h,
enum pipe_format format,
unsigned int *p)
{
unsigned dst_stride = w * 4;
void *packed;
if (u_clip_tile(x, y, &w, &h, &pt->box)) {
return;
}
packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
if (!packed) {
return;
}
if (format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV) {
assert((x & 1) == 0);
}
pipe_get_tile_raw(pt, src, x, y, w, h, packed, 0);
pipe_tile_raw_to_unsigned(format, packed, w, h, p, dst_stride);
FREE(packed);
}
void
pipe_get_tile_i_format(struct pipe_transfer *pt,
const void *src,
uint x, uint y, uint w, uint h,
enum pipe_format format,
int *p)
{
unsigned dst_stride = w * 4;
void *packed;
if (u_clip_tile(x, y, &w, &h, &pt->box)) {
return;
}
packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format));
if (!packed) {
return;
}
if (format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV) {
assert((x & 1) == 0);
}
pipe_get_tile_raw(pt, src, x, y, w, h, packed, 0);
pipe_tile_raw_to_signed(format, packed, w, h, p, dst_stride);
FREE(packed);
}
+4 -44
View File
@@ -77,55 +77,15 @@ void
pipe_get_tile_rgba(struct pipe_transfer *pt,
const void *src,
uint x, uint y, uint w, uint h,
float *p);
void
pipe_get_tile_rgba_format(struct pipe_transfer *pt,
const void *src,
uint x, uint y, uint w, uint h,
enum pipe_format format,
float *p);
enum pipe_format format,
void *dst);
void
pipe_put_tile_rgba(struct pipe_transfer *pt,
void *dst,
uint x, uint y, uint w, uint h,
const float *p);
void
pipe_put_tile_rgba_format(struct pipe_transfer *pt,
void *dst,
uint x, uint y, uint w, uint h,
enum pipe_format format,
const float *p);
void
pipe_get_tile_ui_format(struct pipe_transfer *pt,
const void *src,
uint x, uint y, uint w, uint h,
enum pipe_format format,
unsigned int *p);
void
pipe_get_tile_i_format(struct pipe_transfer *pt,
const void *src,
uint x, uint y, uint w, uint h,
enum pipe_format format,
int *p);
void
pipe_put_tile_ui_format(struct pipe_transfer *pt,
void *dst,
uint x, uint y, uint w, uint h,
enum pipe_format format,
const unsigned *p);
void
pipe_put_tile_i_format(struct pipe_transfer *pt,
void *dst,
uint x, uint y, uint w, uint h,
enum pipe_format format,
const int *p);
enum pipe_format format,
const void *src);
#ifdef __cplusplus
}
@@ -205,7 +205,6 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
union tex_tile_address addr )
{
struct softpipe_tex_cached_tile *tile;
boolean zs = util_format_is_depth_or_stencil(tc->format);
tile = tc->entries + tex_cache_pos( addr );
@@ -260,31 +259,13 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
/* Get tile from the transfer (view into texture), explicitly passing
* the image format.
*/
if (!zs && util_format_is_pure_uint(tc->format)) {
pipe_get_tile_ui_format(tc->tex_trans, tc->tex_trans_map,
addr.bits.x * TEX_TILE_SIZE,
addr.bits.y * TEX_TILE_SIZE,
TEX_TILE_SIZE,
TEX_TILE_SIZE,
tc->format,
(unsigned *) tile->data.colorui);
} else if (!zs && util_format_is_pure_sint(tc->format)) {
pipe_get_tile_i_format(tc->tex_trans, tc->tex_trans_map,
addr.bits.x * TEX_TILE_SIZE,
addr.bits.y * TEX_TILE_SIZE,
TEX_TILE_SIZE,
TEX_TILE_SIZE,
tc->format,
(int *) tile->data.colori);
} else {
pipe_get_tile_rgba_format(tc->tex_trans, tc->tex_trans_map,
addr.bits.x * TEX_TILE_SIZE,
addr.bits.y * TEX_TILE_SIZE,
TEX_TILE_SIZE,
TEX_TILE_SIZE,
tc->format,
(float *) tile->data.color);
}
pipe_get_tile_rgba(tc->tex_trans, tc->tex_trans_map,
addr.bits.x * TEX_TILE_SIZE,
addr.bits.y * TEX_TILE_SIZE,
TEX_TILE_SIZE,
TEX_TILE_SIZE,
tc->format,
(float *) tile->data.color);
tile->addr = addr;
}
+22 -82
View File
@@ -367,22 +367,10 @@ sp_tile_cache_flush_clear(struct softpipe_tile_cache *tc, int layer)
tc->tile->data.any, 0/*STRIDE*/);
}
else {
if (util_format_is_pure_uint(tc->surface->format)) {
pipe_put_tile_ui_format(pt, tc->transfer_map[layer],
x, y, TILE_SIZE, TILE_SIZE,
tc->surface->format,
(unsigned *) tc->tile->data.colorui128);
} else if (util_format_is_pure_sint(tc->surface->format)) {
pipe_put_tile_i_format(pt, tc->transfer_map[layer],
x, y, TILE_SIZE, TILE_SIZE,
tc->surface->format,
(int *) tc->tile->data.colori128);
} else {
pipe_put_tile_rgba_format(pt, tc->transfer_map[layer],
x, y, TILE_SIZE, TILE_SIZE,
tc->surface->format,
(float *) tc->tile->data.color);
}
pipe_put_tile_rgba(pt, tc->transfer_map[layer],
x, y, TILE_SIZE, TILE_SIZE,
tc->surface->format,
tc->tile->data.color);
}
numCleared++;
}
@@ -408,28 +396,12 @@ sp_flush_tile(struct softpipe_tile_cache* tc, unsigned pos)
tc->entries[pos]->data.depth32, 0/*STRIDE*/);
}
else {
if (util_format_is_pure_uint(tc->surface->format)) {
pipe_put_tile_ui_format(tc->transfer[layer], tc->transfer_map[layer],
tc->tile_addrs[pos].bits.x * TILE_SIZE,
tc->tile_addrs[pos].bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tc->surface->format,
(unsigned *) tc->entries[pos]->data.colorui128);
} else if (util_format_is_pure_sint(tc->surface->format)) {
pipe_put_tile_i_format(tc->transfer[layer], tc->transfer_map[layer],
tc->tile_addrs[pos].bits.x * TILE_SIZE,
tc->tile_addrs[pos].bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tc->surface->format,
(int *) tc->entries[pos]->data.colori128);
} else {
pipe_put_tile_rgba_format(tc->transfer[layer], tc->transfer_map[layer],
tc->tile_addrs[pos].bits.x * TILE_SIZE,
tc->tile_addrs[pos].bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tc->surface->format,
(float *) tc->entries[pos]->data.color);
}
pipe_put_tile_rgba(tc->transfer[layer], tc->transfer_map[layer],
tc->tile_addrs[pos].bits.x * TILE_SIZE,
tc->tile_addrs[pos].bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tc->surface->format,
tc->entries[pos]->data.color);
}
tc->tile_addrs[pos].bits.invalid = 1; /* mark as empty */
}
@@ -538,28 +510,12 @@ sp_find_cached_tile(struct softpipe_tile_cache *tc,
tile->data.depth32, 0/*STRIDE*/);
}
else {
if (util_format_is_pure_uint(tc->surface->format)) {
pipe_put_tile_ui_format(tc->transfer[layer], tc->transfer_map[layer],
tc->tile_addrs[pos].bits.x * TILE_SIZE,
tc->tile_addrs[pos].bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tc->surface->format,
(unsigned *) tile->data.colorui128);
} else if (util_format_is_pure_sint(tc->surface->format)) {
pipe_put_tile_i_format(tc->transfer[layer], tc->transfer_map[layer],
tc->tile_addrs[pos].bits.x * TILE_SIZE,
tc->tile_addrs[pos].bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tc->surface->format,
(int *) tile->data.colori128);
} else {
pipe_put_tile_rgba_format(tc->transfer[layer], tc->transfer_map[layer],
tc->tile_addrs[pos].bits.x * TILE_SIZE,
tc->tile_addrs[pos].bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tc->surface->format,
(float *) tile->data.color);
}
pipe_put_tile_rgba(tc->transfer[layer], tc->transfer_map[layer],
tc->tile_addrs[pos].bits.x * TILE_SIZE,
tc->tile_addrs[pos].bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tc->surface->format,
tile->data.color);
}
}
@@ -589,28 +545,12 @@ sp_find_cached_tile(struct softpipe_tile_cache *tc,
tile->data.depth32, 0/*STRIDE*/);
}
else {
if (util_format_is_pure_uint(tc->surface->format)) {
pipe_get_tile_ui_format(tc->transfer[layer], tc->transfer_map[layer],
tc->tile_addrs[pos].bits.x * TILE_SIZE,
tc->tile_addrs[pos].bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tc->surface->format,
(unsigned *) tile->data.colorui128);
} else if (util_format_is_pure_sint(tc->surface->format)) {
pipe_get_tile_i_format(tc->transfer[layer], tc->transfer_map[layer],
tc->tile_addrs[pos].bits.x * TILE_SIZE,
tc->tile_addrs[pos].bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tc->surface->format,
(int *) tile->data.colori128);
} else {
pipe_get_tile_rgba_format(tc->transfer[layer], tc->transfer_map[layer],
tc->tile_addrs[pos].bits.x * TILE_SIZE,
tc->tile_addrs[pos].bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tc->surface->format,
(float *) tile->data.color);
}
pipe_get_tile_rgba(tc->transfer[layer], tc->transfer_map[layer],
tc->tile_addrs[pos].bits.x * TILE_SIZE,
tc->tile_addrs[pos].bits.y * TILE_SIZE,
TILE_SIZE, TILE_SIZE,
tc->surface->format,
tile->data.color);
}
}
}
+5 -5
View File
@@ -2235,8 +2235,8 @@ st_GetTexSubImage(struct gl_context * ctx,
slice, 0, 0);
/* get float[4] rgba row from surface */
pipe_get_tile_rgba_format(tex_xfer, map, 0, 0, width, height,
dst_format, rgba);
pipe_get_tile_rgba(tex_xfer, map, 0, 0, width, height, dst_format,
rgba);
_mesa_format_convert(dest, dstMesaFormat, dstStride,
rgba, RGBA32_FLOAT, srcStride,
@@ -2392,9 +2392,9 @@ fallback_copy_texsubimage(struct gl_context *ctx,
/* XXX this usually involves a lot of int/float conversion.
* try to avoid that someday.
*/
pipe_get_tile_rgba_format(src_trans, map, 0, 0, width, height,
util_format_linear(strb->texture->format),
tempSrc);
pipe_get_tile_rgba(src_trans, map, 0, 0, width, height,
util_format_linear(strb->texture->format),
tempSrc);
/* Store into texture memory.
* Note that this does some special things such as pixel transfer