diff options
author | George Sapountzis <gsapountzis@gmail.com> | 2010-03-25 17:01:52 +0200 |
---|---|---|
committer | George Sapountzis <gsapountzis@gmail.com> | 2010-03-25 17:01:52 +0200 |
commit | 24056e76637c9d79d996c6bc060576907bd9b2aa (patch) | |
tree | b1d2252415c06161e3ad981eaa884923e4c6be94 /src/gallium/state_trackers/dri/dri_st_api.c | |
parent | 03c4573ecaeedc8439ebbdfe90f7873fcd9706a1 (diff) |
st/dri: flush_frontbuffer, allocate_textures for dri1
* ptex is get by flush_frontbuffer, similar to swap_buffers
* comment for allocate_textures
* texture_mask is managed at the st_fb level
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_st_api.c')
-rw-r--r-- | src/gallium/state_trackers/dri/dri_st_api.c | 13 |
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; } |