i965/blorp: Use a designated initializer for blorp_surf
This way uninitialized fields get automatically zeroed and it's safe to add more fields to blorp_surf. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
This commit is contained in:
parent
86becfd2de
commit
85aa4074a2
|
@ -139,16 +139,17 @@ blorp_surf_for_miptree(struct brw_context *brw,
|
||||||
intel_miptree_check_level_layer(mt, *level, start_layer + i);
|
intel_miptree_check_level_layer(mt, *level, start_layer + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
surf->surf = &mt->surf;
|
*surf = (struct blorp_surf) {
|
||||||
surf->addr = (struct blorp_address) {
|
.surf = &mt->surf,
|
||||||
.buffer = mt->bo,
|
.addr = (struct blorp_address) {
|
||||||
.offset = mt->offset,
|
.buffer = mt->bo,
|
||||||
.reloc_flags = is_render_target ? EXEC_OBJECT_WRITE : 0,
|
.offset = mt->offset,
|
||||||
.mocs = brw_get_bo_mocs(devinfo, mt->bo),
|
.reloc_flags = is_render_target ? EXEC_OBJECT_WRITE : 0,
|
||||||
|
.mocs = brw_get_bo_mocs(devinfo, mt->bo),
|
||||||
|
},
|
||||||
|
.aux_usage = aux_usage,
|
||||||
};
|
};
|
||||||
|
|
||||||
surf->aux_usage = aux_usage;
|
|
||||||
|
|
||||||
struct isl_surf *aux_surf = NULL;
|
struct isl_surf *aux_surf = NULL;
|
||||||
if (mt->mcs_buf)
|
if (mt->mcs_buf)
|
||||||
aux_surf = &mt->mcs_buf->surf;
|
aux_surf = &mt->mcs_buf->surf;
|
||||||
|
|
Loading…
Reference in New Issue