replace malloc macros in imports.h with u_memory.h versions
[mesa.git] / src / mesa / drivers / dri / i965 / intel_fbo.c
index 5bcd846a1bcb686e15ff997d8e1e3807dccd8e45..cc450baf51e3d9aec0a461db836f4bf0a8077365 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "main/enums.h"
-#include "main/imports.h"
+#include "util/imports.h"
 #include "main/macros.h"
 #include "main/mtypes.h"
 #include "main/fbobject.h"
@@ -36,6 +36,7 @@
 #include "main/condrender.h"
 #include "util/hash_table.h"
 #include "util/set.h"
+#include "util/u_memory.h"
 
 #include "swrast/swrast.h"
 #include "drivers/common/meta.h"
@@ -250,7 +251,7 @@ static mesa_format
 intel_renderbuffer_format(struct gl_context * ctx, GLenum internalFormat)
 {
    struct brw_context *brw = brw_context(ctx);
-   MAYBE_UNUSED const struct gen_device_info *devinfo = &brw->screen->devinfo;
+   ASSERTED const struct gen_device_info *devinfo = &brw->screen->devinfo;
 
    switch (internalFormat) {
    default:
@@ -632,11 +633,11 @@ intel_render_texture(struct gl_context * ctx,
 #define fbo_incomplete(fb, error_id, ...) do {                                          \
       static GLuint msg_id = 0;                                               \
       if (unlikely(ctx->Const.ContextFlags & GL_CONTEXT_FLAG_DEBUG_BIT)) {    \
-         _mesa_gl_debug(ctx, &msg_id,                                         \
-                        MESA_DEBUG_SOURCE_API,                                \
-                        MESA_DEBUG_TYPE_OTHER,                                \
-                        MESA_DEBUG_SEVERITY_MEDIUM,                           \
-                        __VA_ARGS__);                                         \
+         _mesa_gl_debugf(ctx, &msg_id,                                        \
+                         MESA_DEBUG_SOURCE_API,                               \
+                         MESA_DEBUG_TYPE_OTHER,                               \
+                         MESA_DEBUG_SEVERITY_MEDIUM,                          \
+                         __VA_ARGS__);                                        \
       }                                                                       \
       DBG(__VA_ARGS__);                                                       \
       fb->_Status = error_id;                                                 \
@@ -860,8 +861,8 @@ intel_blit_framebuffer_with_blitter(struct gl_context *ctx,
          }
 
          if (ctx->Color.sRGBEnabled &&
-             _mesa_get_format_color_encoding(src_irb->mt->format) !=
-             _mesa_get_format_color_encoding(dst_irb->mt->format)) {
+             _mesa_is_format_srgb(src_irb->mt->format) !=
+             _mesa_is_format_srgb(dst_irb->mt->format)) {
             perf_debug("glBlitFramebuffer() with sRGB conversion cannot be "
                        "handled by BLT path.\n");
             return mask;