mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
turnip: Add TU_GMEM envvar to test different gmem sizes
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14849>
This commit is contained in:
parent
dac3e6f372
commit
c6e8198f1b
2 changed files with 5 additions and 1 deletions
|
|
@ -32,6 +32,7 @@
|
|||
#include "vk_util.h"
|
||||
|
||||
#include "drm-uapi/msm_drm.h"
|
||||
#include "util/debug.h"
|
||||
#include "util/timespec.h"
|
||||
#include "util/os_time.h"
|
||||
#include "util/perf/u_trace.h"
|
||||
|
|
@ -643,6 +644,7 @@ tu_drm_device_init(struct tu_physical_device *device,
|
|||
"could not get GMEM size");
|
||||
goto fail;
|
||||
}
|
||||
device->gmem_size = env_var_as_unsigned("TU_GMEM", device->gmem_size);
|
||||
|
||||
if (tu_drm_get_gmem_base(device, &device->gmem_base)) {
|
||||
result = vk_startup_errorf(instance, VK_ERROR_INITIALIZATION_FAILED,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@
|
|||
#include "msm_kgsl.h"
|
||||
#include "vk_util.h"
|
||||
|
||||
#include "util/debug.h"
|
||||
|
||||
struct tu_syncobj {
|
||||
struct vk_object_base base;
|
||||
uint32_t timestamp;
|
||||
|
|
@ -244,7 +246,7 @@ tu_enumerate_devices(struct tu_instance *instance)
|
|||
((info.chip_id >> 16) & 0xff) * 10 +
|
||||
((info.chip_id >> 8) & 0xff);
|
||||
device->dev_id.chip_id = info.chip_id;
|
||||
device->gmem_size = info.gmem_sizebytes;
|
||||
device->gmem_size = env_var_as_unsigned("TU_GMEM", info.gmem_sizebytes);
|
||||
device->gmem_base = gmem_iova;
|
||||
|
||||
device->heap.size = tu_get_system_heap_size();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue