st/mesa: advertise ARB_half_float_vertex when available
authorMarek Olšák <maraeo@gmail.com>
Tue, 25 May 2010 23:54:58 +0000 (01:54 +0200)
committerMarek Olšák <maraeo@gmail.com>
Fri, 28 May 2010 01:30:11 +0000 (03:30 +0200)
Both softpipe and llvmpipe pass the piglit half float test.

src/mesa/state_tracker/st_extensions.c

index 810a0635b50842484e1c52e22e7b0452efb735fb..4093eedde9a1bd714109a09203bfb01baa9a59df 100644 (file)
@@ -373,6 +373,13 @@ void st_init_extensions(struct st_context *st)
       ctx->Extensions.EXT_draw_buffers2 = GL_TRUE;
    }
 
+   /* GL_ARB_half_float_vertex */
+   if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_FLOAT,
+                                   PIPE_BUFFER, 0,
+                                   PIPE_BIND_VERTEX_BUFFER, 0)) {
+      ctx->Extensions.ARB_half_float_vertex = GL_TRUE;
+   }
+
 #if 0 /* not yet */
    if (screen->get_param(screen, PIPE_CAP_INDEP_BLEND_FUNC)) {
       ctx->Extensions.ARB_draw_buffers_blend = GL_TRUE;