Merge branch 'vk-upload-thread' into 'master'

Draft: render/vulkan: add upload thread

See merge request wlroots/wlroots!4454
This commit is contained in:
Simon Ser 2024-01-25 11:00:38 +00:00
commit 9e53f89c1b
21 changed files with 378 additions and 88 deletions

View file

@ -19,6 +19,7 @@ struct wlr_backend_impl;
*/
struct wlr_backend {
const struct wlr_backend_impl *impl;
struct wl_event_loop *event_loop;
struct {
/** Raised when destroyed */

View file

@ -24,7 +24,7 @@ struct wlr_backend_impl {
* to the provided struct wlr_backend_impl reference.
*/
void wlr_backend_init(struct wlr_backend *backend,
const struct wlr_backend_impl *impl);
const struct wlr_backend_impl *impl, struct wl_event_loop *loop);
/**
* Emit the destroy event and clean up common backend state.
*/

View file

@ -18,7 +18,8 @@ struct wlr_vk_image_attribs {
VkFormat format;
};
struct wlr_renderer *wlr_vk_renderer_create_with_drm_fd(int drm_fd);
struct wlr_renderer *wlr_vk_renderer_create_with_drm_fd(
struct wl_event_loop *loop, int drm_fd);
VkInstance wlr_vk_renderer_get_instance(struct wlr_renderer *renderer);
VkPhysicalDevice wlr_vk_renderer_get_physical_device(struct wlr_renderer *renderer);

View file

@ -51,7 +51,12 @@ struct wlr_buffer {
bool dropped;
size_t n_locks;
bool accessing_data_ptr;
size_t n_data_ptr_accesses;
uint32_t data_ptr_access_flags; // bitfield of wlr_buffer_data_ptr_access_flag
void *data_ptr_access_data;
uint32_t data_ptr_access_format;
size_t data_ptr_access_stride;
struct {
struct wl_signal destroy;