summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/dri/dri_st_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_st_api.c')
-rw-r--r--src/gallium/state_trackers/dri/dri_st_api.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/dri/dri_st_api.c b/src/gallium/state_trackers/dri/dri_st_api.c
index e721e55459..2cdfd257b0 100644
--- a/src/gallium/state_trackers/dri/dri_st_api.c
+++ b/src/gallium/state_trackers/dri/dri_st_api.c
@@ -285,8 +285,7 @@ dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
if (drawable->texture_stamp != drawable->dPriv->lastStamp ||
(statt_mask & ~drawable->texture_mask)) {
if (__dri1_api_hooks) {
- dri1_allocate_textures(drawable,
- drawable->dPriv->w, drawable->dPriv->h, statt_mask);
+ dri1_allocate_textures(drawable, statt_mask);
}
else {
__DRIbuffer *buffers;
@@ -296,6 +295,12 @@ dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
dri_drawable_process_buffers(drawable, buffers, num_buffers);
}
+ /* add existing textures */
+ for (i = 0; i < ST_ATTACHMENT_COUNT; i++) {
+ if (drawable->textures[i])
+ statt_mask |= (1 << i);
+ }
+
drawable->texture_stamp = drawable->dPriv->lastStamp;
drawable->texture_mask = statt_mask;
}
@@ -321,9 +326,7 @@ dri_st_framebuffer_flush_front(struct st_framebuffer_iface *stfbi,
drawable->sPriv->dri2.loader;
if (__dri1_api_hooks) {
- struct pipe_texture *ptex = drawable->textures[statt];
- if (ptex)
- dri1_flush_frontbuffer(drawable, ptex);
+ dri1_flush_frontbuffer(drawable, statt);
return TRUE;
}