332b1cba9849d18c6fe79cc7f59a1cd9630d6f03
5 #include "target-helpers/inline_debug_helper.h"
6 #include "target-helpers/drm_helper_public.h"
9 #include "i915/drm/i915_drm_public.h"
10 #include "i915/i915_public.h"
13 pipe_i915_create_screen(int fd
)
15 struct i915_winsys
*iws
;
16 struct pipe_screen
*screen
;
18 iws
= i915_drm_winsys_create(fd
);
22 screen
= i915_screen_create(iws
);
23 return screen
? debug_screen_wrap(screen
) : NULL
;
29 pipe_i915_create_screen(int fd
)
31 fprintf(stderr
, "i915g: driver missing\n");
38 #include "intel/drm/intel_drm_public.h"
39 #include "ilo/ilo_public.h"
42 pipe_ilo_create_screen(int fd
)
44 struct intel_winsys
*iws
;
45 struct pipe_screen
*screen
;
47 iws
= intel_winsys_create_for_fd(fd
);
51 screen
= ilo_screen_create(iws
);
52 return screen
? debug_screen_wrap(screen
) : NULL
;
58 pipe_ilo_create_screen(int fd
)
60 fprintf(stderr
, "ilo: driver missing\n");
66 #ifdef GALLIUM_NOUVEAU
67 #include "nouveau/drm/nouveau_drm_public.h"
70 pipe_nouveau_create_screen(int fd
)
72 struct pipe_screen
*screen
;
74 screen
= nouveau_drm_screen_create(fd
);
75 return screen
? debug_screen_wrap(screen
) : NULL
;
81 pipe_nouveau_create_screen(int fd
)
83 fprintf(stderr
, "nouveau: driver missing\n");
90 #include "radeon/radeon_winsys.h"
91 #include "radeon/drm/radeon_drm_public.h"
92 #include "r300/r300_public.h"
95 pipe_r300_create_screen(int fd
)
97 struct radeon_winsys
*rw
;
99 rw
= radeon_drm_winsys_create(fd
, r300_screen_create
);
100 return rw
? debug_screen_wrap(rw
->screen
) : NULL
;
106 pipe_r300_create_screen(int fd
)
108 fprintf(stderr
, "r300: driver missing\n");
115 #include "radeon/radeon_winsys.h"
116 #include "radeon/drm/radeon_drm_public.h"
117 #include "r600/r600_public.h"
120 pipe_r600_create_screen(int fd
)
122 struct radeon_winsys
*rw
;
124 rw
= radeon_drm_winsys_create(fd
, r600_screen_create
);
125 return rw
? debug_screen_wrap(rw
->screen
) : NULL
;
131 pipe_r600_create_screen(int fd
)
133 fprintf(stderr
, "r600: driver missing\n");
139 #ifdef GALLIUM_RADEONSI
140 #include "radeon/radeon_winsys.h"
141 #include "radeon/drm/radeon_drm_public.h"
142 #include "amdgpu/drm/amdgpu_public.h"
143 #include "radeonsi/si_public.h"
146 pipe_radeonsi_create_screen(int fd
)
148 struct radeon_winsys
*rw
;
150 /* First, try amdgpu. */
151 rw
= amdgpu_winsys_create(fd
, radeonsi_screen_create
);
154 rw
= radeon_drm_winsys_create(fd
, radeonsi_screen_create
);
156 return rw
? debug_screen_wrap(rw
->screen
) : NULL
;
162 pipe_radeonsi_create_screen(int fd
)
164 fprintf(stderr
, "radeonsi: driver missing\n");
170 #ifdef GALLIUM_VMWGFX
171 #include "svga/drm/svga_drm_public.h"
172 #include "svga/svga_public.h"
175 pipe_vmwgfx_create_screen(int fd
)
177 struct svga_winsys_screen
*sws
;
178 struct pipe_screen
*screen
;
180 sws
= svga_drm_winsys_screen_create(fd
);
184 screen
= svga_screen_create(sws
);
185 return screen
? debug_screen_wrap(screen
) : NULL
;
191 pipe_vmwgfx_create_screen(int fd
)
193 fprintf(stderr
, "svga: driver missing\n");
199 #ifdef GALLIUM_FREEDRENO
200 #include "freedreno/drm/freedreno_drm_public.h"
203 pipe_freedreno_create_screen(int fd
)
205 struct pipe_screen
*screen
;
207 screen
= fd_drm_screen_create(fd
);
208 return screen
? debug_screen_wrap(screen
) : NULL
;
214 pipe_freedreno_create_screen(int fd
)
216 fprintf(stderr
, "freedreno: driver missing\n");
223 #include "virgl/drm/virgl_drm_public.h"
224 #include "virgl/virgl_public.h"
227 pipe_virgl_create_screen(int fd
)
229 struct virgl_winsys
*vws
;
230 struct pipe_screen
*screen
;
232 vws
= virgl_drm_winsys_create(fd
);
236 screen
= virgl_create_screen(vws
);
237 return screen
? debug_screen_wrap(screen
) : NULL
;
243 pipe_virgl_create_screen(int fd
)
245 fprintf(stderr
, "virgl: driver missing\n");
252 #include "vc4/drm/vc4_drm_public.h"
255 pipe_vc4_create_screen(int fd
)
257 struct pipe_screen
*screen
;
259 screen
= vc4_drm_screen_create(fd
);
260 return screen
? debug_screen_wrap(screen
) : NULL
;
266 pipe_vc4_create_screen(int fd
)
268 fprintf(stderr
, "vc4: driver missing\n");
275 #endif /* DRM_HELPER_H */