i965: Fix occlusion query on sandybridge
[mesa.git] / src / mesa / drivers / dri / i965 / brw_draw_upload.c
index f24c4146adbe1cf4108d5e33a2e278de53677572..2cefe614dd2cf2fac78ba724444cafe725f11803 100644 (file)
@@ -168,7 +168,7 @@ static GLuint byte_types_scale[5] = {
 static GLuint get_surface_type( GLenum type, GLuint size,
                                 GLenum format, GLboolean normalized )
 {
-   if (INTEL_DEBUG & DEBUG_VERTS)
+   if (unlikely(INTEL_DEBUG & DEBUG_VERTS))
       printf("type %s size %d normalized %d\n", 
                   _mesa_lookup_enum_by_nr(type), size, normalized);
 
@@ -313,7 +313,7 @@ copy_array_to_vbo_array( struct brw_context *brw,
 
 static void brw_prepare_vertices(struct brw_context *brw)
 {
-   GLcontext *ctx = &brw->intel.ctx;
+   struct gl_context *ctx = &brw->intel.ctx;
    struct intel_context *intel = intel_context(ctx);
    GLbitfield vs_inputs = brw->vs.prog_data->inputs_read; 
    GLuint i;
@@ -451,7 +451,7 @@ static void brw_prepare_vertices(struct brw_context *brw)
 
 static void brw_emit_vertices(struct brw_context *brw)
 {
-   GLcontext *ctx = &brw->intel.ctx;
+   struct gl_context *ctx = &brw->intel.ctx;
    struct intel_context *intel = intel_context(ctx);
    GLuint i;
 
@@ -583,7 +583,7 @@ const struct brw_tracked_state brw_vertices = {
 
 static void brw_prepare_indices(struct brw_context *brw)
 {
-   GLcontext *ctx = &brw->intel.ctx;
+   struct gl_context *ctx = &brw->intel.ctx;
    struct intel_context *intel = &brw->intel;
    const struct _mesa_index_buffer *index_buffer = brw->ib.ib;
    GLuint ib_size;