[vlc-devel] [PATCH] Add new vulkan/libplacebo-based vout

Niklas Haas vlc at haasn.xyz
Tue Oct 2 16:28:25 CEST 2018


We can also do it like this:

vulkan
├── display.c
├── instance.c
├── instance.h
├── platform.h
├── platform_win32.c
├── platform_xcb.c
└── surface.c

platform.h defines a platform common API like this:

// Initializes a platform-specific context to vk->sys
int vlc_vk_InitPlatform(vlc_vk_t *);
void vlc_vk_ClosePlatform(vlc_vk_t *);

// Contains the required platform-specific instance extension
extern const char * const vlc_vk_PlatformExt;

// Create a vulkan surface to vk->surface
int vlc_vk_CreateSurface(vlc_vk_t *);

Now that I've written the code I think I prefer it like this.
Alternatively, we can have the implementation (i.e. the contents of
platform_foo) live in the same file (surface.c), but grouped together
into a single #ifdef rather than scattered across the file.

I have all three approaches written, let me know what you prefer.

On Tue, 02 Oct 2018 10:07:12 +0200, Thomas Guillem <thomas at gllm.fr> wrote:
> 
> 
> On Mon, Oct 1, 2018, at 19:08, Rémi Denis-Courmont wrote:
> > Hey,
> > 
> > As far as X11 is concerned, please stick to XCB. VLC only uses the piece of 
> > legacy crap known as Xlib where unavoidable - and it is totally avoidable with 
> > Vulkan.
> > 
> > Also split the X11 support code and the generic stuff.
> 
> What do you mean ? Split the commit or the file ? We decided to do like egl. One file for every protocol with ifdefs. 
> 
> > 
> > -- 
> > レミ・デニ-クールモン
> > http://www.remlab.net/
> > 
> > 
> > 
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list