summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-05-16 15:34:52 +0200
committerSamuel Pitoiset <[email protected]>2018-05-22 15:53:13 +0200
commitfe2649d3ad7dbf47000f2e1403c3c279d09f7dc0 (patch)
tree1d8e82eb8026ad2277cb88b85f65f5e55271e609 /src
parentb60e0ee789e52417005bde45d95e051624502450 (diff)
radv/winsys: allow to allocate BOs in the 32-bit addr space
This introduces a new flag called RADEON_FLAG_32BIT. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_radeon_winsys.h1
-rw-r--r--src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_radeon_winsys.h b/src/amd/vulkan/radv_radeon_winsys.h
index 7f19934ab80..2ebd18cf905 100644
--- a/src/amd/vulkan/radv_radeon_winsys.h
+++ b/src/amd/vulkan/radv_radeon_winsys.h
@@ -57,6 +57,7 @@ enum radeon_bo_flag { /* bitfield */
RADEON_FLAG_IMPLICIT_SYNC = (1 << 5),
RADEON_FLAG_NO_INTERPROCESS_SHARING = (1 << 6),
RADEON_FLAG_READ_ONLY = (1 << 7),
+ RADEON_FLAG_32BIT = (1 << 8),
};
enum radeon_bo_usage { /* bitfield */
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
index f33cf02815c..25764d93f6a 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
@@ -306,7 +306,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,
- AMDGPU_VA_RANGE_HIGH);
+ (flags & RADEON_FLAG_32BIT ? AMDGPU_VA_RANGE_32_BIT : 0) |
+ AMDGPU_VA_RANGE_HIGH);
if (r)
goto error_va_alloc;