{
struct radeon_winsys *rw;
- rw = radeon_drm_winsys_create(fd, r300_screen_create);
+ rw = radeon_drm_winsys_create(fd, flags, r300_screen_create);
return rw ? debug_screen_wrap(rw->screen) : NULL;
}
{
struct radeon_winsys *rw;
- rw = radeon_drm_winsys_create(fd, r600_screen_create);
+ rw = radeon_drm_winsys_create(fd, flags, r600_screen_create);
return rw ? debug_screen_wrap(rw->screen) : NULL;
}
struct radeon_winsys *rw;
/* First, try amdgpu. */
- rw = amdgpu_winsys_create(fd, radeonsi_screen_create);
+ rw = amdgpu_winsys_create(fd, flags, radeonsi_screen_create);
if (!rw)
- rw = radeon_drm_winsys_create(fd, radeonsi_screen_create);
+ rw = radeon_drm_winsys_create(fd, flags, radeonsi_screen_create);
return rw ? debug_screen_wrap(rw->screen) : NULL;
}
struct radeon_winsys;
-struct pipe_screen* r300_screen_create(struct radeon_winsys *rws);
+struct pipe_screen* r300_screen_create(struct radeon_winsys *rws, unsigned flags);
#ifdef __cplusplus
} // extern "C"
return rws->fence_wait(rws, fence, timeout);
}
-struct pipe_screen* r300_screen_create(struct radeon_winsys *rws)
+struct pipe_screen* r300_screen_create(struct radeon_winsys *rws, unsigned flags)
{
struct r300_screen *r300screen = CALLOC_STRUCT(r300_screen);
return r600_resource_create_common(screen, templ);
}
-struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
+struct pipe_screen *r600_screen_create(struct radeon_winsys *ws, unsigned flags)
{
struct r600_screen *rscreen = CALLOC_STRUCT(r600_screen);
rscreen->b.b.get_shader_param = r600_get_shader_param;
rscreen->b.b.resource_create = r600_resource_create;
- if (!r600_common_screen_init(&rscreen->b, ws)) {
+ if (!r600_common_screen_init(&rscreen->b, ws, flags)) {
FREE(rscreen);
return NULL;
}
struct radeon_winsys;
-struct pipe_screen *r600_screen_create(struct radeon_winsys *ws);
+struct pipe_screen *r600_screen_create(struct radeon_winsys *ws, unsigned flags);
#endif
}
bool r600_common_screen_init(struct r600_common_screen *rscreen,
- struct radeon_winsys *ws)
+ struct radeon_winsys *ws, unsigned flags)
{
char family_name[32] = {}, llvm_string[32] = {}, kernel_version[128] = {};
struct utsname uname_data;
enum blitter_attrib_type type,
const union pipe_color_union *attrib);
bool r600_common_screen_init(struct r600_common_screen *rscreen,
- struct radeon_winsys *ws);
+ struct radeon_winsys *ws, unsigned flags);
void r600_destroy_common_screen(struct r600_common_screen *rscreen);
void r600_preflush_suspend_features(struct r600_common_context *ctx);
void r600_postflush_resume_features(struct r600_common_context *ctx);
exit(0);
}
-struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws)
+struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
+ unsigned flags)
{
struct si_screen *sscreen = CALLOC_STRUCT(si_screen);
unsigned num_threads, num_compiler_threads, num_compiler_threads_lowprio, i;
si_init_screen_state_functions(sscreen);
- if (!r600_common_screen_init(&sscreen->b, ws) ||
+ if (!r600_common_screen_init(&sscreen->b, ws, flags) ||
!si_init_gs_info(sscreen) ||
!si_init_shader_cache(sscreen)) {
FREE(sscreen);
struct radeon_winsys;
-struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws);
+struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
+ unsigned flags);
#endif
{
struct radeon_winsys *sws;
- sws = radeon_drm_winsys_create(fd, r300_screen_create);
+ sws = radeon_drm_winsys_create(fd, flags, r300_screen_create);
return sws ? debug_screen_wrap(sws->screen) : NULL;
}
{
struct radeon_winsys *rw;
- rw = radeon_drm_winsys_create(fd, r600_screen_create);
+ rw = radeon_drm_winsys_create(fd, flags, r600_screen_create);
return rw ? debug_screen_wrap(rw->screen) : NULL;
}
struct radeon_winsys *rw;
/* First, try amdgpu. */
- rw = amdgpu_winsys_create(fd, radeonsi_screen_create);
+ rw = amdgpu_winsys_create(fd, flags, radeonsi_screen_create);
if (!rw)
- rw = radeon_drm_winsys_create(fd, radeonsi_screen_create);
+ rw = radeon_drm_winsys_create(fd, flags, radeonsi_screen_create);
return rw ? debug_screen_wrap(rw->screen) : NULL;
}
struct radeon_winsys;
struct pipe_screen;
-typedef struct pipe_screen *(*radeon_screen_create_t)(struct radeon_winsys *);
+typedef struct pipe_screen *(*radeon_screen_create_t)(struct radeon_winsys *,
+ unsigned);
struct radeon_winsys *
-amdgpu_winsys_create(int fd, radeon_screen_create_t screen_create);
+amdgpu_winsys_create(int fd, unsigned flags,
+ radeon_screen_create_t screen_create);
#endif
PUBLIC struct radeon_winsys *
-amdgpu_winsys_create(int fd, radeon_screen_create_t screen_create)
+amdgpu_winsys_create(int fd, unsigned flags,
+ radeon_screen_create_t screen_create)
{
struct amdgpu_winsys *ws;
drmVersionPtr version = drmGetVersion(fd);
*
* Alternatively, we could create the screen based on "ws->gen"
* and link all drivers into one binary blob. */
- ws->base.screen = screen_create(&ws->base);
+ ws->base.screen = screen_create(&ws->base, flags);
if (!ws->base.screen) {
amdgpu_winsys_destroy(&ws->base);
mtx_unlock(&dev_tab_mutex);
struct radeon_winsys;
struct pipe_screen;
-typedef struct pipe_screen *(*radeon_screen_create_t)(struct radeon_winsys *);
+typedef struct pipe_screen *(*radeon_screen_create_t)(struct radeon_winsys *,
+ unsigned);
struct radeon_winsys *
-radeon_drm_winsys_create(int fd, radeon_screen_create_t screen_create);
+radeon_drm_winsys_create(int fd, unsigned flags,
+ radeon_screen_create_t screen_create);
#endif
}
PUBLIC struct radeon_winsys *
-radeon_drm_winsys_create(int fd, radeon_screen_create_t screen_create)
+radeon_drm_winsys_create(int fd, unsigned flags,
+ radeon_screen_create_t screen_create)
{
struct radeon_drm_winsys *ws;
*
* Alternatively, we could create the screen based on "ws->gen"
* and link all drivers into one binary blob. */
- ws->base.screen = screen_create(&ws->base);
+ ws->base.screen = screen_create(&ws->base, flags);
if (!ws->base.screen) {
radeon_winsys_destroy(&ws->base);
mtx_unlock(&fd_tab_mutex);