[Mesa-dev] [PATCH 5/7] i965: Change intel_miptree_create_for_bo() signature
Chad Versace
chad.versace at intel.com
Thu Apr 9 20:57:06 PDT 2015
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.
Cc: Jordan Justen <jordan.l.justen at intel.com>
Cc: Tapani Pälli <tapani.palli at intel.com>
Cc: Zach Reizner <zachr at google.com>
Cc: Frank Henigman <fjhenigman at google.com>
Cc: Marta Lofstedt <marta.lofstedt at intel.com>
Cc: Haixia Shi <hshi at chromium.org>
---
src/mesa/drivers/dri/i965/intel_fbo.c | 3 ++-
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 17 +++++++++++------
src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 3 ++-
src/mesa/drivers/dri/i965/intel_pixel_draw.c | 3 ++-
src/mesa/drivers/dri/i965/intel_tex.c | 3 ++-
src/mesa/drivers/dri/i965/intel_tex_image.c | 3 ++-
6 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index 7babd29..4c38583 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index ebcd20e..c9b4060 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -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
@@ -630,7 +631,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
*/
@@ -721,7 +723,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;
@@ -745,7 +748,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;
@@ -796,7 +800,8 @@ intel_update_winsys_renderbuffer_miptree(struct brw_context *intel,
width,
height,
1,
- pitch);
+ pitch,
+ false);
if (!singlesample_mt)
goto fail;
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index 3dd37883..0796059 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -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,
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_draw.c b/src/mesa/drivers/dri/i965/intel_pixel_draw.c
index e0904de..055ab42 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_draw.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/intel_tex.c b/src/mesa/drivers/dri/i965/intel_tex.c
index 2d3009a..3335fd1 100644
--- a/src/mesa/drivers/dri/i965/intel_tex.c
+++ b/src/mesa/drivers/dri/i965/intel_tex.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index 00bf9ce..c581010 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -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;
--
2.2.0
More information about the mesa-dev
mailing list