Last active
March 15, 2025 04:12
-
-
Save Hadrianneue/478da31a1d0b6674f692ba982ed18668 to your computer and use it in GitHub Desktop.
mesa radv prefer vram always
This file contains hidden or 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 2379a1fc364..1e09d9aa543 100644 | |
--- a/src/amd/vulkan/radv_debug.h | |
+++ b/src/amd/vulkan/radv_debug.h | |
@@ -94,6 +94,7 @@ enum { | |
RADV_PERFTEST_NIR_CACHE = 1u << 14, | |
RADV_PERFTEST_RT_WAVE_32 = 1u << 15, | |
RADV_PERFTEST_VIDEO_ENCODE = 1u << 16, | |
+ RADV_PERFTEST_NO_GTT = 1u << 17, | |
}; | |
enum { | |
diff --git a/src/amd/vulkan/radv_instance.c b/src/amd/vulkan/radv_instance.c | |
index 8104a18d836..166cd243ccd 100644 | |
--- a/src/amd/vulkan/radv_instance.c | |
+++ b/src/amd/vulkan/radv_instance.c | |
@@ -86,6 +86,7 @@ static const struct debug_control radv_debug_options[] = {{"nofastclears", RADV_ | |
{"asm", RADV_DEBUG_DUMP_ASM}, | |
{"ir", RADV_DEBUG_DUMP_BACKEND_IR}, | |
{"pso_history", RADV_DEBUG_PSO_HISTORY}, | |
+ {"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 54c7cefb23c..8d3aac57261 100644 | |
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | |
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | |
@@ -470,6 +470,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