• Home
  • Raw
  • Download

Lines Matching refs:res

172                                struct crocus_resource *res,  in crocus_resource_configure_main()  argument
188 res->mod_info = isl_drm_modifier_get_info(modifier); in crocus_resource_configure_main()
190 tiling_flags = 1 << res->mod_info->tiling; in crocus_resource_configure_main()
194 res->mod_info = isl_drm_modifier_get_info(modifier); in crocus_resource_configure_main()
195 tiling_flags = 1 << res->mod_info->tiling; in crocus_resource_configure_main()
254 if (!isl_surf_init_s(&screen->isl_dev, &res->surf, &init_info)) in crocus_resource_configure_main()
263 if (res->surf.size_B > screen->aperture_threshold / 2) in crocus_resource_configure_main()
266 res->internal_format = templ->format; in crocus_resource_configure_main()
324 crocus_resource_disable_aux(struct crocus_resource *res) in crocus_resource_disable_aux() argument
326 crocus_bo_unreference(res->aux.bo); in crocus_resource_disable_aux()
327 free(res->aux.state); in crocus_resource_disable_aux()
329 res->aux.usage = ISL_AUX_USAGE_NONE; in crocus_resource_disable_aux()
330 res->aux.has_hiz = 0; in crocus_resource_disable_aux()
331 res->aux.surf.size_B = 0; in crocus_resource_disable_aux()
332 res->aux.surf.levels = 0; in crocus_resource_disable_aux()
333 res->aux.bo = NULL; in crocus_resource_disable_aux()
334 res->aux.state = NULL; in crocus_resource_disable_aux()
341 struct crocus_resource *res = (struct crocus_resource *)resource; in crocus_resource_destroy() local
344 util_range_destroy(&res->valid_buffer_range); in crocus_resource_destroy()
346 if (res->shadow) in crocus_resource_destroy()
347 pipe_resource_reference((struct pipe_resource **)&res->shadow, NULL); in crocus_resource_destroy()
348 crocus_resource_disable_aux(res); in crocus_resource_destroy()
351 crocus_bo_unreference(res->bo); in crocus_resource_destroy()
352 crocus_pscreen_unref(res->orig_screen); in crocus_resource_destroy()
353 free(res); in crocus_resource_destroy()
360 struct crocus_resource *res = calloc(1, sizeof(struct crocus_resource)); in crocus_alloc_resource() local
361 if (!res) in crocus_alloc_resource()
364 res->base.b = *templ; in crocus_alloc_resource()
365 res->base.b.screen = pscreen; in crocus_alloc_resource()
366 res->orig_screen = crocus_pscreen_ref(pscreen); in crocus_alloc_resource()
367 pipe_reference_init(&res->base.b.reference, 1); in crocus_alloc_resource()
368 threaded_resource_init(&res->base.b, false); in crocus_alloc_resource()
371 util_range_init(&res->valid_buffer_range); in crocus_alloc_resource()
373 return res; in crocus_alloc_resource()
377 crocus_get_num_logical_layers(const struct crocus_resource *res, unsigned level) in crocus_get_num_logical_layers() argument
379 if (res->surf.dim == ISL_SURF_DIM_3D) in crocus_get_num_logical_layers()
380 return u_minify(res->surf.logical_level0_px.depth, level); in crocus_get_num_logical_layers()
382 return res->surf.logical_level0_px.array_len; in crocus_get_num_logical_layers()
386 create_aux_state_map(struct crocus_resource *res, enum isl_aux_state initial) in create_aux_state_map() argument
388 assert(res->aux.state == NULL); in create_aux_state_map()
391 for (uint32_t level = 0; level < res->surf.levels; level++) in create_aux_state_map()
392 total_slices += crocus_get_num_logical_layers(res, level); in create_aux_state_map()
395 res->surf.levels * sizeof(enum isl_aux_state *); in create_aux_state_map()
410 for (uint32_t level = 0; level < res->surf.levels; level++) { in create_aux_state_map()
412 const unsigned level_layers = crocus_get_num_logical_layers(res, level); in create_aux_state_map()
431 struct crocus_resource *res, bool imported, in crocus_resource_configure_aux() argument
440 assert(!res->mod_info || res->mod_info->aux_usage == ISL_AUX_USAGE_NONE); in crocus_resource_configure_aux()
442 const bool has_mcs = devinfo->ver >= 7 && !res->mod_info && in crocus_resource_configure_aux()
443 isl_surf_get_mcs_surf(&screen->isl_dev, &res->surf, &res->aux.surf); in crocus_resource_configure_aux()
445 const bool has_hiz = devinfo->ver >= 6 && !res->mod_info && in crocus_resource_configure_aux()
447 isl_surf_get_hiz_surf(&screen->isl_dev, &res->surf, &res->aux.surf); in crocus_resource_configure_aux()
450 ((devinfo->ver >= 7 && !res->mod_info && !INTEL_DEBUG(DEBUG_NO_CCS)) || in crocus_resource_configure_aux()
451 (res->mod_info && res->mod_info->aux_usage != ISL_AUX_USAGE_NONE)) && in crocus_resource_configure_aux()
452 isl_surf_get_ccs_surf(&screen->isl_dev, &res->surf, NULL, in crocus_resource_configure_aux()
453 &res->aux.surf, 0); in crocus_resource_configure_aux()
458 if (res->mod_info && has_ccs) { in crocus_resource_configure_aux()
459 res->aux.usage = res->mod_info->aux_usage; in crocus_resource_configure_aux()
461 res->aux.usage = ISL_AUX_USAGE_MCS; in crocus_resource_configure_aux()
463 res->aux.usage = ISL_AUX_USAGE_HIZ; in crocus_resource_configure_aux()
465 if (isl_format_supports_ccs_d(devinfo, res->surf.format)) in crocus_resource_configure_aux()
466 res->aux.usage = ISL_AUX_USAGE_CCS_D; in crocus_resource_configure_aux()
472 assert(!res->aux.bo); in crocus_resource_configure_aux()
474 switch (res->aux.usage) { in crocus_resource_configure_aux()
477 res->aux.surf.levels = 0; in crocus_resource_configure_aux()
478 return !res->mod_info || res->mod_info->aux_usage == ISL_AUX_USAGE_NONE; in crocus_resource_configure_aux()
510 isl_drm_modifier_get_default_aux_state(res->mod_info->modifier); in crocus_resource_configure_aux()
520 res->aux.state = create_aux_state_map(res, initial_state); in crocus_resource_configure_aux()
521 if (!res->aux.state) in crocus_resource_configure_aux()
525 res->aux.offset = in crocus_resource_configure_aux()
526 !res->mod_info || res->mod_info->aux_usage == res->aux.usage ? in crocus_resource_configure_aux()
527 ALIGN(res->surf.size_B, res->aux.surf.alignment_B) : 0; in crocus_resource_configure_aux()
528 uint64_t size = res->aux.surf.size_B; in crocus_resource_configure_aux()
543 if (isl_aux_usage_has_hiz(res->aux.usage)) { in crocus_resource_configure_aux()
544 for (unsigned level = 0; level < res->surf.levels; ++level) { in crocus_resource_configure_aux()
545 uint32_t width = u_minify(res->surf.phys_level0_sa.width, level); in crocus_resource_configure_aux()
546 uint32_t height = u_minify(res->surf.phys_level0_sa.height, level); in crocus_resource_configure_aux()
553 res->aux.has_hiz |= 1 << level; in crocus_resource_configure_aux()
566 crocus_resource_init_aux_buf(struct crocus_resource *res, uint32_t alloc_flags) in crocus_resource_init_aux_buf() argument
569 void *map = crocus_bo_map(NULL, res->aux.bo, MAP_WRITE | MAP_RAW); in crocus_resource_init_aux_buf()
574 if (crocus_resource_get_aux_state(res, 0, 0) != ISL_AUX_STATE_AUX_INVALID) { in crocus_resource_init_aux_buf()
575 uint8_t memset_value = isl_aux_usage_has_mcs(res->aux.usage) ? 0xFF : 0; in crocus_resource_init_aux_buf()
576 memset((char*)map + res->aux.offset, memset_value, in crocus_resource_init_aux_buf()
577 res->aux.surf.size_B); in crocus_resource_init_aux_buf()
580 crocus_bo_unmap(res->aux.bo); in crocus_resource_init_aux_buf()
594 struct crocus_resource *res) in crocus_resource_alloc_separate_aux() argument
598 if (!crocus_resource_configure_aux(screen, res, false, &size, &alloc_flags)) in crocus_resource_alloc_separate_aux()
609 res->aux.bo = crocus_bo_alloc_tiled(screen->bufmgr, "aux buffer", size, 4096, in crocus_resource_alloc_separate_aux()
610 isl_tiling_to_i915_tiling(res->aux.surf.tiling), in crocus_resource_alloc_separate_aux()
611 res->aux.surf.row_pitch_B, alloc_flags); in crocus_resource_alloc_separate_aux()
612 if (!res->aux.bo) { in crocus_resource_alloc_separate_aux()
616 if (!crocus_resource_init_aux_buf(res, alloc_flags)) in crocus_resource_alloc_separate_aux()
624 struct crocus_resource *res) in crocus_resource_finish_aux_import() argument
627 assert(crocus_resource_unfinished_aux_import(res)); in crocus_resource_finish_aux_import()
628 assert(!res->mod_info->supports_clear_color); in crocus_resource_finish_aux_import()
630 struct crocus_resource *aux_res = (void *) res->base.b.next; in crocus_resource_finish_aux_import()
634 assert(res->bo == aux_res->aux.bo); in crocus_resource_finish_aux_import()
636 res->aux.bo = aux_res->aux.bo; in crocus_resource_finish_aux_import()
638 res->aux.offset = aux_res->aux.offset; in crocus_resource_finish_aux_import()
640 assert(res->bo->size >= (res->aux.offset + res->aux.surf.size_B)); in crocus_resource_finish_aux_import()
641 assert(aux_res->aux.surf.row_pitch_B == res->aux.surf.row_pitch_B); in crocus_resource_finish_aux_import()
643 crocus_resource_destroy(&screen->base, res->base.b.next); in crocus_resource_finish_aux_import()
644 res->base.b.next = NULL; in crocus_resource_finish_aux_import()
652 struct crocus_resource *res = crocus_alloc_resource(pscreen, templ); in crocus_resource_create_for_buffer() local
660 res->internal_format = templ->format; in crocus_resource_create_for_buffer()
661 res->surf.tiling = ISL_TILING_LINEAR; in crocus_resource_create_for_buffer()
665 res->bo = crocus_bo_alloc(screen->bufmgr, name, templ->width0); in crocus_resource_create_for_buffer()
666 if (!res->bo) { in crocus_resource_create_for_buffer()
667 crocus_resource_destroy(pscreen, &res->base.b); in crocus_resource_create_for_buffer()
671 return &res->base.b; in crocus_resource_create_for_buffer()
682 struct crocus_resource *res = crocus_alloc_resource(pscreen, templ); in crocus_resource_create_with_modifiers() local
684 if (!res) in crocus_resource_create_with_modifiers()
701 crocus_resource_configure_main(screen, res, templ, modifier, 0); in crocus_resource_create_with_modifiers()
718 if (!crocus_resource_configure_aux(screen, res, false, &aux_size, in crocus_resource_create_with_modifiers()
727 MAX2(res->surf.size_B, res->aux.offset + aux_size); in crocus_resource_create_with_modifiers()
728 uint32_t alignment = MAX2(4096, res->surf.alignment_B); in crocus_resource_create_with_modifiers()
729 res->bo = crocus_bo_alloc_tiled(screen->bufmgr, name, bo_size, alignment, in crocus_resource_create_with_modifiers()
730 isl_tiling_to_i915_tiling(res->surf.tiling), in crocus_resource_create_with_modifiers()
731 res->surf.row_pitch_B, flags); in crocus_resource_create_with_modifiers()
733 if (!res->bo) in crocus_resource_create_with_modifiers()
737 res->aux.bo = res->bo; in crocus_resource_create_with_modifiers()
738 crocus_bo_reference(res->aux.bo); in crocus_resource_create_with_modifiers()
739 if (!crocus_resource_init_aux_buf(res, flags)) in crocus_resource_create_with_modifiers()
748 .width0 = res->base.b.width0, in crocus_resource_create_with_modifiers()
749 .height0 = res->base.b.height0, in crocus_resource_create_with_modifiers()
750 .depth0 = res->base.b.depth0, in crocus_resource_create_with_modifiers()
751 .last_level = res->base.b.last_level, in crocus_resource_create_with_modifiers()
752 .nr_samples = res->base.b.nr_samples, in crocus_resource_create_with_modifiers()
753 .nr_storage_samples = res->base.b.nr_storage_samples, in crocus_resource_create_with_modifiers()
754 .array_size = res->base.b.array_size, in crocus_resource_create_with_modifiers()
756 .target = res->base.b.target, in crocus_resource_create_with_modifiers()
758res->shadow = (struct crocus_resource *)screen->base.resource_create(&screen->base, &templ_shadow); in crocus_resource_create_with_modifiers()
759 assert(res->shadow); in crocus_resource_create_with_modifiers()
762 return &res->base.b; in crocus_resource_create_with_modifiers()
766 crocus_resource_destroy(pscreen, &res->base.b); in crocus_resource_create_with_modifiers()
802 struct crocus_resource *res = crocus_alloc_resource(pscreen, templ); in crocus_resource_from_user_memory() local
803 if (!res) in crocus_resource_from_user_memory()
808 res->internal_format = templ->format; in crocus_resource_from_user_memory()
809 res->bo = crocus_bo_create_userptr(bufmgr, "user", in crocus_resource_from_user_memory()
811 if (!res->bo) { in crocus_resource_from_user_memory()
812 free(res); in crocus_resource_from_user_memory()
816 util_range_add(&res->base.b, &res->valid_buffer_range, 0, templ->width0); in crocus_resource_from_user_memory()
818 return &res->base.b; in crocus_resource_from_user_memory()
831 struct crocus_resource *res = crocus_alloc_resource(pscreen, templ); in crocus_resource_from_handle() local
833 if (!res) in crocus_resource_from_handle()
838 res->bo = crocus_bo_import_dmabuf(bufmgr, whandle->handle, in crocus_resource_from_handle()
842 res->bo = crocus_bo_gem_create_from_name(bufmgr, "winsys image", in crocus_resource_from_handle()
848 if (!res->bo) in crocus_resource_from_handle()
851 res->offset = whandle->offset; in crocus_resource_from_handle()
852 res->external_format = whandle->format; in crocus_resource_from_handle()
857 whandle->modifier : tiling_to_modifier(res->bo->tiling_mode); in crocus_resource_from_handle()
860 crocus_resource_configure_main(screen, res, templ, modifier, in crocus_resource_from_handle()
863 assert(res->bo->tiling_mode == in crocus_resource_from_handle()
864 isl_tiling_to_i915_tiling(res->surf.tiling)); in crocus_resource_from_handle()
868 if (!crocus_resource_alloc_separate_aux(screen, res)) in crocus_resource_from_handle()
871 if (res->mod_info->aux_usage != ISL_AUX_USAGE_NONE) { in crocus_resource_from_handle()
874 UNUSED bool ok = crocus_resource_configure_aux(screen, res, true, &size, in crocus_resource_from_handle()
890 res->aux.surf.row_pitch_B = whandle->stride; in crocus_resource_from_handle()
891 res->aux.offset = whandle->offset; in crocus_resource_from_handle()
892 res->aux.bo = res->bo; in crocus_resource_from_handle()
893 res->bo = NULL; in crocus_resource_from_handle()
896 return &res->base.b; in crocus_resource_from_handle()
899 crocus_resource_destroy(pscreen, &res->base.b); in crocus_resource_from_handle()
911 struct crocus_resource *res = crocus_alloc_resource(pscreen, templ); in crocus_resource_from_memobj() local
913 if (!res) in crocus_resource_from_memobj()
922 crocus_resource_configure_main(screen, res, templ, DRM_FORMAT_MOD_INVALID, 0); in crocus_resource_from_memobj()
926 res->bo = memobj->bo; in crocus_resource_from_memobj()
927 res->offset = offset; in crocus_resource_from_memobj()
928 res->external_format = memobj->format; in crocus_resource_from_memobj()
932 return &res->base.b; in crocus_resource_from_memobj()
939 struct crocus_resource *res = (void *) resource; in crocus_flush_resource() local
940 const struct isl_drm_modifier_info *mod = res->mod_info; in crocus_flush_resource()
942 crocus_resource_prepare_access(ice, res, in crocus_flush_resource()
953 struct crocus_resource *res = (struct crocus_resource *)resource; in crocus_resource_disable_aux_on_first_query() local
955 res->mod_info && res->mod_info->aux_usage != ISL_AUX_USAGE_NONE; in crocus_resource_disable_aux_on_first_query()
962 (!(usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH) && res->aux.usage != 0) && in crocus_resource_disable_aux_on_first_query()
964 crocus_resource_disable_aux(res); in crocus_resource_disable_aux_on_first_query()
980 struct crocus_resource *res = (struct crocus_resource *)resource; in crocus_resource_get_param() local
982 res->mod_info && res->mod_info->aux_usage != ISL_AUX_USAGE_NONE; in crocus_resource_get_param()
987 if (crocus_resource_unfinished_aux_import(res)) in crocus_resource_get_param()
988 crocus_resource_finish_aux_import(pscreen, res); in crocus_resource_get_param()
990 struct crocus_bo *bo = wants_aux ? res->aux.bo : res->bo; in crocus_resource_get_param()
997 *value = util_format_get_num_planes(res->external_format); in crocus_resource_get_param()
1006 *value = wants_aux ? res->aux.surf.row_pitch_B : res->surf.row_pitch_B; in crocus_resource_get_param()
1009 *value = wants_aux ? res->aux.offset : 0; in crocus_resource_get_param()
1012 *value = res->mod_info ? res->mod_info->modifier : in crocus_resource_get_param()
1013 tiling_to_modifier(isl_tiling_to_i915_tiling(res->surf.tiling)); in crocus_resource_get_param()
1050 struct crocus_resource *res = (struct crocus_resource *)resource; in crocus_resource_get_handle() local
1052 res->mod_info && res->mod_info->aux_usage != ISL_AUX_USAGE_NONE; in crocus_resource_get_handle()
1058 assert(res->aux.bo); in crocus_resource_get_handle()
1059 bo = res->aux.bo; in crocus_resource_get_handle()
1060 whandle->stride = res->aux.surf.row_pitch_B; in crocus_resource_get_handle()
1061 whandle->offset = res->aux.offset; in crocus_resource_get_handle()
1064 whandle->stride = res->surf.row_pitch_B; in crocus_resource_get_handle()
1065 bo = res->bo; in crocus_resource_get_handle()
1067 whandle->format = res->external_format; in crocus_resource_get_handle()
1069 res->mod_info ? res->mod_info->modifier in crocus_resource_get_handle()
1070 : tiling_to_modifier(res->bo->tiling_mode); in crocus_resource_get_handle()
1074 res->mod_info ? res->mod_info->aux_usage : ISL_AUX_USAGE_NONE; in crocus_resource_get_handle()
1076 if (res->aux.usage != allowed_usage) { in crocus_resource_get_handle()
1077 enum isl_aux_state aux_state = crocus_resource_get_aux_state(res, 0, 0); in crocus_resource_get_handle()
1107 struct crocus_resource *res) in resource_is_busy() argument
1109 bool busy = crocus_bo_busy(res->bo); in resource_is_busy()
1112 busy |= crocus_batch_references(&ice->batches[i], res->bo); in resource_is_busy()
1152 struct crocus_resource *res = (void *) resource; in crocus_invalidate_resource() local
1158 if (res->valid_buffer_range.start > res->valid_buffer_range.end) in crocus_invalidate_resource()
1161 if (!resource_is_busy(ice, res)) { in crocus_invalidate_resource()
1165 util_range_set_empty(&res->valid_buffer_range); in crocus_invalidate_resource()
1172 if (res->bo->userptr) in crocus_invalidate_resource()
1175 struct crocus_bo *old_bo = res->bo; in crocus_invalidate_resource()
1177 crocus_bo_alloc(screen->bufmgr, res->bo->name, resource->width0); in crocus_invalidate_resource()
1183 res->bo = new_bo; in crocus_invalidate_resource()
1188 screen->vtbl.rebind_buffer(ice, res); in crocus_invalidate_resource()
1190 util_range_set_empty(&res->valid_buffer_range); in crocus_invalidate_resource()
1238 struct crocus_resource *res = (void *) xfer->resource; in crocus_map_copy_region() local
1251 .format = res->internal_format, in crocus_map_copy_region()
1307 crocus_resource_get_image_offset(struct crocus_resource *res, in crocus_resource_get_image_offset() argument
1311 get_image_offset_el(&res->surf, level, z, x, y); in crocus_resource_get_image_offset()
1375 struct crocus_resource *res = (struct crocus_resource *) xfer->resource; in crocus_unmap_s8() local
1376 struct isl_surf *surf = &res->surf; in crocus_unmap_s8()
1381 crocus_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS); in crocus_unmap_s8()
1408 struct crocus_resource *res = (struct crocus_resource *) xfer->resource; in crocus_map_s8() local
1409 struct isl_surf *surf = &res->surf; in crocus_map_s8()
1429 crocus_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS); in crocus_map_s8()
1481 struct crocus_resource *res = (struct crocus_resource *) xfer->resource; in crocus_unmap_tiled_memcpy() local
1482 struct isl_surf *surf = &res->surf; in crocus_unmap_tiled_memcpy()
1486 crocus_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS); in crocus_unmap_tiled_memcpy()
1509 struct crocus_resource *res = (struct crocus_resource *) xfer->resource; in crocus_map_tiled_memcpy() local
1510 struct isl_surf *surf = &res->surf; in crocus_map_tiled_memcpy()
1529 crocus_bo_map(map->dbg, res->bo, (xfer->usage | MAP_RAW) & MAP_FLAGS); in crocus_map_tiled_memcpy()
1557 struct crocus_resource *res = (struct crocus_resource *) xfer->resource; in crocus_map_direct() local
1559 void *ptr = crocus_bo_map(map->dbg, res->bo, xfer->usage & MAP_FLAGS); in crocus_map_direct()
1561 if (res->base.b.target == PIPE_BUFFER) { in crocus_map_direct()
1567 struct isl_surf *surf = &res->surf; in crocus_map_direct()
1588 can_promote_to_async(const struct crocus_resource *res, in can_promote_to_async() argument
1596 return res->base.b.target == PIPE_BUFFER && (usage & PIPE_MAP_WRITE) && in can_promote_to_async()
1598 !util_ranges_intersect(&res->valid_buffer_range, box->x, in can_promote_to_async()
1611 struct crocus_resource *res = (struct crocus_resource *)resource; in crocus_transfer_map() local
1612 struct isl_surf *surf = &res->surf; in crocus_transfer_map()
1626 can_promote_to_async(res, box, usage)) { in crocus_transfer_map()
1633 map_would_stall = resource_is_busy(ice, res) || in crocus_transfer_map()
1634 crocus_has_invalid_primary(res, level, 1, box->z, box->depth); in crocus_transfer_map()
1667 util_ranges_intersect(&res->valid_buffer_range, box->x, in crocus_transfer_map()
1671 util_range_add(&res->base.b, &res->valid_buffer_range, box->x, box->x + box->width); in crocus_transfer_map()
1693 !crocus_has_invalid_primary(res, level, 1, box->z, box->depth)) in crocus_transfer_map()
1711 crocus_resource_access_raw(ice, res, in crocus_transfer_map()
1718 if (crocus_batch_references(&ice->batches[i], res->bo)) in crocus_transfer_map()
1742 struct crocus_resource *res = (struct crocus_resource *) xfer->resource; in crocus_transfer_flush_region() local
1750 if (res->base.b.target == PIPE_BUFFER) { in crocus_transfer_flush_region()
1755 history_flush |= crocus_flush_bits_for_history(res); in crocus_transfer_flush_region()
1757 util_range_add(&res->base.b, &res->valid_buffer_range, box->x, box->x + box->width); in crocus_transfer_flush_region()
1778 crocus_dirty_for_history(ice, res); in crocus_transfer_flush_region()
1814 struct crocus_resource *res) in crocus_dirty_for_history() argument
1818 if (res->bind_history & PIPE_BIND_CONSTANT_BUFFER) { in crocus_dirty_for_history()
1819 stage_dirty |= ((uint64_t)res->bind_stages) << CROCUS_SHIFT_FOR_STAGE_DIRTY_CONSTANTS; in crocus_dirty_for_history()
1830 crocus_flush_bits_for_history(struct crocus_resource *res) in crocus_flush_bits_for_history() argument
1834 if (res->bind_history & PIPE_BIND_CONSTANT_BUFFER) { in crocus_flush_bits_for_history()
1839 if (res->bind_history & PIPE_BIND_SAMPLER_VIEW) in crocus_flush_bits_for_history()
1842 if (res->bind_history & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER)) in crocus_flush_bits_for_history()
1845 if (res->bind_history & (PIPE_BIND_SHADER_BUFFER | PIPE_BIND_SHADER_IMAGE)) in crocus_flush_bits_for_history()
1854 struct crocus_resource *res, in crocus_flush_and_dirty_for_history() argument
1858 if (res->base.b.target != PIPE_BUFFER) in crocus_flush_and_dirty_for_history()
1861 uint32_t flush = crocus_flush_bits_for_history(res) | extra_flags; in crocus_flush_and_dirty_for_history()
1865 crocus_dirty_for_history(ice, res); in crocus_flush_and_dirty_for_history()
1870 struct crocus_resource *res, in crocus_resource_set_clear_color() argument
1873 if (memcmp(&res->aux.clear_color, &color, sizeof(color)) != 0) { in crocus_resource_set_clear_color()
1874 res->aux.clear_color = color; in crocus_resource_set_clear_color()
1882 crocus_resource_get_clear_color(const struct crocus_resource *res) in crocus_resource_get_clear_color() argument
1884 assert(res->aux.bo); in crocus_resource_get_clear_color()
1886 return res->aux.clear_color; in crocus_resource_get_clear_color()
1892 struct crocus_resource *res = (void *) p_res; in crocus_resource_get_internal_format() local
1893 return res->internal_format; in crocus_resource_get_internal_format()