mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 09:26:10 +00:00
gem_linear_blits,gem_tiled_blits: Add optional count
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
0995b56334
commit
c91951de0e
@ -237,16 +237,21 @@ check_bo(int fd, uint32_t handle, uint32_t val)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
uint32_t handle[4096];
|
||||
uint32_t start_val[4096];
|
||||
uint32_t *handle, *start_val;
|
||||
uint32_t start = 0;
|
||||
int i, fd, count;
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
count = 3 * gem_aperture_size(fd) / (1024*1024) / 2;
|
||||
count = 0;
|
||||
if (argc > 1)
|
||||
count = atoi(argv[1]);
|
||||
if (count == 0)
|
||||
count = 3 * gem_aperture_size(fd) / (1024*1024) / 2;
|
||||
printf("Using %d 1MiB buffers\n", count);
|
||||
assert(count <= 4096);
|
||||
|
||||
handle = malloc(sizeof(uint32_t)*count*2);
|
||||
start_val = handle + count;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
handle[i] = create_bo(fd, start);
|
||||
|
@ -130,17 +130,24 @@ check_bo(drm_intel_bo *bo, uint32_t start_val)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
drm_intel_bo *bo[4096];
|
||||
uint32_t bo_start_val[4096];
|
||||
drm_intel_bo **bo;
|
||||
uint32_t *bo_start_val;
|
||||
uint32_t start = 0;
|
||||
int i, fd, count;
|
||||
|
||||
fd = drm_open_any();
|
||||
|
||||
count = 3 * gem_aperture_size(fd) / (1024*1024) / 2;
|
||||
count += (count & 1) == 0;
|
||||
count = 0;
|
||||
if (argc > 1)
|
||||
count = atoi(argv[1]);
|
||||
if (count == 0) {
|
||||
count = 3 * gem_aperture_size(fd) / (1024*1024) / 2;
|
||||
count += (count & 1) == 0;
|
||||
}
|
||||
printf("Using %d 1MiB buffers\n", count);
|
||||
assert(count <= 4096);
|
||||
|
||||
bo = malloc(sizeof(drm_intel_bo *)*count);
|
||||
bo_start_val = malloc(sizeof(uint32_t)*count);
|
||||
|
||||
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
|
||||
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user