[Mesa-dev] [PATCH] [mesa-dev][fe] Float fbconfigs frontend patch [2/3] Float configs extension strings.

Tomasz lis listom at gmail.com
Fri Jan 4 07:46:48 PST 2013


From: Tomasz Lis <tomasz.lis at intel.com>

The patch defines fbconfig_float in tables of extensions and enables
reporting the extension availability.

Signed-off-by: Tomasz Lis <tomasz.lis at intel.com>
---
 .../state_trackers/wgl/stw_ext_pixelformat.c       |   10 +++++++++-
 src/glx/glxextensions.c                            |    4 ++++
 src/glx/glxextensions.h                            |    6 +++++-
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c b/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c
index 1856db3..e578c9a 100644
--- a/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c
+++ b/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c
@@ -231,6 +231,13 @@ stw_query_attrib(
       *pvalue = pfi->pfd.cAuxBuffers;
       break;
 
+  /* WGL_ARB_pixel_format_float */
+   case WGL_TYPE_RGBA_FLOAT_ARB:
+      *pvalue = 0; //FIXME Maybe we should support it in some way?
+      break;
+
+   /* WGL_ARB_multisample */
+
    case WGL_SAMPLE_BUFFERS_ARB:
       *pvalue = 1;
       break;
@@ -303,7 +310,8 @@ static const struct attrib_match_info attrib_match[] = {
    { WGL_DEPTH_BITS_ARB,          1, FALSE },
    { WGL_STENCIL_BITS_ARB,        1, FALSE },
    { WGL_AUX_BUFFERS_ARB,         2, FALSE },
-
+   /* WGL_ARB_pixel_format_float */
+   { WGL_TYPE_RGBA_FLOAT_ARB,     0, TRUE },
    /* WGL_ARB_multisample */
    { WGL_SAMPLE_BUFFERS_ARB,      2, FALSE },
    { WGL_SAMPLES_ARB,             2, FALSE }
diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c
index caa6d99..27c6017 100644
--- a/src/glx/glxextensions.c
+++ b/src/glx/glxextensions.c
@@ -74,6 +74,7 @@ static const struct extension_info known_glx_extensions[] = {
    { GLX(ARB_create_context),          VER(0,0), Y, N, N, N },
    { GLX(ARB_create_context_profile),  VER(0,0), Y, N, N, N },
    { GLX(ARB_create_context_robustness), VER(0,0), Y, N, N, N },
+   { GLX(ARB_fbconfig_float),          VER(1,3), Y, N, Y, N },
    { GLX(ARB_framebuffer_sRGB),        VER(0,0), Y, Y, N, N },
    { GLX(ARB_get_proc_address),        VER(1,4), Y, N, Y, N },
    { GLX(ARB_multisample),             VER(1,4), Y, Y, N, N },
@@ -82,6 +83,7 @@ static const struct extension_info known_glx_extensions[] = {
    { GLX(EXT_visual_info),             VER(0,0), Y, Y, N, N },
    { GLX(EXT_visual_rating),           VER(0,0), Y, Y, N, N },
    { GLX(EXT_framebuffer_sRGB),        VER(0,0), Y, Y, N, N },
+   { GLX(EXT_fbconfig_packed_float),   VER(1,3), Y, N, Y, N },
    { GLX(EXT_create_context_es2_profile), VER(0,0), Y, N, N, Y },
    { GLX(MESA_copy_sub_buffer),        VER(0,0), Y, N, N, N },
    { GLX(MESA_multithread_makecurrent),VER(0,0), Y, N, Y, N },
@@ -132,6 +134,7 @@ static const struct extension_info known_gl_extensions[] = {
    { GL(ARB_vertex_buffer_object),       VER(1,5), N, N, N, N },
    { GL(ARB_vertex_program),             VER(0,0), Y, N, N, N },
    { GL(ARB_window_pos),                 VER(1,4), Y, N, N, N },
+   { GL(ARB_color_buffer_float),         VER(3,0), Y, Y, Y, N },
    { GL(EXT_abgr),                       VER(0,0), Y, N, N, N },
    { GL(EXT_bgra),                       VER(1,2), Y, N, N, N },
    { GL(EXT_blend_color),                VER(1,4), Y, N, N, N },
@@ -155,6 +158,7 @@ static const struct extension_info known_gl_extensions[] = {
    { GL(EXT_multi_draw_arrays),          VER(1,4), Y, N, Y, N },
    { GL(EXT_packed_depth_stencil),       VER(0,0), Y, N, N, N },
    { GL(EXT_packed_pixels),              VER(1,2), Y, N, N, N },
+   { GL(EXT_packed_float),               VER(1,1), Y, N, N, N },
    { GL(EXT_paletted_texture),           VER(0,0), Y, N, N, N },
    { GL(EXT_pixel_buffer_object),        VER(0,0), N, N, N, N },
    { GL(EXT_point_parameters),           VER(1,4), Y, N, N, N },
diff --git a/src/glx/glxextensions.h b/src/glx/glxextensions.h
index 3c5d407..7d2bf96 100644
--- a/src/glx/glxextensions.h
+++ b/src/glx/glxextensions.h
@@ -36,6 +36,7 @@ enum
    ARB_create_context_bit = 0,
    ARB_create_context_profile_bit,
    ARB_create_context_robustness_bit,
+   ARB_fbconfig_float_bit,
    ARB_get_proc_address_bit,
    ARB_multisample_bit,
    ATI_pixel_format_float_bit,
@@ -43,6 +44,7 @@ enum
    EXT_visual_rating_bit,
    EXT_import_context_bit,
    EXT_framebuffer_sRGB_bit,
+   EXT_fbconfig_packed_float_bit,
    EXT_create_context_es2_profile_bit,
    MESA_copy_sub_buffer_bit,
    MESA_depth_float_bit,
@@ -72,7 +74,8 @@ enum
 
 enum
 {
-   GL_ARB_depth_texture_bit = 0,
+   GL_ARB_color_buffer_float_bit = 0,
+   GL_ARB_depth_texture_bit,
    GL_ARB_draw_buffers_bit,
    GL_ARB_fragment_program_bit,
    GL_ARB_fragment_program_shadow_bit,
@@ -122,6 +125,7 @@ enum
    GL_EXT_framebuffer_sRGB_bit,
    GL_EXT_multi_draw_arrays_bit,
    GL_EXT_packed_depth_stencil_bit,
+   GL_EXT_packed_float_bit,
    GL_EXT_packed_pixels_bit,
    GL_EXT_paletted_texture_bit,
    GL_EXT_pixel_buffer_object_bit,
-- 
1.7.9.5



More information about the mesa-dev mailing list