llvmpipe: Fix lp_test_format on 32bit OSes.
[mesa.git] / src / gallium / drivers / i965 / brw_state_cache.c
index 16b643ceb28e4a412447993033f74fe808f6bf72..c911f3997d18fc47c688ca2ca33a2e9c93f76bac 100644 (file)
@@ -59,7 +59,6 @@
 
 #include "brw_debug.h"
 #include "brw_state.h"
-#include "brw_batchbuffer.h"
 
 /* XXX: Fixme - have to include these to get the sizes of the prog_key
  * structs:
@@ -214,7 +213,7 @@ brw_upload_cache( struct brw_cache *cache,
                  void *aux_return,
                   struct brw_winsys_buffer **bo_out)
 {
-   struct brw_cache_item *item = CALLOC_STRUCT(brw_cache_item);
+   struct brw_cache_item *item;
    GLuint hash = hash_key(key, key_size, relocs, nr_relocs);
    GLuint relocs_size = nr_relocs * sizeof relocs[0];
    GLuint aux_size = cache->aux_size[cache_id];
@@ -234,6 +233,7 @@ brw_upload_cache( struct brw_cache *cache,
    if (ret)
       return ret;
 
+   item = CALLOC_STRUCT(brw_cache_item);
 
    /* Set up the memory containing the key, aux_data, and relocs */
    tmp = MALLOC(key_size + aux_size + relocs_size);