1848b8605Smrg 2848b8605Smrg#include "target-helpers/inline_debug_helper.h" 3848b8605Smrg#include "state_tracker/drm_driver.h" 4848b8605Smrg#include "i915/drm/i915_drm_public.h" 5848b8605Smrg#include "i915/i915_public.h" 6848b8605Smrg 7848b8605Smrgstatic struct pipe_screen * 8b8e80941Smrgcreate_screen(int fd, const struct pipe_screen_config *config) 9848b8605Smrg{ 10848b8605Smrg struct i915_winsys *iws; 11848b8605Smrg struct pipe_screen *screen; 12848b8605Smrg 13848b8605Smrg iws = i915_drm_winsys_create(fd); 14848b8605Smrg if (!iws) 15848b8605Smrg return NULL; 16848b8605Smrg 17848b8605Smrg screen = i915_screen_create(iws); 18848b8605Smrg if (!screen) 19848b8605Smrg return NULL; 20848b8605Smrg 21848b8605Smrg screen = debug_screen_wrap(screen); 22848b8605Smrg 23848b8605Smrg return screen; 24848b8605Smrg} 25848b8605Smrg 26848b8605SmrgPUBLIC 27b8e80941SmrgDRM_DRIVER_DESCRIPTOR("i915", NULL, create_screen) 28