gallium/radeon: boolean -> bool, TRUE -> true, FALSE -> false
[mesa.git] / src / gallium / drivers / radeon / r600_texture.c
index 32347f26edd0919986c930d4bf5d1db9100ecf28..81acd42a330c37add3834d455a446f4bf30ba47e 100644 (file)
@@ -366,7 +366,7 @@ static void r600_texture_discard_cmask(struct r600_common_screen *rscreen,
                rtex->cb_color_info &= ~EG_S_028C70_FAST_CLEAR(1);
 
        if (rtex->cmask_buffer != &rtex->resource)
-           pipe_resource_reference((struct pipe_resource**)&rtex->cmask_buffer, NULL);
+           r600_resource_reference(&rtex->cmask_buffer, NULL);
 
        /* Notify all contexts about the change. */
        r600_dirty_all_framebuffer_states(rscreen);
@@ -559,9 +559,9 @@ static void r600_texture_destroy(struct pipe_screen *screen,
        if (rtex->flushed_depth_texture)
                pipe_resource_reference((struct pipe_resource **)&rtex->flushed_depth_texture, NULL);
 
-       pipe_resource_reference((struct pipe_resource**)&rtex->htile_buffer, NULL);
+       r600_resource_reference(&rtex->htile_buffer, NULL);
        if (rtex->cmask_buffer != &rtex->resource) {
-           pipe_resource_reference((struct pipe_resource**)&rtex->cmask_buffer, NULL);
+           r600_resource_reference(&rtex->cmask_buffer, NULL);
        }
        pb_reference(&resource->buf, NULL);
        FREE(rtex);
@@ -1274,7 +1274,7 @@ bool r600_init_flushed_depth_texture(struct pipe_context *ctx,
                return false;
        }
 
-       (*flushed_depth_texture)->is_flushing_texture = TRUE;
+       (*flushed_depth_texture)->is_flushing_texture = true;
        (*flushed_depth_texture)->non_disp_tiling = false;
        return true;
 }
@@ -1511,7 +1511,7 @@ static void *r600_texture_transfer_map(struct pipe_context *ctx,
        }
 
        if (!(map = r600_buffer_map_sync_with_rings(rctx, buf, usage))) {
-               pipe_resource_reference((struct pipe_resource**)&trans->staging, NULL);
+               r600_resource_reference(&trans->staging, NULL);
                FREE(trans);
                return NULL;
        }
@@ -1541,7 +1541,7 @@ static void r600_texture_transfer_unmap(struct pipe_context *ctx,
 
        if (rtransfer->staging) {
                rctx->num_alloc_tex_transfer_bytes += rtransfer->staging->buf->size;
-               pipe_resource_reference((struct pipe_resource**)&rtransfer->staging, NULL);
+               r600_resource_reference(&rtransfer->staging, NULL);
        }
 
        /* Heuristic for {upload, draw, upload, draw, ..}:
@@ -1635,8 +1635,8 @@ static void r600_surface_destroy(struct pipe_context *pipe,
                                 struct pipe_surface *surface)
 {
        struct r600_surface *surf = (struct r600_surface*)surface;
-       pipe_resource_reference((struct pipe_resource**)&surf->cb_buffer_fmask, NULL);
-       pipe_resource_reference((struct pipe_resource**)&surf->cb_buffer_cmask, NULL);
+       r600_resource_reference(&surf->cb_buffer_fmask, NULL);
+       r600_resource_reference(&surf->cb_buffer_cmask, NULL);
        pipe_resource_reference(&surface->texture, NULL);
        FREE(surface);
 }
@@ -1746,7 +1746,7 @@ static void vi_get_fast_clear_parameters(enum pipe_format surface_format,
            surface_format == PIPE_FORMAT_B5G6R5_SRGB) {
                extra_channel = -1;
        } else if (desc->layout == UTIL_FORMAT_LAYOUT_PLAIN) {
-               if(r600_translate_colorswap(surface_format, FALSE) <= 1)
+               if(r600_translate_colorswap(surface_format, false) <= 1)
                        extra_channel = desc->nr_channels - 1;
                else
                        extra_channel = 0;