mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 09:56:22 +00:00
igt/gem_concurrent_blit: Tweak num_buffers to just exceed target
Remember that we allocate and use twice as many buffers as specified (we have a num_buffers array of src and dst) and so adjust the computation such that the combined allocation matches the target. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
4a3fa3532a
commit
9e7e7c38a0
@ -1609,14 +1609,13 @@ num_buffers(uint64_t max,
|
|||||||
unsigned allow_mem)
|
unsigned allow_mem)
|
||||||
{
|
{
|
||||||
unsigned size = 4*s->width*s->height;
|
unsigned size = 4*s->width*s->height;
|
||||||
unsigned n;
|
uint64_t n;
|
||||||
|
|
||||||
if (max == 0)
|
igt_assert(size);
|
||||||
n = MIN_BUFFERS;
|
n = max / (2*size);
|
||||||
else
|
n += MIN_BUFFERS;
|
||||||
n = max / size;
|
|
||||||
|
|
||||||
igt_require(n);
|
igt_require(n < INT32_MAX);
|
||||||
igt_require(set_max_map_count(2*n));
|
igt_require(set_max_map_count(2*n));
|
||||||
|
|
||||||
if (c->require)
|
if (c->require)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user