mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
nouveau: Move shader topology info to nv_device_info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
d8b7b1d784
commit
ae37fbba12
4 changed files with 12 additions and 12 deletions
|
|
@ -31,6 +31,11 @@ struct nv_device_info {
|
|||
|
||||
uint8_t sm; /**< Shader model */
|
||||
|
||||
uint8_t gpc_count;
|
||||
uint16_t tpc_count;
|
||||
uint8_t mp_per_tpc;
|
||||
uint8_t max_warps_per_mp;
|
||||
|
||||
uint16_t cls_copy;
|
||||
uint16_t cls_eng2d;
|
||||
uint16_t cls_eng3d;
|
||||
|
|
|
|||
|
|
@ -60,8 +60,8 @@ nvk_slm_area_ensure(struct nvk_device *dev,
|
|||
*/
|
||||
bytes_per_warp = ALIGN(bytes_per_warp, 0x200);
|
||||
|
||||
uint64_t bytes_per_mp = bytes_per_warp * dev->ws_dev->max_warps_per_mp;
|
||||
uint64_t bytes_per_tpc = bytes_per_mp * dev->ws_dev->mp_per_tpc;
|
||||
uint64_t bytes_per_mp = bytes_per_warp * dev->pdev->info.max_warps_per_mp;
|
||||
uint64_t bytes_per_tpc = bytes_per_mp * dev->pdev->info.mp_per_tpc;
|
||||
|
||||
/* The hardware seems to require this alignment for
|
||||
* NVA0C0_SET_SHADER_LOCAL_MEMORY_NON_THROTTLED_A_SIZE_LOWER.
|
||||
|
|
@ -78,7 +78,7 @@ nvk_slm_area_ensure(struct nvk_device *dev,
|
|||
if (likely(bytes_per_tpc <= area->bytes_per_tpc))
|
||||
return VK_SUCCESS;
|
||||
|
||||
uint64_t size = bytes_per_tpc * dev->ws_dev->tpc_count;
|
||||
uint64_t size = bytes_per_tpc * dev->pdev->info.tpc_count;
|
||||
|
||||
/* The hardware seems to require this alignment for
|
||||
* NV9097_SET_SHADER_LOCAL_MEMORY_D_SIZE_LOWER.
|
||||
|
|
|
|||
|
|
@ -300,8 +300,8 @@ nouveau_ws_device_new(drmDevicePtr drm_device)
|
|||
if (nouveau_ws_param(fd, NOUVEAU_GETPARAM_GRAPH_UNITS, &value))
|
||||
goto out_err;
|
||||
|
||||
device->gpc_count = (value >> 0) & 0x000000ff;
|
||||
device->tpc_count = (value >> 8) & 0x0000ffff;
|
||||
device->info.gpc_count = (value >> 0) & 0x000000ff;
|
||||
device->info.tpc_count = (value >> 8) & 0x0000ffff;
|
||||
|
||||
nouveau_ws_device_set_dbg_flags(device);
|
||||
|
||||
|
|
@ -318,8 +318,8 @@ nouveau_ws_device_new(drmDevicePtr drm_device)
|
|||
|
||||
// for now we hardcode those values, but in the future Nouveau could provide that information to
|
||||
// us instead.
|
||||
device->max_warps_per_mp = max_warps_per_mp_for_sm(device->info.sm);
|
||||
device->mp_per_tpc = mp_per_tpc_for_chipset(device->info.chipset);
|
||||
device->info.max_warps_per_mp = max_warps_per_mp_for_sm(device->info.sm);
|
||||
device->info.mp_per_tpc = mp_per_tpc_for_chipset(device->info.chipset);
|
||||
|
||||
nouveau_ws_context_destroy(tmp_ctx);
|
||||
|
||||
|
|
|
|||
|
|
@ -37,11 +37,6 @@ struct nouveau_ws_device {
|
|||
|
||||
uint32_t local_mem_domain;
|
||||
|
||||
uint8_t gpc_count;
|
||||
uint8_t mp_per_tpc;
|
||||
uint8_t max_warps_per_mp;
|
||||
uint16_t tpc_count;
|
||||
|
||||
enum nvk_debug debug_flags;
|
||||
|
||||
simple_mtx_t bos_lock;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue