Lines Matching refs:aux
326 crocus_bo_unreference(res->aux.bo);
327 free(res->aux.state);
329 res->aux.usage = ISL_AUX_USAGE_NONE;
330 res->aux.has_hiz = 0;
331 res->aux.surf.size_B = 0;
332 res->aux.surf.levels = 0;
333 res->aux.bo = NULL;
334 res->aux.state = NULL;
388 assert(res->aux.state == NULL);
422 * Configure aux for the resource, but don't allocate it. For images which
423 * might be shared with modifiers, we must allocate the image and aux data in
443 isl_surf_get_mcs_surf(&screen->isl_dev, &res->surf, &res->aux.surf);
447 isl_surf_get_hiz_surf(&screen->isl_dev, &res->surf, &res->aux.surf);
453 &res->aux.surf, 0);
459 res->aux.usage = res->mod_info->aux_usage;
461 res->aux.usage = ISL_AUX_USAGE_MCS;
463 res->aux.usage = ISL_AUX_USAGE_HIZ;
466 res->aux.usage = ISL_AUX_USAGE_CCS_D;
472 assert(!res->aux.bo);
474 switch (res->aux.usage) {
476 /* Having no aux buffer is only okay if there's no modifier with aux. */
477 res->aux.surf.levels = 0;
506 * undefined bits in the aux buffer.
516 unreachable("non-crocus aux");
520 res->aux.state = create_aux_state_map(res, initial_state);
521 if (!res->aux.state)
524 /* Increase the aux offset if the main and aux surfaces will share a BO. */
525 res->aux.offset =
526 !res->mod_info || res->mod_info->aux_usage == res->aux.usage ?
527 ALIGN(res->surf.size_B, res->aux.surf.alignment_B) : 0;
528 uint64_t size = res->aux.surf.size_B;
543 if (isl_aux_usage_has_hiz(res->aux.usage)) {
553 res->aux.has_hiz |= 1 << level;
561 * Initialize the aux buffer contents.
569 void *map = crocus_bo_map(NULL, res->aux.bo, MAP_WRITE | MAP_RAW);
575 uint8_t memset_value = isl_aux_usage_has_mcs(res->aux.usage) ? 0xFF : 0;
576 memset((char*)map + res->aux.offset, memset_value,
577 res->aux.surf.size_B);
580 crocus_bo_unmap(res->aux.bo);
587 * Allocate the initial aux surface for a resource based on aux.usage
609 res->aux.bo = crocus_bo_alloc_tiled(screen->bufmgr, "aux buffer", size, 4096,
610 isl_tiling_to_i915_tiling(res->aux.surf.tiling),
611 res->aux.surf.row_pitch_B, alloc_flags);
612 if (!res->aux.bo) {
631 assert(aux_res->aux.surf.row_pitch_B && aux_res->aux.offset &&
632 aux_res->aux.bo);
634 assert(res->bo == aux_res->aux.bo);
635 crocus_bo_reference(aux_res->aux.bo);
636 res->aux.bo = aux_res->aux.bo;
638 res->aux.offset = aux_res->aux.offset;
640 assert(res->bo->size >= (res->aux.offset + res->aux.surf.size_B));
641 assert(aux_res->aux.surf.row_pitch_B == res->aux.surf.row_pitch_B);
723 /* Modifiers require the aux data to be in the same buffer as the main
727 MAX2(res->surf.size_B, res->aux.offset + aux_size);
737 res->aux.bo = res->bo;
738 crocus_bo_reference(res->aux.bo);
878 * for the aux image. crocus_resource_finish_aux_import will
879 * merge the separate aux parameters back into a single
890 res->aux.surf.row_pitch_B = whandle->stride;
891 res->aux.offset = whandle->offset;
892 res->aux.bo = res->bo;
957 /* Disable aux usage if explicit flush not set and this is the first time
959 * a modifier with aux.
962 (!(usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH) && res->aux.usage != 0) &&
990 struct crocus_bo *bo = wants_aux ? res->aux.bo : res->bo;
1006 *value = wants_aux ? res->aux.surf.row_pitch_B : res->surf.row_pitch_B;
1009 *value = wants_aux ? res->aux.offset : 0;
1058 assert(res->aux.bo);
1059 bo = res->aux.bo;
1060 whandle->stride = res->aux.surf.row_pitch_B;
1061 whandle->offset = res->aux.offset;
1076 if (res->aux.usage != allowed_usage) {
1873 if (memcmp(&res->aux.clear_color, &color, sizeof(color)) != 0) {
1874 res->aux.clear_color = color;
1884 assert(res->aux.bo);
1886 return res->aux.clear_color;