}
if (old_src.format != new_src.format)
- r300_resource_set_properties(pipe->screen, src, 0, &new_src);
+ r300_resource_set_properties(pipe->screen, src, &new_src);
if (old_dst.format != new_dst.format)
- r300_resource_set_properties(pipe->screen, dst, 0, &new_dst);
+ r300_resource_set_properties(pipe->screen, dst, &new_dst);
r300_hw_copy_region(pipe, dst, dst_level, dstx, dsty, dstz,
src, src_level, src_box);
if (old_src.format != new_src.format)
- r300_resource_set_properties(pipe->screen, src, 0, &old_src);
+ r300_resource_set_properties(pipe->screen, src, &old_src);
if (old_dst.format != new_dst.format)
- r300_resource_set_properties(pipe->screen, dst, 0, &old_dst);
+ r300_resource_set_properties(pipe->screen, dst, &old_dst);
}
void r300_init_blit_functions(struct r300_context *r300)
/* Only format-independent bits should be filled in. */
struct r300_texture_format_state tx_format;
- /* Where the texture starts in the buffer. */
- unsigned tex_offset;
-
/* This is the level tiling flags were last time set for.
* It's used to prevent redundant tiling-flags changes from happening.*/
unsigned surface_level;
* an i-th mipmap level as the zero level. */
base_level += min_level;
}
- offset = tex->tex_offset +
- tex->tex.offset_in_bytes[base_level];
+ offset = tex->tex.offset_in_bytes[base_level];
r300_texture_setup_format_state(r300->screen, tex,
base_level,
&texstate->format);
texstate->format.tile_config |= offset & 0xffffffe0;
assert((offset & 0x1f) == 0);
- } else {
- texstate->format.tile_config |= tex->tex_offset & 0xffffffe0;
- assert((tex->tex_offset & 0x1f) == 0);
}
/* Assign a texture cache region. */
boolean r300_resource_set_properties(struct pipe_screen *screen,
struct pipe_resource *tex,
- unsigned offset,
const struct pipe_resource *new_properties)
{
struct r300_screen *rscreen = r300_screen(screen);
fprintf(stderr, "r300: ERROR: Cannot set texture properties.\n");
return FALSE;
}
- res->tex_offset = offset;
r300_texture_setup_format_state(rscreen, res, 0, &res->tx_format);
return TRUE;
tex->tex.stride_in_bytes_override = stride_in_bytes_override;
tex->buf = buffer;
- if (!r300_resource_set_properties(&rscreen->screen, &tex->b.b.b, 0, base)) {
+ if (!r300_resource_set_properties(&rscreen->screen, &tex->b.b.b, base)) {
if (buffer)
pb_reference(&buffer, NULL);
FREE(tex);
boolean r300_resource_set_properties(struct pipe_screen *screen,
struct pipe_resource *tex,
- unsigned offset,
const struct pipe_resource *new_properties);
boolean r300_is_colorbuffer_format_supported(enum pipe_format format);