llvmpipe: do 64bit plane calculations in the sse path
[mesa.git] / src / gallium / auxiliary / pipebuffer / pb_bufmgr_debug.c
index 6236afb70d121ef046f165b7cd6bd7011e8bbf75..3d3a7aba7fb0bd452a23aab1d96c8e5965c8e6ff 100644 (file)
@@ -99,7 +99,7 @@ struct pb_debug_manager
 };
 
 
-static INLINE struct pb_debug_buffer *
+static inline struct pb_debug_buffer *
 pb_debug_buffer(struct pb_buffer *buf)
 {
    assert(buf);
@@ -107,7 +107,7 @@ pb_debug_buffer(struct pb_buffer *buf)
 }
 
 
-static INLINE struct pb_debug_manager *
+static inline struct pb_debug_manager *
 pb_debug_manager(struct pb_manager *mgr)
 {
    assert(mgr);
@@ -123,7 +123,7 @@ static const uint8_t random_pattern[32] = {
 };
 
 
-static INLINE void 
+static inline void 
 fill_random_pattern(uint8_t *dst, pb_size size)
 {
    pb_size i = 0;
@@ -134,7 +134,7 @@ fill_random_pattern(uint8_t *dst, pb_size size)
 }
 
 
-static INLINE boolean 
+static inline boolean 
 check_random_pattern(const uint8_t *dst, pb_size size, 
                      pb_size *min_ofs, pb_size *max_ofs) 
 {
@@ -160,7 +160,7 @@ pb_debug_buffer_fill(struct pb_debug_buffer *buf)
    
    map = pb_map(buf->buffer, PB_USAGE_CPU_WRITE, NULL);
    assert(map);
-   if(map) {
+   if (map) {
       fill_random_pattern(map, buf->underflow_size);
       fill_random_pattern(map + buf->underflow_size + buf->base.size,
                           buf->overflow_size);
@@ -183,7 +183,7 @@ pb_debug_buffer_check(struct pb_debug_buffer *buf)
                 PB_USAGE_CPU_READ |
                 PB_USAGE_UNSYNCHRONIZED, NULL);
    assert(map);
-   if(map) {
+   if (map) {
       boolean underflow, overflow;
       pb_size min_ofs, max_ofs;
       
@@ -256,15 +256,13 @@ pb_debug_buffer_map(struct pb_buffer *_buf,
    pb_debug_buffer_check(buf);
 
    map = pb_map(buf->buffer, flags, flush_ctx);
-   if(!map)
+   if (!map)
       return NULL;
    
-   if(map) {
-      pipe_mutex_lock(buf->mutex);
-      ++buf->map_count;
-      debug_backtrace_capture(buf->map_backtrace, 1, PB_DEBUG_MAP_BACKTRACE);
-      pipe_mutex_unlock(buf->mutex);
-   }
+   pipe_mutex_lock(buf->mutex);
+   ++buf->map_count;
+   debug_backtrace_capture(buf->map_backtrace, 1, PB_DEBUG_MAP_BACKTRACE);
+   pipe_mutex_unlock(buf->mutex);
    
    return (uint8_t *)map + buf->underflow_size;
 }
@@ -375,7 +373,7 @@ pb_debug_manager_create_buffer(struct pb_manager *_mgr,
    assert(desc->alignment);
 
    buf = CALLOC_STRUCT(pb_debug_buffer);
-   if(!buf)
+   if (!buf)
       return NULL;
    
    real_size = mgr->underflow_size + size + mgr->overflow_size;
@@ -462,7 +460,7 @@ pb_debug_manager_create(struct pb_manager *provider,
 {
    struct pb_debug_manager *mgr;
 
-   if(!provider)
+   if (!provider)
       return NULL;
    
    mgr = CALLOC_STRUCT(pb_debug_manager);