dri: merge in loader_dri3
this simplifies dependencies Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
This commit is contained in:
committed by
Marge Bot
parent
8f29aa28a5
commit
8cc95baf7b
+1
-2
@@ -86,7 +86,6 @@ if with_dri
|
||||
link_for_egl += libloader
|
||||
incs_for_egl += inc_loader
|
||||
incs_for_egl += inc_loader_x11
|
||||
incs_for_egl += inc_loader_dri3
|
||||
incs_for_egl += inc_gallium
|
||||
incs_for_egl += inc_gallium_aux
|
||||
incs_for_egl += inc_mesa
|
||||
@@ -101,7 +100,7 @@ if with_dri
|
||||
files_egl += files('drivers/dri2/platform_x11.c')
|
||||
if with_dri3
|
||||
files_egl += files('drivers/dri2/platform_x11_dri3.c')
|
||||
link_for_egl += [libloader_dri3_helper, libloader_x11]
|
||||
link_for_egl += [libloader_x11]
|
||||
endif
|
||||
deps_for_egl += [dep_x11_xcb, dep_xcb_dri2, dep_xcb_xrandr, dep_xcb_xfixes, dep_xcb_shm]
|
||||
endif
|
||||
|
||||
+19
-18
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include "mesa_interface.h"
|
||||
#include "util/macros.h"
|
||||
#include <c11/threads.h>
|
||||
|
||||
enum loader_dri3_buffer_type {
|
||||
@@ -188,14 +189,14 @@ struct loader_dri3_drawable {
|
||||
bool has_event_waiter;
|
||||
};
|
||||
|
||||
void
|
||||
PUBLIC void
|
||||
loader_dri3_set_swap_interval(struct loader_dri3_drawable *draw,
|
||||
int interval);
|
||||
|
||||
void
|
||||
PUBLIC void
|
||||
loader_dri3_drawable_fini(struct loader_dri3_drawable *draw);
|
||||
|
||||
int
|
||||
PUBLIC int
|
||||
loader_dri3_drawable_init(xcb_connection_t *conn,
|
||||
xcb_drawable_t drawable,
|
||||
enum loader_dri3_drawable_type type,
|
||||
@@ -207,48 +208,48 @@ loader_dri3_drawable_init(xcb_connection_t *conn,
|
||||
const struct loader_dri3_vtable *vtable,
|
||||
struct loader_dri3_drawable*);
|
||||
|
||||
bool loader_dri3_wait_for_msc(struct loader_dri3_drawable *draw,
|
||||
PUBLIC bool loader_dri3_wait_for_msc(struct loader_dri3_drawable *draw,
|
||||
int64_t target_msc,
|
||||
int64_t divisor, int64_t remainder,
|
||||
int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
|
||||
int64_t
|
||||
PUBLIC int64_t
|
||||
loader_dri3_swap_buffers_msc(struct loader_dri3_drawable *draw,
|
||||
int64_t target_msc, int64_t divisor,
|
||||
int64_t remainder, unsigned flush_flags,
|
||||
const int *rects, int n_rects,
|
||||
bool force_copy);
|
||||
|
||||
int
|
||||
PUBLIC int
|
||||
loader_dri3_wait_for_sbc(struct loader_dri3_drawable *draw,
|
||||
int64_t target_sbc, int64_t *ust,
|
||||
int64_t *msc, int64_t *sbc);
|
||||
|
||||
int loader_dri3_query_buffer_age(struct loader_dri3_drawable *draw);
|
||||
PUBLIC int loader_dri3_query_buffer_age(struct loader_dri3_drawable *draw);
|
||||
|
||||
void
|
||||
PUBLIC void
|
||||
loader_dri3_flush(struct loader_dri3_drawable *draw,
|
||||
unsigned flags,
|
||||
enum __DRI2throttleReason throttle_reason);
|
||||
|
||||
void
|
||||
PUBLIC void
|
||||
loader_dri3_copy_sub_buffer(struct loader_dri3_drawable *draw,
|
||||
int x, int y,
|
||||
int width, int height,
|
||||
bool flush);
|
||||
|
||||
void
|
||||
PUBLIC void
|
||||
loader_dri3_copy_drawable(struct loader_dri3_drawable *draw,
|
||||
xcb_drawable_t dest,
|
||||
xcb_drawable_t src);
|
||||
|
||||
void
|
||||
PUBLIC void
|
||||
loader_dri3_wait_x(struct loader_dri3_drawable *draw);
|
||||
|
||||
void
|
||||
PUBLIC void
|
||||
loader_dri3_wait_gl(struct loader_dri3_drawable *draw);
|
||||
|
||||
__DRIimage *
|
||||
PUBLIC __DRIimage *
|
||||
loader_dri3_create_image(xcb_connection_t *c,
|
||||
xcb_dri3_buffer_from_pixmap_reply_t *bp_reply,
|
||||
unsigned int fourcc,
|
||||
@@ -256,14 +257,14 @@ loader_dri3_create_image(xcb_connection_t *c,
|
||||
void *loaderPrivate);
|
||||
|
||||
#ifdef HAVE_DRI3_MODIFIERS
|
||||
__DRIimage *
|
||||
PUBLIC __DRIimage *
|
||||
loader_dri3_create_image_from_buffers(xcb_connection_t *c,
|
||||
xcb_dri3_buffers_from_pixmap_reply_t *bp_reply,
|
||||
unsigned int fourcc,
|
||||
__DRIscreen *dri_screen,
|
||||
void *loaderPrivate);
|
||||
#endif
|
||||
int
|
||||
PUBLIC int
|
||||
loader_dri3_get_buffers(__DRIdrawable *driDrawable,
|
||||
unsigned int format,
|
||||
uint32_t *stamp,
|
||||
@@ -271,13 +272,13 @@ loader_dri3_get_buffers(__DRIdrawable *driDrawable,
|
||||
uint32_t buffer_mask,
|
||||
struct __DRIimageList *buffers);
|
||||
|
||||
void
|
||||
PUBLIC void
|
||||
loader_dri3_update_drawable_geometry(struct loader_dri3_drawable *draw);
|
||||
|
||||
void
|
||||
PUBLIC void
|
||||
loader_dri3_swapbuffer_barrier(struct loader_dri3_drawable *draw);
|
||||
|
||||
void
|
||||
PUBLIC void
|
||||
loader_dri3_close_screen(__DRIscreen *dri_screen);
|
||||
|
||||
#endif
|
||||
@@ -21,6 +21,11 @@ files_libdri = files(
|
||||
|
||||
if with_platform_x11
|
||||
deps_for_libdri += dep_xcb
|
||||
if with_dri3
|
||||
deps_for_libdri += [dep_xcb_dri3, dep_xcb_present, dep_xcb_sync,
|
||||
dep_xshmfence, dep_xcb_xfixes]
|
||||
files_libdri += files('loader_dri3_helper.c')
|
||||
endif
|
||||
endif
|
||||
|
||||
if with_dri
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
dri_set_blob_cache_funcs;
|
||||
dri_get_pipe_screen;
|
||||
dri_get_screen_param;
|
||||
dri3*;
|
||||
loader_dri3*;
|
||||
@nouveau_drm_screen_create@
|
||||
@radeon_drm_winsys_create@
|
||||
@amdgpu_winsys_create@
|
||||
|
||||
+2
-2
@@ -115,13 +115,13 @@ libglx = static_library(
|
||||
'glx',
|
||||
[files_libglx, glx_generated],
|
||||
include_directories : [inc_include, inc_src, inc_glapi, inc_loader, inc_loader_x11,
|
||||
inc_loader_dri3, inc_gallium, inc_mesa, inc_st_dri, inc_gallium_aux],
|
||||
inc_gallium, inc_mesa, inc_st_dri, inc_gallium_aux],
|
||||
c_args : [
|
||||
'-DGL_LIB_NAME="lib@0@.so.@1@"'.format(gl_lib_name, gl_lib_version.split('.')[0]),
|
||||
],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
link_with : [
|
||||
libloader, libloader_dri3_helper, libloader_x11,
|
||||
libloader, libloader_x11,
|
||||
extra_libs_libglx, glx_gallium_link
|
||||
],
|
||||
dependencies : [
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
# Copyright © 2017 Intel Corporation
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
inc_loader_dri3 = include_directories('.')
|
||||
|
||||
if with_platform_x11 and with_dri3
|
||||
libloader_dri3_helper = static_library(
|
||||
'loader_dri3_helper',
|
||||
'loader_dri3_helper.c',
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
include_directories : [inc_include, inc_src, inc_loader, inc_gallium, inc_mesa, inc_st_dri],
|
||||
dependencies : [
|
||||
idep_mesautil,
|
||||
dep_libdrm, dep_xcb_dri3, dep_xcb_present, dep_xcb_sync, dep_xshmfence,
|
||||
dep_xcb_xfixes,
|
||||
],
|
||||
build_by_default : false,
|
||||
)
|
||||
else
|
||||
libloader_dri3_helper = []
|
||||
endif
|
||||
@@ -113,11 +113,6 @@ if with_gallium
|
||||
if with_tests and with_shared_glapi
|
||||
subdir('mesa/state_tracker/tests')
|
||||
endif
|
||||
if with_dri
|
||||
if with_gallium or with_gbm or with_platform_wayland
|
||||
subdir('loader_dri3')
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if with_glx == 'dri'
|
||||
subdir('glx')
|
||||
|
||||
Reference in New Issue
Block a user