mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-16 02:28:20 +02:00
util/drirc_gen: add heap_memory_percent to common VK options
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41881>
This commit is contained in:
parent
34c343aad1
commit
482e9f3002
4 changed files with 15 additions and 7 deletions
|
|
@ -144,7 +144,8 @@ def declare_options():
|
|||
c_name="override_ray_tracing_shader_version"),
|
||||
]
|
||||
|
||||
drirc_gen.add_common_vk_options(debug_options, features_options, valid_options=VALID_COMMON_VK_OPTIONS)
|
||||
drirc_gen.add_common_vk_options(debug_options, features_options, misc_options,
|
||||
valid_options=VALID_COMMON_VK_OPTIONS)
|
||||
drirc_gen.add_common_vk_wsi_options(debug_options, performance_options)
|
||||
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import sys
|
|||
|
||||
VALID_COMMON_VK_OPTIONS = {
|
||||
"force_vk_vendor",
|
||||
"heap_memory_percent",
|
||||
}
|
||||
|
||||
def declare_options():
|
||||
|
|
@ -101,9 +102,6 @@ def declare_options():
|
|||
"Provide a second queue for applications that require it, like the Android framework",
|
||||
c_name="emulate_second_queue"),
|
||||
|
||||
F("heap_memory_percent", 0.0, 0.0, 1.0, "Percentage of total system memory to report as gpu heap memory (0 = driver default)",
|
||||
c_name="heap_memory_percent"),
|
||||
|
||||
I("tu_override_graphics_shader_version", 0, 0, 255,
|
||||
"Override graphics shader version to force recompilation when TU_BUILD_ID_OVERRIDE is enabled.",
|
||||
c_name="override_graphics_shader_version"),
|
||||
|
|
@ -114,7 +112,7 @@ def declare_options():
|
|||
|
||||
features_options = []
|
||||
|
||||
drirc_gen.add_common_vk_options(debug_options, features_options, valid_options=VALID_COMMON_VK_OPTIONS)
|
||||
drirc_gen.add_common_vk_options(debug_options, features_options, misc_options, valid_options=VALID_COMMON_VK_OPTIONS)
|
||||
drirc_gen.add_common_vk_wsi_options(debug_options, perf_options)
|
||||
|
||||
return [drirc_gen.DrircSection("Debugging", debug_options, c_name="debug"),
|
||||
|
|
|
|||
|
|
@ -228,7 +228,9 @@ def declare_options(android_version):
|
|||
c_name="compression_control_enabled"),
|
||||
]
|
||||
|
||||
drirc_gen.add_common_vk_options(debug_options, feature_options,
|
||||
misc_options = []
|
||||
|
||||
drirc_gen.add_common_vk_options(debug_options, feature_options, misc_options,
|
||||
valid_options=VALID_COMMON_VK_OPTIONS,
|
||||
defaults={"vk_require_astc": android_version >= 34})
|
||||
drirc_gen.add_common_vk_wsi_options(debug_options, perf_options)
|
||||
|
|
|
|||
|
|
@ -265,9 +265,10 @@ def drirc_generate(cpath, hpath, driver_prefix, sections):
|
|||
print(exceptions.text_error_template().render(), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
def add_common_vk_options(debug_options, features_options, valid_options, defaults=None):
|
||||
def add_common_vk_options(debug_options, features_options, misc_options, valid_options, defaults=None):
|
||||
B = DrircBool
|
||||
I = DrircInt
|
||||
F = DrircFloat
|
||||
|
||||
if defaults is None:
|
||||
defaults = {}
|
||||
|
|
@ -293,6 +294,12 @@ def add_common_vk_options(debug_options, features_options, valid_options, defaul
|
|||
c_name="require_astc"),
|
||||
] if opt.name in valid_options])
|
||||
|
||||
misc_options.extend([opt for opt in [
|
||||
F("heap_memory_percent", defaults.get("heap_memory_percent", 0.0), 0.0, 1.0,
|
||||
"Percentage of total system memory to report as gpu heap memory (0 = driver default)",
|
||||
c_name="heap_memory_percent"),
|
||||
] if opt.name in valid_options])
|
||||
|
||||
def add_common_vk_wsi_options(debug_options, performance_options):
|
||||
B = DrircBool
|
||||
I = DrircInt
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue