st/mesa: add floating point formats in st_new_renderbuffer_fb()
authorBrian Paul <brianp@vmware.com>
Fri, 3 Feb 2012 18:08:50 +0000 (11:08 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 23 Feb 2012 14:49:07 +0000 (07:49 -0700)
To allow creating floating point buffers / pbuffers.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mesa/state_tracker/st_cb_fbo.c

index 300c3f0eba515ba38a1f44e63e6fcca4076a24f7..953295c0e1652331264302b630624e8834ac0fcb 100644 (file)
@@ -278,9 +278,16 @@ st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw)
    case PIPE_FORMAT_R16G16_UNORM:
       strb->Base.InternalFormat = GL_RG16;
       break;
+   case PIPE_FORMAT_R32G32B32A32_FLOAT:
+      strb->Base.InternalFormat = GL_RGBA32F;
+      break;
+   case PIPE_FORMAT_R16G16B16A16_FLOAT:
+      strb->Base.InternalFormat = GL_RGBA16F;
+      break;
    default:
       _mesa_problem(NULL,
-                   "Unexpected format in st_new_renderbuffer_fb");
+                   "Unexpected format %s in st_new_renderbuffer_fb",
+                    util_format_name(format));
       free(strb);
       return NULL;
    }