summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2021-04-26 17:22:18 -0400
committerMarge Bot <eric+marge@anholt.net>2021-05-05 03:23:58 +0000
commit20538b50c71c9c4fecd1a4c736a8d726411366ce (patch)
tree83798351a5620030329829586ac30b46f830d628
parent64e7248bfb65cb6c00ffa2a22a354d1755ecd8c2 (diff)
gallium: Reset attachments to ST_ATTACHMENT_INVALID when revalidating
It is *super* *confusing* to leave this initialized to zero, i.e. ST_ATTACHMENT_FRONT_LEFT. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10491>
-rw-r--r--src/mesa/state_tracker/st_manager.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index c5cc0828617..4a0da6ff99c 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -282,6 +282,10 @@ st_framebuffer_update_attachments(struct st_framebuffer *stfb)
gl_buffer_index idx;
stfb->num_statts = 0;
+
+ for (enum st_attachment_type i = 0; i < ST_ATTACHMENT_COUNT; i++)
+ stfb->statts[i] = ST_ATTACHMENT_INVALID;
+
for (idx = 0; idx < BUFFER_COUNT; idx++) {
struct st_renderbuffer *strb;
enum st_attachment_type statt;