mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-21 21:32:56 +00:00
igt/gem_evict_everything: Move assertion
If we move the assertion from out of the callback, we can get a much more useful error message. References: https://bugs.freedesktop.org/show_bug.cgi?id=79573 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
@@ -51,8 +51,8 @@
|
||||
#define HEIGHT 256
|
||||
#define WIDTH 1024
|
||||
|
||||
static void
|
||||
copy(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo, int error)
|
||||
static int
|
||||
copy(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo)
|
||||
{
|
||||
uint32_t batch[12];
|
||||
struct drm_i915_gem_relocation_entry reloc[2];
|
||||
@@ -122,10 +122,11 @@ copy(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo, int error)
|
||||
ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &exec);
|
||||
if (ret)
|
||||
ret = errno;
|
||||
igt_assert(ret == error);
|
||||
|
||||
gem_close(fd, handle);
|
||||
free(obj);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void clear(int fd, uint32_t handle, int size)
|
||||
|
||||
Reference in New Issue
Block a user