diff options
author | Marek Olšák <[email protected]> | 2011-05-28 14:28:19 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-05-30 10:49:21 +0200 |
commit | 49d4e803d369e0faedfa44063fb7f6232faa8175 (patch) | |
tree | d3d3352463dba85f5250dde2a96a4a76b2d49b56 /src | |
parent | ff038170ff9042c0ee535be7c2837d200e06b0c0 (diff) |
st/mesa: fix changing internal format via RenderbufferStorage
The problem is: The second time the function is called with a new
internal format, strb->format is usually not PIPE_FORMAT_NONE.
RenderbufferStorage(... GL_RGBA8 ...);
RenderbufferStorage(... GL_RGBA16 ...); // had no effect on the format
Broken with: fd6f2d6e5783d8810d0ab88e1c470958fd5eb2eb
Test: piglit/fbo-storage-completeness
NOTE: This is a candidate for the 7.10 branch.
(if fd6f2d6e5783d8810d0ab88e1c470958fd5eb2eb is cherry-picked as well)
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 755b6bcf967..64424f77634 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -74,11 +74,8 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx, enum pipe_format format; struct pipe_surface surf_tmpl; - if (strb->format != PIPE_FORMAT_NONE) - format = strb->format; - else - format = st_choose_renderbuffer_format(screen, internalFormat, - rb->NumSamples); + format = st_choose_renderbuffer_format(screen, internalFormat, + rb->NumSamples); if (format == PIPE_FORMAT_NONE) { return FALSE; |