mesa: add EXT_dsa glCompressedMultiTex* functions
[mesa.git] / src / mesa / main / context.h
index c51b3c17c0d686e088263e0ea73714b94ec6f12d..e9b270df14ce5b1a9ba48526e0ba5ec2170c5bff 100644 (file)
@@ -115,7 +115,7 @@ _mesa_initialize_context( struct gl_context *ctx,
                           const struct dd_function_table *driverFunctions);
 
 extern void
-_mesa_free_context_data( struct gl_context *ctx );
+_mesa_free_context_data(struct gl_context *ctx, bool destroy_compiler_types);
 
 extern void
 _mesa_destroy_context( struct gl_context *ctx );
@@ -343,12 +343,58 @@ _mesa_has_integer_textures(const struct gl_context *ctx)
    return _mesa_has_EXT_texture_integer(ctx) || _mesa_is_gles3(ctx);
 }
 
+static inline bool
+_mesa_has_half_float_textures(const struct gl_context *ctx)
+{
+   return _mesa_has_ARB_texture_float(ctx) ||
+          _mesa_has_OES_texture_half_float(ctx) || _mesa_is_gles3(ctx);
+}
+
+static inline bool
+_mesa_has_float_textures(const struct gl_context *ctx)
+{
+   return _mesa_has_ARB_texture_float(ctx) ||
+          _mesa_has_OES_texture_float(ctx) || _mesa_is_gles3(ctx);
+ }
+
 static inline bool
 _mesa_has_texture_rgb10_a2ui(const struct gl_context *ctx)
 {
    return _mesa_has_ARB_texture_rgb10_a2ui(ctx) || _mesa_is_gles3(ctx);
 }
 
+static inline bool
+_mesa_has_float_depth_buffer(const struct gl_context *ctx)
+{
+   return _mesa_has_ARB_depth_buffer_float(ctx) || _mesa_is_gles3(ctx);
+}
+
+static inline bool
+_mesa_has_packed_float(const struct gl_context *ctx)
+{
+   return _mesa_has_EXT_packed_float(ctx) || _mesa_is_gles3(ctx);
+}
+
+static inline bool
+_mesa_has_rg_textures(const struct gl_context *ctx)
+{
+   return _mesa_has_ARB_texture_rg(ctx) || _mesa_has_EXT_texture_rg(ctx) ||
+          _mesa_is_gles3(ctx);
+}
+
+static inline bool
+_mesa_has_texture_shared_exponent(const struct gl_context *ctx)
+{
+   return _mesa_has_EXT_texture_shared_exponent(ctx) || _mesa_is_gles3(ctx);
+}
+
+static inline bool
+_mesa_has_texture_type_2_10_10_10_REV(const struct gl_context *ctx)
+{
+   return _mesa_is_desktop_gl(ctx) ||
+          _mesa_has_EXT_texture_type_2_10_10_10_REV(ctx);
+}
+
 /**
  * Checks if the context supports geometry shaders.
  */