diff options
author | Mike Blumenkrantz <[email protected]> | 2019-04-09 12:40:06 -0400 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-04-10 12:59:17 -0700 |
commit | 03d6d01fe264c0c7e03428202424f183b5086464 (patch) | |
tree | 46f3c991d4c3fe3d2bdf229b61f4853cfafcee1c /src | |
parent | 7295487c6df78c1655aa5f759bab51533065689e (diff) |
iris: support INTEL_NO_HW environment variable
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/iris/iris_batch.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_screen.h | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c index 556422c38bc..2e349891fbd 100644 --- a/src/gallium/drivers/iris/iris_batch.c +++ b/src/gallium/drivers/iris/iris_batch.c @@ -491,7 +491,7 @@ submit_batch(struct iris_batch *batch) (uintptr_t)util_dynarray_begin(&batch->exec_fences); } - int ret = drm_ioctl(batch->screen->fd, + int ret = batch->screen->no_hw ? 0 : drm_ioctl(batch->screen->fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); if (ret != 0) { diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index 6a06eccf2ed..5333a2a303c 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -560,6 +560,9 @@ iris_screen_create(int fd) screen->devinfo.timestamp_frequency = iris_getparam_integer(screen, I915_PARAM_CS_TIMESTAMP_FREQUENCY); + if (getenv("INTEL_NO_HW") != NULL) + screen->no_hw = true; + screen->bufmgr = iris_bufmgr_init(&screen->devinfo, fd); if (!screen->bufmgr) return NULL; diff --git a/src/gallium/drivers/iris/iris_screen.h b/src/gallium/drivers/iris/iris_screen.h index 386a5ba6343..475975747c3 100644 --- a/src/gallium/drivers/iris/iris_screen.h +++ b/src/gallium/drivers/iris/iris_screen.h @@ -52,6 +52,8 @@ struct iris_screen { /** PCI ID for our GPU device */ int pci_id; + bool no_hw; + /** Global program_string_id counter (see get_program_string_id()) */ unsigned program_id; |