mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-26 04:40:39 +02:00
ac/gpu_info,radv: use the maximum virtual address from the kernel
Instead of hardcoding it. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36573>
This commit is contained in:
parent
b22806705c
commit
1f490c836b
3 changed files with 5 additions and 1 deletions
|
|
@ -703,6 +703,8 @@ ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
|
|||
/* Add some margin of error, though this shouldn't be needed in theory. */
|
||||
info->all_vram_visible = info->vram_size_kb * 0.9 < info->vram_vis_size_kb;
|
||||
|
||||
info->virtual_address_max = device_info.virtual_address_max;
|
||||
|
||||
/* Set chip identification. */
|
||||
info->pci_id = device_info.device_id;
|
||||
info->pci_rev_id = device_info.pci_rev;
|
||||
|
|
@ -1990,6 +1992,7 @@ void ac_print_gpu_info(const struct radeon_info *info, FILE *f)
|
|||
fprintf(f, " address32_hi = 0x%x\n", info->address32_hi);
|
||||
fprintf(f, " has_dedicated_vram = %u\n", info->has_dedicated_vram);
|
||||
fprintf(f, " all_vram_visible = %u\n", info->all_vram_visible);
|
||||
fprintf(f, " virtual_address_max = %" PRIx64 "\n", info->virtual_address_max);
|
||||
fprintf(f, " max_tcc_blocks = %i\n", info->max_tcc_blocks);
|
||||
fprintf(f, " tcc_cache_line_size = %u\n", info->tcc_cache_line_size);
|
||||
fprintf(f, " tcc_rb_non_coherent = %u\n", info->tcc_rb_non_coherent);
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ struct radeon_info {
|
|||
uint32_t address32_hi;
|
||||
bool has_dedicated_vram;
|
||||
bool all_vram_visible;
|
||||
uint64_t virtual_address_max;
|
||||
bool has_l2_uncached;
|
||||
bool r600_has_virtual_memory;
|
||||
uint32_t max_tcc_blocks;
|
||||
|
|
|
|||
|
|
@ -1492,7 +1492,7 @@ radv_get_physical_device_properties(struct radv_physical_device *pdev)
|
|||
.maxMemoryAllocationCount = UINT32_MAX,
|
||||
.maxSamplerAllocationCount = 64 * 1024,
|
||||
.bufferImageGranularity = 1,
|
||||
.sparseAddressSpaceSize = (1ull << (pdev->info.gfx_level >= GFX9 ? 48 : 40)),
|
||||
.sparseAddressSpaceSize = pdev->info.virtual_address_max,
|
||||
.maxBoundDescriptorSets = MAX_SETS,
|
||||
.maxPerStageDescriptorSamplers = max_descriptor_set_size,
|
||||
.maxPerStageDescriptorUniformBuffers = max_descriptor_set_size,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue