diff options
author | Jason Ekstrand <[email protected]> | 2017-11-12 18:31:56 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-11-27 16:22:12 -0800 |
commit | 85aa4074a29b5fcb6dbf0d34b85b36c05eeecc02 (patch) | |
tree | 457ca7507e5fe538b3a5d8a432e40db33a27e31b /src/mesa/drivers | |
parent | 86becfd2de3feed66d41350c828391524a7b4052 (diff) |
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 <[email protected]>
Reviewed-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index 38284d3b855..5393c7236e3 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -139,16 +139,17 @@ blorp_surf_for_miptree(struct brw_context *brw, intel_miptree_check_level_layer(mt, *level, start_layer + i); } - surf->surf = &mt->surf; - surf->addr = (struct blorp_address) { - .buffer = mt->bo, - .offset = mt->offset, - .reloc_flags = is_render_target ? EXEC_OBJECT_WRITE : 0, - .mocs = brw_get_bo_mocs(devinfo, mt->bo), + *surf = (struct blorp_surf) { + .surf = &mt->surf, + .addr = (struct blorp_address) { + .buffer = mt->bo, + .offset = mt->offset, + .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; if (mt->mcs_buf) aux_surf = &mt->mcs_buf->surf; |