mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-13 02:46:23 +00:00
igt/gem_streaming_writes: Add more validation steps
Inalcude a pre-pass to check that the non-streaming, partial writes work. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
c0a0725fad
commit
65fec5e583
@ -60,7 +60,7 @@ static bool __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *eb)
|
|||||||
return drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, eb) == 0;
|
return drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, eb) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_streaming(int fd, int mode)
|
static void test_streaming(int fd, int mode, int sync)
|
||||||
{
|
{
|
||||||
const int has_64bit_reloc = intel_gen(intel_get_drm_devid(fd)) >= 8;
|
const int has_64bit_reloc = intel_gen(intel_get_drm_devid(fd)) >= 8;
|
||||||
struct drm_i915_gem_execbuffer2 execbuf;
|
struct drm_i915_gem_execbuffer2 execbuf;
|
||||||
@ -192,6 +192,8 @@ static void test_streaming(int fd, int mode)
|
|||||||
int b;
|
int b;
|
||||||
|
|
||||||
if (pass) {
|
if (pass) {
|
||||||
|
if (sync)
|
||||||
|
gem_set_domain(fd, src, domain, domain);
|
||||||
for (i = 0; i < CHUNK_SIZE/4; i++)
|
for (i = 0; i < CHUNK_SIZE/4; i++)
|
||||||
s[offset/4 + i] = (OBJECT_SIZE*pass + offset)/4 + i;
|
s[offset/4 + i] = (OBJECT_SIZE*pass + offset)/4 + i;
|
||||||
}
|
}
|
||||||
@ -227,17 +229,19 @@ static void test_streaming(int fd, int mode)
|
|||||||
|
|
||||||
igt_main
|
igt_main
|
||||||
{
|
{
|
||||||
int fd;
|
int fd, sync;
|
||||||
|
|
||||||
igt_fixture
|
igt_fixture
|
||||||
fd = drm_open_any();
|
fd = drm_open_any();
|
||||||
|
|
||||||
igt_subtest("cpu")
|
for (sync = 2; sync--; ) {
|
||||||
test_streaming(fd, 0);
|
igt_subtest_f("cpu%s", sync ? "-sync":"")
|
||||||
igt_subtest("gtt")
|
test_streaming(fd, 0, sync);
|
||||||
test_streaming(fd, 1);
|
igt_subtest_f("gtt%s", sync ? "-sync":"")
|
||||||
igt_subtest("wc")
|
test_streaming(fd, 1, sync);
|
||||||
test_streaming(fd, 2);
|
igt_subtest_f("wc%s", sync ? "-sync":"")
|
||||||
|
test_streaming(fd, 2, sync);
|
||||||
|
}
|
||||||
|
|
||||||
igt_fixture
|
igt_fixture
|
||||||
close(fd);
|
close(fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user