瀏覽代碼

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: fd6f2d6e57
Test: piglit/fbo-storage-completeness

NOTE: This is a candidate for the 7.10 branch.
(if fd6f2d6e57 is cherry-picked as well)

Reviewed-by: Brian Paul <brianp@vmware.com>
tags/mesa-7.11-rc1
Marek Olšák 14 年之前
父節點
當前提交
49d4e803d3
共有 1 個檔案被更改,包括 2 行新增5 行删除
  1. 2
    5
      src/mesa/state_tracker/st_cb_fbo.c

+ 2
- 5
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;

Loading…
取消
儲存