• Home
  • Raw
  • Download

Lines Matching refs:pdev

92 dzn_physical_device_get_extensions(struct dzn_physical_device *pdev)  in dzn_physical_device_get_extensions()  argument
94 pdev->vk.supported_extensions = (struct vk_device_extension_table) { in dzn_physical_device_get_extensions()
137 dzn_physical_device_destroy(struct dzn_physical_device *pdev) in dzn_physical_device_destroy() argument
139 struct dzn_instance *instance = container_of(pdev->vk.instance, struct dzn_instance, vk); in dzn_physical_device_destroy()
141 list_del(&pdev->link); in dzn_physical_device_destroy()
143 if (pdev->dev) in dzn_physical_device_destroy()
144 ID3D12Device1_Release(pdev->dev); in dzn_physical_device_destroy()
146 if (pdev->adapter) in dzn_physical_device_destroy()
147 IUnknown_Release(pdev->adapter); in dzn_physical_device_destroy()
149 dzn_wsi_finish(pdev); in dzn_physical_device_destroy()
150 vk_physical_device_finish(&pdev->vk); in dzn_physical_device_destroy()
151 vk_free(&instance->vk.alloc, pdev); in dzn_physical_device_destroy()
165 list_for_each_entry_safe(struct dzn_physical_device, pdev, in dzn_instance_destroy()
167 dzn_physical_device_destroy(pdev); in dzn_instance_destroy()
264 dzn_physical_device_init_uuids(struct dzn_physical_device *pdev) in dzn_physical_device_init_uuids() argument
280 _mesa_sha1_update(&sha1_ctx, &pdev->options, sizeof(pdev->options)); in dzn_physical_device_init_uuids()
281 _mesa_sha1_update(&sha1_ctx, &pdev->options2, sizeof(pdev->options2)); in dzn_physical_device_init_uuids()
283 memcpy(pdev->pipeline_cache_uuid, sha1, VK_UUID_SIZE); in dzn_physical_device_init_uuids()
291 memcpy(pdev->driver_uuid, sha1, VK_UUID_SIZE); in dzn_physical_device_init_uuids()
295 _mesa_sha1_update(&sha1_ctx, &pdev->desc.vendor_id, sizeof(pdev->desc.vendor_id)); in dzn_physical_device_init_uuids()
296 _mesa_sha1_update(&sha1_ctx, &pdev->desc.device_id, sizeof(pdev->desc.device_id)); in dzn_physical_device_init_uuids()
297 _mesa_sha1_update(&sha1_ctx, &pdev->desc.subsys_id, sizeof(pdev->desc.subsys_id)); in dzn_physical_device_init_uuids()
298 _mesa_sha1_update(&sha1_ctx, &pdev->desc.revision, sizeof(pdev->desc.revision)); in dzn_physical_device_init_uuids()
300 memcpy(pdev->device_uuid, sha1, VK_UUID_SIZE); in dzn_physical_device_init_uuids()
313 struct dzn_physical_device *pdev = in dzn_physical_device_create() local
314 vk_zalloc(&instance->vk.alloc, sizeof(*pdev), 8, in dzn_physical_device_create()
317 if (!pdev) in dzn_physical_device_create()
329 vk_physical_device_init(&pdev->vk, &instance->vk, in dzn_physical_device_create()
333 vk_free(&instance->vk.alloc, pdev); in dzn_physical_device_create()
337 mtx_init(&pdev->dev_lock, mtx_plain); in dzn_physical_device_create()
338 pdev->desc = *desc; in dzn_physical_device_create()
339 pdev->adapter = adapter; in dzn_physical_device_create()
341 list_addtail(&pdev->link, &instance->physical_devices); in dzn_physical_device_create()
346 pdev->sync_types[num_sync_types++] = &dzn_sync_type; in dzn_physical_device_create()
347 pdev->sync_types[num_sync_types++] = &instance->sync_binary_type.sync; in dzn_physical_device_create()
348 pdev->sync_types[num_sync_types++] = &vk_sync_dummy_type; in dzn_physical_device_create()
349 pdev->sync_types[num_sync_types] = NULL; in dzn_physical_device_create()
351 pdev->vk.supported_sync_types = pdev->sync_types; in dzn_physical_device_create()
353 pdev->vk.pipeline_cache_import_ops = dzn_pipeline_cache_import_ops; in dzn_physical_device_create()
357 result = dzn_wsi_init(pdev); in dzn_physical_device_create()
359 dzn_physical_device_destroy(pdev); in dzn_physical_device_create()
363 dzn_physical_device_get_extensions(pdev); in dzn_physical_device_create()
369 dzn_physical_device_cache_caps(struct dzn_physical_device *pdev) in dzn_physical_device_cache_caps() argument
384 …ID3D12Device1_CheckFeatureSupport(pdev->dev, D3D12_FEATURE_FEATURE_LEVELS, &levels, sizeof(levels)… in dzn_physical_device_cache_caps()
385 pdev->feature_level = levels.MaxSupportedFeatureLevel; in dzn_physical_device_cache_caps()
387 …ID3D12Device1_CheckFeatureSupport(pdev->dev, D3D12_FEATURE_ARCHITECTURE1, &pdev->architecture, siz… in dzn_physical_device_cache_caps()
388 …ID3D12Device1_CheckFeatureSupport(pdev->dev, D3D12_FEATURE_D3D12_OPTIONS, &pdev->options, sizeof(p… in dzn_physical_device_cache_caps()
389 …ID3D12Device1_CheckFeatureSupport(pdev->dev, D3D12_FEATURE_D3D12_OPTIONS2, &pdev->options2, sizeof… in dzn_physical_device_cache_caps()
390 …ID3D12Device1_CheckFeatureSupport(pdev->dev, D3D12_FEATURE_D3D12_OPTIONS3, &pdev->options3, sizeof… in dzn_physical_device_cache_caps()
392 pdev->queue_families[pdev->queue_family_count++] = (struct dzn_queue_family) { in dzn_physical_device_cache_caps()
406 pdev->queue_families[pdev->queue_family_count++] = (struct dzn_queue_family) { in dzn_physical_device_cache_caps()
419 pdev->queue_families[pdev->queue_family_count++] = (struct dzn_queue_family) { in dzn_physical_device_cache_caps()
431 assert(pdev->queue_family_count <= ARRAY_SIZE(pdev->queue_families)); in dzn_physical_device_cache_caps()
441 ID3D12Device1_CreateCommandQueue(pdev->dev, &queue_desc, in dzn_physical_device_cache_caps()
447 pdev->timestamp_period = 1000000000.0f / ts_freq; in dzn_physical_device_cache_caps()
452 dzn_physical_device_init_memory(struct dzn_physical_device *pdev) in dzn_physical_device_init_memory() argument
454 VkPhysicalDeviceMemoryProperties *mem = &pdev->memory; in dzn_physical_device_init_memory()
458 .size = pdev->desc.shared_system_memory, in dzn_physical_device_init_memory()
474 if (!pdev->architecture.UMA) { in dzn_physical_device_init_memory()
476 .size = pdev->desc.dedicated_video_memory, in dzn_physical_device_init_memory()
491 if (pdev->options.ResourceHeapTier == D3D12_RESOURCE_HEAP_TIER_1) { in dzn_physical_device_init_memory()
511 pdev->heap_flags_for_mem_type[mem->memoryTypeCount] = flag; in dzn_physical_device_init_memory()
520 dzn_physical_device_get_heap_flags_for_mem_type(const struct dzn_physical_device *pdev, in dzn_physical_device_get_heap_flags_for_mem_type() argument
523 return pdev->heap_flags_for_mem_type[mem_type]; in dzn_physical_device_get_heap_flags_for_mem_type()
527 dzn_physical_device_get_mem_type_mask_for_resource(const struct dzn_physical_device *pdev, in dzn_physical_device_get_mem_type_mask_for_resource() argument
530 if (pdev->options.ResourceHeapTier > D3D12_RESOURCE_HEAP_TIER_1) in dzn_physical_device_get_mem_type_mask_for_resource()
531 return (1u << pdev->memory.memoryTypeCount) - 1; in dzn_physical_device_get_mem_type_mask_for_resource()
542 for (unsigned i = 0; i < pdev->memory.memoryTypeCount; ++i) { in dzn_physical_device_get_mem_type_mask_for_resource()
543 if ((pdev->heap_flags_for_mem_type[i] & deny_flag) == D3D12_HEAP_FLAG_NONE) in dzn_physical_device_get_mem_type_mask_for_resource()
570 dzn_physical_device_get_d3d12_dev(struct dzn_physical_device *pdev) in dzn_physical_device_get_d3d12_dev() argument
572 struct dzn_instance *instance = container_of(pdev->vk.instance, struct dzn_instance, vk); in dzn_physical_device_get_d3d12_dev()
574 mtx_lock(&pdev->dev_lock); in dzn_physical_device_get_d3d12_dev()
575 if (!pdev->dev) { in dzn_physical_device_get_d3d12_dev()
576 pdev->dev = d3d12_create_device(pdev->adapter, !instance->dxil_validator); in dzn_physical_device_get_d3d12_dev()
578 dzn_physical_device_cache_caps(pdev); in dzn_physical_device_get_d3d12_dev()
579 dzn_physical_device_init_memory(pdev); in dzn_physical_device_get_d3d12_dev()
580 dzn_physical_device_init_uuids(pdev); in dzn_physical_device_get_d3d12_dev()
582 mtx_unlock(&pdev->dev_lock); in dzn_physical_device_get_d3d12_dev()
584 return pdev->dev; in dzn_physical_device_get_d3d12_dev()
588 dzn_physical_device_get_format_support(struct dzn_physical_device *pdev, in dzn_physical_device_get_format_support() argument
616 ID3D12Device2 *dev = dzn_physical_device_get_d3d12_dev(pdev); in dzn_physical_device_get_format_support()
656 dzn_physical_device_get_format_properties(struct dzn_physical_device *pdev, in dzn_physical_device_get_format_properties() argument
661 dzn_physical_device_get_format_support(pdev, format); in dzn_physical_device_get_format_properties()
758 dzn_physical_device_get_image_format_properties(struct dzn_physical_device *pdev, in dzn_physical_device_get_image_format_properties() argument
809 dzn_physical_device_get_format_support(pdev, info->format); in dzn_physical_device_get_image_format_properties()
814 ID3D12Device2 *dev = dzn_physical_device_get_d3d12_dev(pdev); in dzn_physical_device_get_image_format_properties()
931 VK_FROM_HANDLE(dzn_physical_device, pdev, physicalDevice); in dzn_GetPhysicalDeviceFormatProperties2()
933 dzn_physical_device_get_format_properties(pdev, format, pFormatProperties); in dzn_GetPhysicalDeviceFormatProperties2()
941 VK_FROM_HANDLE(dzn_physical_device, pdev, physicalDevice); in dzn_GetPhysicalDeviceImageFormatProperties2()
943 return dzn_physical_device_get_image_format_properties(pdev, info, props); in dzn_GetPhysicalDeviceImageFormatProperties2()
1038 list_for_each_entry(struct dzn_physical_device, pdev, &instance->physical_devices, link) { in dzn_EnumeratePhysicalDevices()
1040 *i = dzn_physical_device_to_handle(pdev); in dzn_EnumeratePhysicalDevices()
1055 dzn_physical_device_supports_compressed_format(struct dzn_physical_device *pdev, in dzn_physical_device_supports_compressed_format() argument
1065 dzn_physical_device_get_format_properties(pdev, formats[i], &props); in dzn_physical_device_supports_compressed_format()
1074 dzn_physical_device_supports_bc(struct dzn_physical_device *pdev) in dzn_physical_device_supports_bc() argument
1095 return dzn_physical_device_supports_compressed_format(pdev, formats, ARRAY_SIZE(formats)); in dzn_physical_device_supports_bc()
1099 dzn_physical_device_supports_depth_bounds(struct dzn_physical_device *pdev) in dzn_physical_device_supports_depth_bounds() argument
1101 dzn_physical_device_get_d3d12_dev(pdev); in dzn_physical_device_supports_depth_bounds()
1103 return pdev->options2.DepthBoundsTestSupported; in dzn_physical_device_supports_depth_bounds()
1110 VK_FROM_HANDLE(dzn_physical_device, pdev, physicalDevice); in dzn_GetPhysicalDeviceFeatures2()
1127 .depthBounds = dzn_physical_device_supports_depth_bounds(pdev), in dzn_GetPhysicalDeviceFeatures2()
1135 .textureCompressionBC = dzn_physical_device_supports_bc(pdev), in dzn_GetPhysicalDeviceFeatures2()
1676 VK_FROM_HANDLE(dzn_physical_device, pdev, physicalDevice); in dzn_GetPhysicalDeviceQueueFamilyProperties2()
1680 (void)dzn_physical_device_get_d3d12_dev(pdev); in dzn_GetPhysicalDeviceQueueFamilyProperties2()
1682 for (uint32_t i = 0; i < pdev->queue_family_count; i++) { in dzn_GetPhysicalDeviceQueueFamilyProperties2()
1684 p->queueFamilyProperties = pdev->queue_families[i].props; in dzn_GetPhysicalDeviceQueueFamilyProperties2()
1697 VK_FROM_HANDLE(dzn_physical_device, pdev, physicalDevice); in dzn_GetPhysicalDeviceMemoryProperties()
1700 (void)dzn_physical_device_get_d3d12_dev(pdev); in dzn_GetPhysicalDeviceMemoryProperties()
1701 *pMemoryProperties = pdev->memory; in dzn_GetPhysicalDeviceMemoryProperties()
1868 …struct dzn_physical_device *pdev = container_of(device->vk.physical, struct dzn_physical_device, v… in dzn_queue_init() local
1876 assert(pCreateInfo->queueFamilyIndex < pdev->queue_family_count); in dzn_queue_init()
1879 pdev->queue_families[pCreateInfo->queueFamilyIndex].desc; in dzn_queue_init()
1907 VK_FROM_HANDLE(dzn_physical_device, pdev, physicalDevice); in check_physical_device_features()
1911 pdev->vk.dispatch_table.GetPhysicalDeviceFeatures(physicalDevice, &supported_features); in check_physical_device_features()
2016 dzn_device_create(struct dzn_physical_device *pdev, in dzn_device_create() argument
2021 struct dzn_instance *instance = container_of(pdev->vk.instance, struct dzn_instance, vk); in dzn_device_create()
2035 return vk_error(pdev, VK_ERROR_OUT_OF_HOST_MEMORY); in dzn_device_create()
2058 vk_device_init(&device->vk, &pdev->vk, &dispatch_table, pCreateInfo, pAllocator); in dzn_device_create()
2071 device->dev = dzn_physical_device_get_d3d12_dev(pdev); in dzn_device_create()
2074 return vk_error(pdev, VK_ERROR_INITIALIZATION_FAILED); in dzn_device_create()
2638 struct dzn_physical_device *pdev = in dzn_GetBufferMemoryRequirements2() local
2653 dzn_physical_device_get_mem_type_mask_for_resource(pdev, &buffer->desc); in dzn_GetBufferMemoryRequirements2()