radv/winsys: request high address
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 18 May 2018 11:59:46 +0000 (13:59 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 22 May 2018 13:53:09 +0000 (15:53 +0200)
This is needed for 32-bit GPU pointers. Ported from RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c

index 8ed3e53e2d32abe808e48bf71ea9f3cf96934590..f33cf02815c9cfd625aa1cfabcf1c5298bc17ad6 100644 (file)
@@ -38,7 +38,6 @@
 
 #include "util/u_atomic.h"
 
-
 static void radv_amdgpu_winsys_bo_destroy(struct radeon_winsys_bo *_bo);
 
 static int
@@ -306,7 +305,8 @@ radv_amdgpu_winsys_bo_create(struct radeon_winsys *_ws,
        }
 
        r = amdgpu_va_range_alloc(ws->dev, amdgpu_gpu_va_range_general,
-                                 size, alignment, 0, &va, &va_handle, 0);
+                                 size, alignment, 0, &va, &va_handle,
+                                 AMDGPU_VA_RANGE_HIGH);
        if (r)
                goto error_va_alloc;
 
@@ -424,7 +424,8 @@ radv_amdgpu_winsys_bo_from_ptr(struct radeon_winsys *_ws,
                goto error;
 
        if (amdgpu_va_range_alloc(ws->dev, amdgpu_gpu_va_range_general,
-                                 size, 1 << 12, 0, &va, &va_handle, 0))
+                                 size, 1 << 12, 0, &va, &va_handle,
+                                 AMDGPU_VA_RANGE_HIGH))
                goto error_va_alloc;
 
        if (amdgpu_bo_va_op(buf_handle, 0, size, va, 0, AMDGPU_VA_OP_MAP))
@@ -480,7 +481,8 @@ radv_amdgpu_winsys_bo_from_fd(struct radeon_winsys *_ws,
                goto error_query;
 
        r = amdgpu_va_range_alloc(ws->dev, amdgpu_gpu_va_range_general,
-                                 result.alloc_size, 1 << 20, 0, &va, &va_handle, 0);
+                                 result.alloc_size, 1 << 20, 0, &va, &va_handle,
+                                 AMDGPU_VA_RANGE_HIGH);
        if (r)
                goto error_query;