mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
nouveau: implement PIPE_PCI caps
and also use the already fetched device_id instead of refetching it. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
This commit is contained in:
parent
eac61faf84
commit
1454347c85
3 changed files with 23 additions and 30 deletions
|
|
@ -201,10 +201,6 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
|
||||
case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
|
||||
case PIPE_CAP_QUERY_BUFFER_OBJECT:
|
||||
case PIPE_CAP_PCI_GROUP:
|
||||
case PIPE_CAP_PCI_BUS:
|
||||
case PIPE_CAP_PCI_DEVICE:
|
||||
case PIPE_CAP_PCI_FUNCTION:
|
||||
case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
|
||||
case PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR:
|
||||
case PIPE_CAP_CULL_DISTANCE:
|
||||
|
|
@ -253,20 +249,23 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_IMAGE_STORE_FORMATTED:
|
||||
return 0;
|
||||
|
||||
case PIPE_CAP_PCI_GROUP:
|
||||
return dev->info.pci.domain;
|
||||
case PIPE_CAP_PCI_BUS:
|
||||
return dev->info.pci.bus;
|
||||
case PIPE_CAP_PCI_DEVICE:
|
||||
return dev->info.pci.dev;
|
||||
case PIPE_CAP_PCI_FUNCTION:
|
||||
return dev->info.pci.func;
|
||||
|
||||
case PIPE_CAP_MAX_GS_INVOCATIONS:
|
||||
return 32;
|
||||
case PIPE_CAP_MAX_SHADER_BUFFER_SIZE_UINT:
|
||||
return 1 << 27;
|
||||
case PIPE_CAP_VENDOR_ID:
|
||||
return 0x10de;
|
||||
case PIPE_CAP_DEVICE_ID: {
|
||||
uint64_t device_id;
|
||||
if (nouveau_getparam(dev, NOUVEAU_GETPARAM_PCI_DEVICE, &device_id)) {
|
||||
NOUVEAU_ERR("NOUVEAU_GETPARAM_PCI_DEVICE failed.\n");
|
||||
return -1;
|
||||
}
|
||||
return device_id;
|
||||
}
|
||||
case PIPE_CAP_DEVICE_ID:
|
||||
return dev->info.device_id;
|
||||
case PIPE_CAP_ACCELERATED:
|
||||
return 1;
|
||||
case PIPE_CAP_VIDEO_MEMORY:
|
||||
|
|
|
|||
|
|
@ -275,10 +275,13 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
return class_3d >= NVA3_3D_CLASS;
|
||||
|
||||
case PIPE_CAP_PCI_GROUP:
|
||||
return dev->info.pci.domain;
|
||||
case PIPE_CAP_PCI_BUS:
|
||||
return dev->info.pci.bus;
|
||||
case PIPE_CAP_PCI_DEVICE:
|
||||
return dev->info.pci.dev;
|
||||
case PIPE_CAP_PCI_FUNCTION:
|
||||
return 0;
|
||||
return dev->info.pci.func;
|
||||
|
||||
case PIPE_CAP_MULTISAMPLE_Z_RESOLVE: /* potentially supported on some hw */
|
||||
case PIPE_CAP_INTEGER_MULTIPLY_32X16: /* could be done */
|
||||
|
|
@ -289,14 +292,8 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
|
||||
case PIPE_CAP_VENDOR_ID:
|
||||
return 0x10de;
|
||||
case PIPE_CAP_DEVICE_ID: {
|
||||
uint64_t device_id;
|
||||
if (nouveau_getparam(dev, NOUVEAU_GETPARAM_PCI_DEVICE, &device_id)) {
|
||||
NOUVEAU_ERR("NOUVEAU_GETPARAM_PCI_DEVICE failed.\n");
|
||||
return -1;
|
||||
}
|
||||
return device_id;
|
||||
}
|
||||
case PIPE_CAP_DEVICE_ID:
|
||||
return dev->info.device_id;
|
||||
case PIPE_CAP_ACCELERATED:
|
||||
return 1;
|
||||
case PIPE_CAP_VIDEO_MEMORY:
|
||||
|
|
|
|||
|
|
@ -340,10 +340,13 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
return 0;
|
||||
|
||||
case PIPE_CAP_PCI_GROUP:
|
||||
return dev->info.pci.domain;
|
||||
case PIPE_CAP_PCI_BUS:
|
||||
return dev->info.pci.bus;
|
||||
case PIPE_CAP_PCI_DEVICE:
|
||||
return dev->info.pci.dev;
|
||||
case PIPE_CAP_PCI_FUNCTION:
|
||||
return 0;
|
||||
return dev->info.pci.func;
|
||||
|
||||
case PIPE_CAP_OPENCL_INTEGER_FUNCTIONS: /* could be done */
|
||||
case PIPE_CAP_INTEGER_MULTIPLY_32X16: /* could be done */
|
||||
|
|
@ -355,14 +358,8 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
|
||||
case PIPE_CAP_VENDOR_ID:
|
||||
return 0x10de;
|
||||
case PIPE_CAP_DEVICE_ID: {
|
||||
uint64_t device_id;
|
||||
if (nouveau_getparam(dev, NOUVEAU_GETPARAM_PCI_DEVICE, &device_id)) {
|
||||
NOUVEAU_ERR("NOUVEAU_GETPARAM_PCI_DEVICE failed.\n");
|
||||
return -1;
|
||||
}
|
||||
return device_id;
|
||||
}
|
||||
case PIPE_CAP_DEVICE_ID:
|
||||
return dev->info.device_id;
|
||||
case PIPE_CAP_ACCELERATED:
|
||||
return 1;
|
||||
case PIPE_CAP_VIDEO_MEMORY:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue