config.info.levels = tex->last_level + 1;
config.is_3d = !!(tex->target == PIPE_TEXTURE_3D);
config.is_cube = !!(tex->target == PIPE_TEXTURE_CUBE);
- config.info.surf_index = NULL;
+
+ /* Use different surface counters for color and FMASK, so that MSAA MRTs
+ * always use consecutive surface indices when FMASK is allocated between
+ * them.
+ */
+ if (flags & RADEON_SURF_FMASK)
+ config.info.surf_index = &ws->surf_index_fmask;
+ else if (!(flags & RADEON_SURF_Z_OR_SBUFFER))
+ config.info.surf_index = &ws->surf_index_color;
+ else
+ config.info.surf_index = NULL;
return ac_compute_surface(ws->addrlib, &ws->info, &config, mode, surf);
}
int num_cs; /* The number of command streams created. */
unsigned num_total_rejected_cs;
+ uint32_t surf_index_color;
+ uint32_t surf_index_fmask;
uint32_t next_bo_unique_id;
uint64_t allocated_vram;
uint64_t allocated_gtt;