radv/winsys: add support for GS and OA domains
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 10 Sep 2019 13:10:13 +0000 (15:10 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 16 Sep 2019 10:08:22 +0000 (12:08 +0200)
For NGG streamout which uses GDS.

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

index 38d95624c30380a8a1708517f0a8049b7eb9daa5..ae682e52f11adbdc4dc0abc15a2e9fe76caecb6e 100644 (file)
@@ -45,7 +45,9 @@ struct radeon_surf;
 enum radeon_bo_domain { /* bitfield */
        RADEON_DOMAIN_GTT  = 2,
        RADEON_DOMAIN_VRAM = 4,
-       RADEON_DOMAIN_VRAM_GTT = RADEON_DOMAIN_VRAM | RADEON_DOMAIN_GTT
+       RADEON_DOMAIN_VRAM_GTT = RADEON_DOMAIN_VRAM | RADEON_DOMAIN_GTT,
+       RADEON_DOMAIN_GDS = 8,
+       RADEON_DOMAIN_OA = 16,
 };
 
 enum radeon_bo_flag { /* bitfield */
index 0f20da1d2b01ad608364d9d2c13d75eac1817a3e..bd5ffbe796119a9bc60169ff7b300275004c50e3 100644 (file)
@@ -356,6 +356,10 @@ radv_amdgpu_winsys_bo_create(struct radeon_winsys *_ws,
                request.preferred_heap |= AMDGPU_GEM_DOMAIN_VRAM;
        if (initial_domain & RADEON_DOMAIN_GTT)
                request.preferred_heap |= AMDGPU_GEM_DOMAIN_GTT;
+       if (initial_domain & RADEON_DOMAIN_GDS)
+               request.preferred_heap |= AMDGPU_GEM_DOMAIN_GDS;
+       if (initial_domain & RADEON_DOMAIN_OA)
+               request.preferred_heap |= AMDGPU_GEM_DOMAIN_OA;
 
        if (flags & RADEON_FLAG_CPU_ACCESS) {
                bo->base.vram_cpu_access = initial_domain & RADEON_DOMAIN_VRAM;