mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 17:50:12 +01:00
radeonsi: properly set cmask_buffer in si_reallocate_texture_inplace
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
d4755ef389
commit
eabeeb86b2
1 changed files with 11 additions and 1 deletions
|
|
@ -574,7 +574,17 @@ static void si_reallocate_texture_inplace(struct si_context *sctx,
|
||||||
tex->fmask_offset = new_tex->fmask_offset;
|
tex->fmask_offset = new_tex->fmask_offset;
|
||||||
tex->cmask_offset = new_tex->cmask_offset;
|
tex->cmask_offset = new_tex->cmask_offset;
|
||||||
tex->cmask_base_address_reg = new_tex->cmask_base_address_reg;
|
tex->cmask_base_address_reg = new_tex->cmask_base_address_reg;
|
||||||
|
|
||||||
|
if (tex->cmask_buffer == &tex->buffer)
|
||||||
|
tex->cmask_buffer = NULL;
|
||||||
|
else
|
||||||
|
r600_resource_reference(&tex->cmask_buffer, NULL);
|
||||||
|
|
||||||
|
if (new_tex->cmask_buffer == &new_tex->buffer)
|
||||||
|
tex->cmask_buffer = &tex->buffer;
|
||||||
|
else
|
||||||
r600_resource_reference(&tex->cmask_buffer, new_tex->cmask_buffer);
|
r600_resource_reference(&tex->cmask_buffer, new_tex->cmask_buffer);
|
||||||
|
|
||||||
tex->dcc_offset = new_tex->dcc_offset;
|
tex->dcc_offset = new_tex->dcc_offset;
|
||||||
tex->cb_color_info = new_tex->cb_color_info;
|
tex->cb_color_info = new_tex->cb_color_info;
|
||||||
memcpy(tex->color_clear_value, new_tex->color_clear_value,
|
memcpy(tex->color_clear_value, new_tex->color_clear_value,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue