unsigned height0;
};
-static void r600_s3tc_to_blittable(struct pipe_resource *tex,
+static void r600_compressed_to_blittable(struct pipe_resource *tex,
unsigned level,
struct texture_orig_info *orig)
{
+ struct r600_resource_texture *rtex = (struct r600_resource_texture*)tex;
unsigned pixsize = util_format_get_blocksize(tex->format);
int new_format;
int new_height, new_width;
new_width = util_format_get_nblocksx(tex->format, orig->width0);
new_height = util_format_get_nblocksy(tex->format, orig->height0);
+ rtex->force_int_type = true;
tex->width0 = new_width;
tex->height0 = new_height;
tex->format = new_format;
}
-static void r600_reset_blittable_to_s3tc(struct pipe_resource *tex,
+static void r600_reset_blittable_to_compressed(struct pipe_resource *tex,
unsigned level,
struct texture_orig_info *orig)
{
+ struct r600_resource_texture *rtex = (struct r600_resource_texture*)tex;
+ rtex->force_int_type = false;
+
tex->format = orig->format;
tex->width0 = orig->width0;
tex->height0 = orig->height0;
restore_orig[0] = restore_orig[1] = FALSE;
- if (util_format_is_s3tc(src->format)) {
- r600_s3tc_to_blittable(src, src_level, &orig_info[0]);
+ if (util_format_is_compressed(src->format)) {
+ r600_compressed_to_blittable(src, src_level, &orig_info[0]);
restore_orig[0] = TRUE;
}
- if (util_format_is_s3tc(dst->format)) {
- r600_s3tc_to_blittable(dst, dst_level, &orig_info[1]);
+ if (util_format_is_compressed(dst->format)) {
+ r600_compressed_to_blittable(dst, dst_level, &orig_info[1]);
restore_orig[1] = TRUE;
/* translate the dst box as well */
dstx = util_format_get_nblocksx(orig_info[1].format, dstx);
- dsty = util_format_get_nblocksx(orig_info[1].format, dsty);
+ dsty = util_format_get_nblocksy(orig_info[1].format, dsty);
}
r600_hw_copy_region(ctx, dst, dst_level, dstx, dsty, dstz,
src, src_level, src_box);
if (restore_orig[0])
- r600_reset_blittable_to_s3tc(src, src_level, &orig_info[0]);
+ r600_reset_blittable_to_compressed(src, src_level, &orig_info[0]);
if (restore_orig[1])
- r600_reset_blittable_to_s3tc(dst, dst_level, &orig_info[1]);
+ r600_reset_blittable_to_compressed(dst, dst_level, &orig_info[1]);
}
void r600_init_blit_functions(struct r600_pipe_context *rctx)