drmVersionPtr version;
boolean drm_gb_capable;
boolean have_drm_2_5;
+ const char *getenv_val;
VMW_FUNC;
goto out_no_3d;
}
vws->ioctl.hwversion = gp_arg.value;
-
- memset(&gp_arg, 0, sizeof(gp_arg));
- gp_arg.param = DRM_VMW_PARAM_HW_CAPS;
- ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_GET_PARAM,
- &gp_arg, sizeof(gp_arg));
+ getenv_val = getenv("SVGA_FORCE_HOST_BACKED");
+ if (!getenv_val || strcmp(getenv_val, "0") == 0) {
+ memset(&gp_arg, 0, sizeof(gp_arg));
+ gp_arg.param = DRM_VMW_PARAM_HW_CAPS;
+ ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_GET_PARAM,
+ &gp_arg, sizeof(gp_arg));
+ } else {
+ ret = -EINVAL;
+ }
if (ret)
vws->base.have_gb_objects = FALSE;
else
vws->base.have_gb_objects =
!!(gp_arg.value & (uint64_t) SVGA_CAP_GBOBJECTS);
-
+
if (vws->base.have_gb_objects && !drm_gb_capable)
goto out_no_3d;