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
image->width, | image->width, | ||||
image->height, | image->height, | ||||
1, | 1, | ||||
image->pitch); | |||||
image->pitch, | |||||
false /*disable_aux_buffers*/); | |||||
if (!irb->mt) | if (!irb->mt) | ||||
return; | return; | ||||
GLuint depth0, | GLuint depth0, | ||||
bool for_bo, | bool for_bo, | ||||
GLuint num_samples, | 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); | struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1); | ||||
if (!mt) | if (!mt) | ||||
mt->logical_height0 = height0; | mt->logical_height0 = height0; | ||||
mt->logical_depth0 = depth0; | mt->logical_depth0 = depth0; | ||||
mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_NO_MCS; | 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); | exec_list_make_empty(&mt->hiz_map); | ||||
/* The cpp is bytes per (1, blockheight)-sized block for compressed | /* The cpp is bytes per (1, blockheight)-sized block for compressed | ||||
first_level, last_level, width0, | first_level, last_level, width0, | ||||
height0, depth0, | height0, depth0, | ||||
false, num_samples, | 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 | * pitch == 0 || height == 0 indicates the null texture | ||||
*/ | */ | ||||
uint32_t width, | uint32_t width, | ||||
uint32_t height, | uint32_t height, | ||||
uint32_t depth, | uint32_t depth, | ||||
int pitch) | |||||
int pitch, | |||||
bool disable_aux_buffers) | |||||
{ | { | ||||
struct intel_mipmap_tree *mt; | struct intel_mipmap_tree *mt; | ||||
uint32_t tiling, swizzle; | uint32_t tiling, swizzle; | ||||
mt = intel_miptree_create_layout(brw, target, format, | mt = intel_miptree_create_layout(brw, target, format, | ||||
0, 0, | 0, 0, | ||||
width, height, depth, | width, height, depth, | ||||
true, 0, false); | |||||
true, 0, false, | |||||
disable_aux_buffers); | |||||
if (!mt) { | if (!mt) { | ||||
free(mt); | free(mt); | ||||
return mt; | return mt; | ||||
width, | width, | ||||
height, | height, | ||||
1, | 1, | ||||
pitch); | |||||
pitch, | |||||
false); | |||||
if (!singlesample_mt) | if (!singlesample_mt) | ||||
goto fail; | goto fail; | ||||
uint32_t width, | uint32_t width, | ||||
uint32_t height, | uint32_t height, | ||||
uint32_t depth, | uint32_t depth, | ||||
int pitch); | |||||
int pitch, | |||||
bool disable_aux_buffers); | |||||
void | void | ||||
intel_update_winsys_renderbuffer_miptree(struct brw_context *intel, | intel_update_winsys_renderbuffer_miptree(struct brw_context *intel, |
irb->mt->format, | irb->mt->format, | ||||
src_offset, | src_offset, | ||||
width, height, 1, | width, height, 1, | ||||
src_stride); | |||||
src_stride, | |||||
false /*disable_aux_buffers*/); | |||||
if (!pbo_mt) | if (!pbo_mt) | ||||
return false; | return false; | ||||
image->TexFormat, | image->TexFormat, | ||||
buffer_offset, | buffer_offset, | ||||
image->Width, image->Height, image->Depth, | image->Width, image->Height, image->Depth, | ||||
row_stride); | |||||
row_stride, | |||||
false /*disable_aux_buffers*/); | |||||
if (!intel_texobj->mt) | if (!intel_texobj->mt) | ||||
return false; | return false; | ||||
ctx->Driver.FreeTextureImageBuffer(ctx, image); | ctx->Driver.FreeTextureImageBuffer(ctx, image); | ||||
intel_image->mt = intel_miptree_create_for_bo(brw, bo, image->TexFormat, | 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) | if (intel_image->mt == NULL) | ||||
return; | return; | ||||
intel_image->mt->target = target; | intel_image->mt->target = target; |