mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
r600g: clear compressed_depthtex/colortex_mask when binding buffer texture
Found by inspection of the source based on a bisected bug report.
This bug has been in the code for a long time, but the more recent PBO upload
feature exposed it because it leads to more uses of buffer textures.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94388
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "11.0 11.1 11.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit e502801d98)
This commit is contained in:
parent
b290082b45
commit
adec0763a9
1 changed files with 13 additions and 13 deletions
|
|
@ -645,21 +645,21 @@ static void r600_set_sampler_views(struct pipe_context *pipe, unsigned shader,
|
|||
if (rviews[i]) {
|
||||
struct r600_texture *rtex =
|
||||
(struct r600_texture*)rviews[i]->base.texture;
|
||||
bool is_buffer = rviews[i]->base.texture->target == PIPE_BUFFER;
|
||||
|
||||
if (rviews[i]->base.texture->target != PIPE_BUFFER) {
|
||||
if (rtex->is_depth && !rtex->is_flushing_texture) {
|
||||
dst->views.compressed_depthtex_mask |= 1 << i;
|
||||
} else {
|
||||
dst->views.compressed_depthtex_mask &= ~(1 << i);
|
||||
}
|
||||
|
||||
/* Track compressed colorbuffers. */
|
||||
if (rtex->cmask.size) {
|
||||
dst->views.compressed_colortex_mask |= 1 << i;
|
||||
} else {
|
||||
dst->views.compressed_colortex_mask &= ~(1 << i);
|
||||
}
|
||||
if (!is_buffer && rtex->is_depth && !rtex->is_flushing_texture) {
|
||||
dst->views.compressed_depthtex_mask |= 1 << i;
|
||||
} else {
|
||||
dst->views.compressed_depthtex_mask &= ~(1 << i);
|
||||
}
|
||||
|
||||
/* Track compressed colorbuffers. */
|
||||
if (!is_buffer && rtex->cmask.size) {
|
||||
dst->views.compressed_colortex_mask |= 1 << i;
|
||||
} else {
|
||||
dst->views.compressed_colortex_mask &= ~(1 << i);
|
||||
}
|
||||
|
||||
/* Changing from array to non-arrays textures and vice versa requires
|
||||
* updating TEX_ARRAY_OVERRIDE in sampler states on R6xx-R7xx. */
|
||||
if (rctx->b.chip_class <= R700 &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue