Last active
February 3, 2024 16:09
-
-
Save Hadrianneue/478da31a1d0b6674f692ba982ed18668 to your computer and use it in GitHub Desktop.
mesa radv prefer vram always
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h | |
index 591bba3204b..3e88246d3bf 100644 | |
--- a/src/amd/vulkan/radv_debug.h | |
+++ b/src/amd/vulkan/radv_debug.h | |
@@ -92,6 +92,7 @@ enum { | |
RADV_PERFTEST_TRANSFER_QUEUE = 1u << 14, | |
RADV_PERFTEST_SHADER_OBJECT = 1u << 15, | |
RADV_PERFTEST_NIR_CACHE = 1u << 16, | |
+ RADV_PERFTEST_NO_GTT = 1u << 17, | |
}; | |
bool radv_init_trace(struct radv_device *device); | |
diff --git a/src/amd/vulkan/radv_instance.c b/src/amd/vulkan/radv_instance.c | |
index 125191eb0e9..dd3fad2a16a 100644 | |
--- a/src/amd/vulkan/radv_instance.c | |
+++ b/src/amd/vulkan/radv_instance.c | |
@@ -103,6 +103,7 @@ static const struct debug_control radv_perftest_options[] = {{"localbos", RADV_P | |
{"transfer_queue", RADV_PERFTEST_TRANSFER_QUEUE}, | |
{"shader_object", RADV_PERFTEST_SHADER_OBJECT}, | |
{"nircache", RADV_PERFTEST_NIR_CACHE}, | |
+ {"nogtt", RADV_PERFTEST_NO_GTT}, | |
{NULL, 0}}; | |
const char * | |
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | |
index 1a32f9b58d7..c0c484bc0a2 100644 | |
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | |
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | |
@@ -462,6 +462,7 @@ radv_amdgpu_winsys_bo_create(struct radeon_winsys *_ws, uint64_t size, unsigned | |
* e.g. Horizon Zero Dawn allocates more memory than we have | |
* VRAM. | |
*/ | |
+ if (!(ws->perftest & RADV_PERFTEST_NO_GTT)) | |
request.preferred_heap |= AMDGPU_GEM_DOMAIN_GTT; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment