i965: Change intel_miptree_create_for_bo() signature
authorChad Versace <chad.versace@intel.com>
Mon, 6 Apr 2015 15:11:43 +0000 (08:11 -0700)
committerChad Versace <chad.versace@intel.com>
Mon, 13 Apr 2015 14:36:32 +0000 (07:36 -0700)
Add parameter 'bool disable_aux_buffers'.

This is a refactor patch. The patch changes no behavior because the new
parameter is false in every call.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_fbo.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h
src/mesa/drivers/dri/i965/intel_pixel_draw.c
src/mesa/drivers/dri/i965/intel_tex.c
src/mesa/drivers/dri/i965/intel_tex_image.c

index 7babd29aa0996951c6f290a9f87d0f2348ca3928..4c38583fedc01482f272f2f32c000bcf6d26d046 100644 (file)
@@ -390,7 +390,8 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx,
                                          image->width,
                                          image->height,
                                          1,
-                                         image->pitch);
+                                         image->pitch,
+                                         false /*disable_aux_buffers*/);
    if (!irb->mt)
       return;
 
index ec0bb197a182ae95f6138dcacb8e47d3dc85362f..c0a345293ee5ce46842e5f471c27544d9b6f65de 100644 (file)
@@ -246,7 +246,8 @@ intel_miptree_create_layout(struct brw_context *brw,
                             GLuint depth0,
                             bool for_bo,
                             GLuint num_samples,
-                            bool force_all_slices_at_each_lod)
+                            bool force_all_slices_at_each_lod,
+                            bool disable_aux_buffers)
 {
    struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1);
    if (!mt)
@@ -285,7 +286,7 @@ intel_miptree_create_layout(struct brw_context *brw,
    mt->logical_height0 = height0;
    mt->logical_depth0 = depth0;
    mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_NO_MCS;
-   mt->disable_aux_buffers = false; /* hardcoded for now */
+   mt->disable_aux_buffers = disable_aux_buffers;
    exec_list_make_empty(&mt->hiz_map);
 
    /* The cpp is bytes per (1, blockheight)-sized block for compressed
@@ -629,7 +630,8 @@ intel_miptree_create(struct brw_context *brw,
                                      first_level, last_level, width0,
                                      height0, depth0,
                                     false, num_samples,
-                                    force_all_slices_at_each_lod);
+                                    force_all_slices_at_each_lod,
+                                    false /*disable_aux_buffers*/);
    /*
     * pitch == 0 || height == 0  indicates the null texture
     */
@@ -720,7 +722,8 @@ intel_miptree_create_for_bo(struct brw_context *brw,
                             uint32_t width,
                             uint32_t height,
                             uint32_t depth,
-                            int pitch)
+                            int pitch,
+                            bool disable_aux_buffers)
 {
    struct intel_mipmap_tree *mt;
    uint32_t tiling, swizzle;
@@ -744,7 +747,8 @@ intel_miptree_create_for_bo(struct brw_context *brw,
    mt = intel_miptree_create_layout(brw, target, format,
                                     0, 0,
                                     width, height, depth,
-                                    true, 0, false);
+                                    true, 0, false,
+                                    disable_aux_buffers);
    if (!mt) {
       free(mt);
       return mt;
@@ -795,7 +799,8 @@ intel_update_winsys_renderbuffer_miptree(struct brw_context *intel,
                                                  width,
                                                  height,
                                                  1,
-                                                 pitch);
+                                                 pitch,
+                                                 false);
    if (!singlesample_mt)
       goto fail;
 
index 3dd378835e9ba5f413e83382c5ce3c676af8d1a8..07960592e2b71495c0eb3178d6462006602634cd 100644 (file)
@@ -544,7 +544,8 @@ intel_miptree_create_for_bo(struct brw_context *brw,
                             uint32_t width,
                             uint32_t height,
                             uint32_t depth,
-                            int pitch);
+                            int pitch,
+                            bool disable_aux_buffers);
 
 void
 intel_update_winsys_renderbuffer_miptree(struct brw_context *intel,
index e0904de2ba37d727fde7a17fc0ac442c0217b73b..055ab42cb6d7297b3a33301d20079169e47fca1c 100644 (file)
@@ -111,7 +111,8 @@ do_blit_drawpixels(struct gl_context * ctx,
                                   irb->mt->format,
                                   src_offset,
                                   width, height, 1,
-                                  src_stride);
+                                  src_stride,
+                                  false /*disable_aux_buffers*/);
    if (!pbo_mt)
       return false;
 
index 2d3009a30d12d89e8f7a32b03a533c71e07742ca..3335fd1ff0d9c04fe0fd4a2c56545c9cf88d79f9 100644 (file)
@@ -340,7 +340,8 @@ intel_set_texture_storage_for_buffer_object(struct gl_context *ctx,
                                   image->TexFormat,
                                   buffer_offset,
                                   image->Width, image->Height, image->Depth,
-                                  row_stride);
+                                  row_stride,
+                                  false /*disable_aux_buffers*/);
    if (!intel_texobj->mt)
       return false;
 
index 00bf9ce9830f0f265605e83a68a58dffc42dcbfb..c581010feb27e268a36c2a1ff17b3c50c3c9f3ad 100644 (file)
@@ -169,7 +169,8 @@ intel_set_texture_image_bo(struct gl_context *ctx,
    ctx->Driver.FreeTextureImageBuffer(ctx, image);
 
    intel_image->mt = intel_miptree_create_for_bo(brw, bo, image->TexFormat,
-                                                 0, width, height, 1, pitch);
+                                                 0, width, height, 1, pitch,
+                                                 false /*disable_aux_buffers*/);
    if (intel_image->mt == NULL)
        return;
    intel_image->mt->target = target;