Lines Matching defs:device

94 image_binding_grow(const struct anv_device *device,
135 return vk_errorf(device,
146 return vk_errorf(device,
156 return vk_errorf(device, VK_ERROR_UNKNOWN,
159 return vk_errorf(device,
309 add_surface(struct anv_device *device,
318 return image_binding_grow(device, image, binding, offset,
644 add_aux_state_tracking_buffer(struct anv_device *device,
648 assert(image && device);
653 const unsigned clear_color_state_size = device->info.ver >= 10 ?
654 device->isl_dev.ss.clear_color_state_size :
655 device->isl_dev.ss.clear_value_size;
686 return image_binding_grow(device, image, binding,
701 add_aux_surface_if_supported(struct anv_device *device,
734 if (device->info.ver == 7) {
744 if (device->info.ver == 8 && image->vk.samples > 1) {
753 ok = isl_surf_get_hiz_surf(&device->isl_dev,
759 if (!isl_surf_supports_ccs(&device->isl_dev,
774 assert(device->info.ver >= 12);
777 assert(device->info.ver >= 12);
781 result = add_surface(device, image, &image->planes[plane].aux_surface,
788 return add_aux_state_tracking_buffer(device, image, plane);
794 if (!isl_surf_supports_ccs(&device->isl_dev,
824 ok = isl_surf_get_ccs_surf(&device->isl_dev,
833 if (anv_formats_ccs_e_compatible(&device->info, image->vk.create_flags,
837 } else if (device->info.ver >= 12) {
847 if (!device->physical->has_implicit_ccs) {
855 result = add_surface(device, image, &image->planes[plane].aux_surface,
861 return add_aux_state_tracking_buffer(device, image, plane);
864 ok = isl_surf_get_mcs_surf(&device->isl_dev,
872 result = add_surface(device, image, &image->planes[plane].aux_surface,
878 return add_aux_state_tracking_buffer(device, image, plane);
885 add_shadow_surface(struct anv_device *device,
894 ok = isl_surf_init(&device->isl_dev,
915 return add_surface(device, image, &image->planes[plane].shadow_surface,
927 add_primary_surface(struct anv_device *device,
939 ok = isl_surf_init(&device->isl_dev, &anv_surf->isl,
962 return add_surface(device, image, anv_surf,
1027 check_memory_bindings(const struct anv_device *device,
1141 check_drm_format_mod(const struct anv_device *device,
1155 assert(isl_drm_modifier_get_score(&device->info, isl_mod_info->modifier));
1185 return vk_errorf(device, VK_ERROR_UNKNOWN,
1201 struct anv_device *device,
1208 const struct intel_device_info *devinfo = &device->info;
1231 result = add_primary_surface(device, image, plane, plane_format,
1238 result = add_shadow_surface(device, image, plane, plane_format,
1249 result = add_aux_surface_if_supported(device, image, plane, plane_format,
1265 struct anv_device *device,
1272 const struct intel_device_info *devinfo = &device->info;
1314 return vk_errorf(device,
1321 return vk_errorf(device,
1336 result = add_primary_surface(device, image, plane,
1347 result = add_aux_surface_if_supported(device, image, plane,
1362 choose_drm_format_mod(const struct anv_physical_device *device,
1369 uint32_t score = isl_drm_modifier_get_score(&device->info, modifiers[i]);
1402 alloc_private_binding(struct anv_device *device,
1420 return anv_device_alloc_bo(device, "image-binding-private",
1426 anv_image_init(struct anv_device *device, struct anv_image *image,
1434 vk_image_init(&device->vk, &image->vk, pCreateInfo);
1451 isl_mod_info = choose_drm_format_mod(device->physical,
1485 choose_isl_tiling_flags(&device->info, create_info, isl_mod_info,
1493 r = add_all_surfaces_explicit_layout(device, image, fmt_list,
1497 r = add_all_surfaces_implicit_layout(device, image, fmt_list, 0,
1505 r = alloc_private_binding(device, image, pCreateInfo);
1509 check_memory_bindings(device, image);
1511 r = check_drm_format_mod(device, image);
1520 can_fast_clear_with_non_zero_color(&device->info, image, p, fmt_list);
1533 struct anv_device *device =
1534 container_of(image->vk.base.device, struct anv_device, vk);
1542 anv_device_release_bo(device, image->bindings[ANV_IMAGE_MEMORY_BINDING_MAIN].address.bo);
1547 anv_device_release_bo(device, private_bo);
1561 anv_image_init_from_create_info(struct anv_device *device,
1568 return anv_image_init_from_gralloc(device, image, pCreateInfo,
1587 return anv_image_init(device, image, &create_info);
1596 ANV_FROM_HANDLE(anv_device, device, _device);
1606 return wsi_common_create_swapchain_image(&device->physical->wsi_device,
1614 vk_object_zalloc(&device->vk, pAllocator, sizeof(*image),
1617 return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
1619 VkResult result = anv_image_init_from_create_info(device, image,
1622 vk_object_free(&device->vk, pAllocator, image);
1635 ANV_FROM_HANDLE(anv_device, device, _device);
1641 assert(&device->vk == image->vk.base.device);
1644 vk_free2(&device->vk.alloc, pAllocator, image);
1651 resolve_ahw_image(struct anv_device *device,
1663 result = anv_device_get_bo_tiling(device, mem->bo, &tiling);
1673 enum isl_format isl_fmt = anv_get_isl_format(&device->info,
1697 result = add_all_surfaces_implicit_layout(device, image, NULL, stride,
1705 anv_image_get_memory_requirements(struct anv_device *device,
1715 * structure for the physical device is supported.
1719 uint32_t memory_types = (1ull << device->physical->memory.type_count) - 1;
1778 ANV_FROM_HANDLE(anv_device, device, _device);
1799 anv_image_get_memory_requirements(device, image, aspects,
1808 ANV_FROM_HANDLE(anv_device, device, _device);
1812 anv_image_init_from_create_info(device, &image, pInfo->pCreateInfo);
1818 anv_image_get_memory_requirements(device, &image, aspects,
1823 VkDevice device,
1832 VkDevice device,
1841 VkDevice device,
1854 ANV_FROM_HANDLE(anv_device, device, _device);
1864 resolve_ahw_image(device, image, mem);
1933 VkResult result = anv_image_bind_from_gralloc(device, image,
1971 if (!device->physical->has_implicit_ccs)
1996 VkDevice device,
2087 * @param devinfo The device information of the Intel GPU.
2290 * @param devinfo The device information of the Intel GPU.
2359 * @param devinfo The device information of the Intel GPU.
2443 alloc_surface_state(struct anv_device *device)
2445 return anv_state_pool_alloc(&device->surface_state_pool, 64, 64);
2465 anv_image_fill_surface_state(struct anv_device *device,
2503 assert(device->info.ver == 7);
2512 if (device->info.verx10 == 70)
2519 if (device->info.ver >= 9 && aspect == VK_IMAGE_ASPECT_DEPTH_BIT)
2529 !isl_has_matching_typed_storage_image_format(&device->info,
2536 isl_buffer_fill_state(&device->isl_dev, state_inout->state.map,
2542 .mocs = anv_mocs(device, address.bo, view_usage));
2554 isl_lower_storage_image_format(&device->info, view.format);
2556 assert(device->info.verx10 >= 125);
2558 assert(isl_formats_are_ccs_e_compatible(&device->info,
2589 isl_surf_get_uncompressed_surf(&device->isl_dev, isl_surf, &view,
2595 if (device->info.ver <= 8) {
2610 if (device->info.ver >= 10 && isl_aux_usage_has_fast_clears(aux_usage)) {
2611 clear_address = anv_image_get_clear_color_addr(device, image, aspect);
2615 isl_surf_fill_state(&device->isl_dev, state_inout->state.map,
2625 .mocs = anv_mocs(device, state_inout->address.bo,
2636 device->isl_dev.ss.aux_addr_offset;
2641 if (device->info.ver >= 10 && clear_address.bo) {
2643 device->isl_dev.ss.clear_color_state_offset;
2651 isl_surf_fill_image_param(&device->isl_dev, image_param_out,
2669 ANV_FROM_HANDLE(anv_device, device, _device);
2673 iview = vk_image_view_create(&device->vk, false, pCreateInfo,
2676 return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
2720 format = anv_get_format_plane(&device->info, iview->vk.view_format,
2754 iview->planes[vplane].optimal_sampler_surface_state.state = alloc_surface_state(device);
2755 iview->planes[vplane].general_sampler_surface_state.state = alloc_surface_state(device);
2758 anv_layout_to_aux_usage(&device->info, image, 1UL << iaspect_bit,
2762 anv_layout_to_aux_usage(&device->info, image, 1UL << iaspect_bit,
2766 anv_image_fill_surface_state(device, image, 1ULL << iaspect_bit,
2774 anv_image_fill_surface_state(device, image, 1ULL << iaspect_bit,
2786 anv_layout_to_aux_usage(&device->info, image, 1UL << iaspect_bit,
2789 iview->planes[vplane].storage_surface_state.state = alloc_surface_state(device);
2790 anv_image_fill_surface_state(device, image, 1ULL << iaspect_bit,
2800 alloc_surface_state(device);
2802 anv_image_fill_surface_state(device, image, 1ULL << iaspect_bit,
2808 device->info.ver >= 9 ? NULL :
2817 assert(isl_format_supports_typed_writes(&device->info,
2820 device->null_surface_state;
2834 ANV_FROM_HANDLE(anv_device, device, _device);
2842 * device->null_surface_state which always has offset == 0. We don't
2846 anv_state_pool_free(&device->surface_state_pool,
2851 anv_state_pool_free(&device->surface_state_pool,
2856 anv_state_pool_free(&device->surface_state_pool,
2861 anv_state_pool_free(&device->surface_state_pool,
2866 vk_image_view_destroy(&device->vk, pAllocator, &iview->vk);
2876 ANV_FROM_HANDLE(anv_device, device, _device);
2880 view = vk_object_alloc(&device->vk, pAllocator, sizeof(*view),
2883 return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
2886 format = anv_get_format_plane(&device->info, pCreateInfo->format,
2897 view->surface_state = alloc_surface_state(device);
2899 anv_fill_buffer_surface_state(device, view->surface_state,
2908 view->storage_surface_state = alloc_surface_state(device);
2909 view->lowered_storage_surface_state = alloc_surface_state(device);
2911 anv_fill_buffer_surface_state(device, view->storage_surface_state,
2917 isl_has_matching_typed_storage_image_format(&device->info,
2919 isl_lower_storage_image_format(&device->info, format.isl_format) :
2930 anv_fill_buffer_surface_state(device, view->lowered_storage_surface_state,
2937 isl_buffer_fill_image_param(&device->isl_dev,
2954 ANV_FROM_HANDLE(anv_device, device, _device);
2961 anv_state_pool_free(&device->surface_state_pool,
2965 anv_state_pool_free(&device->surface_state_pool,
2969 anv_state_pool_free(&device->surface_state_pool,
2972 vk_object_free(&device->vk, pAllocator, view);