summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-02-03 11:08:50 -0700
committerBrian Paul <[email protected]>2012-02-23 07:49:07 -0700
commitc68334ffc0a97406eedf11a6b8f4d846b236fb45 (patch)
treeef0d80a206ae376d217d88bfba09d2fe47455c5a /src
parent09d0fa5be8da0087e6b8d239aee5d70e97655768 (diff)
st/mesa: add floating point formats in st_new_renderbuffer_fb()
To allow creating floating point buffers / pbuffers. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 300c3f0eba5..953295c0e16 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -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;
}