Ver código fonte

i965: Change intel_miptree_create_for_bo() signature

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>
tags/10.6-branchpoint
Chad Versace 10 anos atrás
pai
commit
bf504b6127

+ 2
- 1
src/mesa/drivers/dri/i965/intel_fbo.c Ver arquivo

@@ -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;


+ 11
- 6
src/mesa/drivers/dri/i965/intel_mipmap_tree.c Ver arquivo

@@ -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;


+ 2
- 1
src/mesa/drivers/dri/i965/intel_mipmap_tree.h Ver arquivo

@@ -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,

+ 2
- 1
src/mesa/drivers/dri/i965/intel_pixel_draw.c Ver arquivo

@@ -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;


+ 2
- 1
src/mesa/drivers/dri/i965/intel_tex.c Ver arquivo

@@ -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;


+ 2
- 1
src/mesa/drivers/dri/i965/intel_tex_image.c Ver arquivo

@@ -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;

Carregando…
Cancelar
Salvar