diff options
Diffstat (limited to 'src/amd/common/ac_surface.c')
-rw-r--r-- | src/amd/common/ac_surface.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 877d592ab81..a4df595653b 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -150,12 +150,14 @@ static ADDR_E_RETURNCODE ADDR_API freeSysMem(const ADDR_FREESYSMEM_INPUT * pInpu } ADDR_HANDLE amdgpu_addr_create(const struct radeon_info *info, - const struct amdgpu_gpu_info *amdinfo) + const struct amdgpu_gpu_info *amdinfo, + uint64_t *max_alignment) { ADDR_CREATE_INPUT addrCreateInput = {0}; ADDR_CREATE_OUTPUT addrCreateOutput = {0}; ADDR_REGISTER_VALUE regValue = {0}; ADDR_CREATE_FLAGS createFlags = {{0}}; + ADDR_GET_MAX_ALINGMENTS_OUTPUT addrGetMaxAlignmentsOutput = {0}; ADDR_E_RETURNCODE addrRet; addrCreateInput.size = sizeof(ADDR_CREATE_INPUT); @@ -202,6 +204,12 @@ ADDR_HANDLE amdgpu_addr_create(const struct radeon_info *info, if (addrRet != ADDR_OK) return NULL; + if (max_alignment) { + addrRet = AddrGetMaxAlignments(addrCreateOutput.hLib, &addrGetMaxAlignmentsOutput); + if (addrRet == ADDR_OK){ + *max_alignment = addrGetMaxAlignmentsOutput.baseAlign; + } + } return addrCreateOutput.hLib; } |