st/dri: enable 3D textures and sRGB colorspace for EGL
authorAnatoli Antonovitch <anatoli.antonovitch@amd.com>
Wed, 10 Jun 2015 12:47:03 +0000 (14:47 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 22 Jul 2015 21:56:00 +0000 (23:56 +0200)
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/state_trackers/dri/dri_query_renderer.c

index 4a28ac37b70aa124faa3e675c8555b9239cd2e77..ea31b6c1e10305bbd3b0628ee2f660a6ddc66f23 100644 (file)
@@ -42,6 +42,20 @@ dri2_query_renderer_integer(__DRIscreen *_screen, int param,
                                                       PIPE_CAP_UMA);
       return 0;
 
+   case __DRI2_RENDERER_HAS_TEXTURE_3D:
+      value[0] =
+         screen->base.screen->get_param(screen->base.screen,
+                                        PIPE_CAP_MAX_TEXTURE_3D_LEVELS) != 0;
+      return 0;
+
+   case __DRI2_RENDERER_HAS_FRAMEBUFFER_SRGB:
+      value[0] =
+         screen->base.screen->is_format_supported(screen->base.screen,
+                                                  PIPE_FORMAT_B8G8R8A8_SRGB,
+                                                  PIPE_TEXTURE_2D, 0,
+                                                  PIPE_BIND_RENDER_TARGET);
+      return 0;
+
    default:
       return driQueryRendererIntegerCommon(_screen, param, value);
    }