Vulkan cannot be used in GrDirectContext

Skip to first unread message

Rosculescu Ciprian

Sep 7, 2021, 6:28:07 PMSep 7
to skia-discuss
I have started by making a CMake project that involves skia, so far so good.
I have made a vulkan environment, which works very well, so now all that was left to do is setup skia with the current environment. 
The problem is that when using GrDirectContext it does not see the function MakeVulkan as a part of the class.

Bellow is my functions
static void SetupSkiaVulkan() {
    #define SK_VULKAN
    GrVkBackendContext* vkContext = new GrVkBackendContext;
    //GrDirectContext* context = nullptr; - compiles fine when the below line is commented out

The error is the following:
[build] ../main.cpp:72:22: error: no type named 'MakeVulkan' in 'GrDirectContext'
[build]     GrDirectContext::MakeVulkan(vkContext);
[build]     ~~~~~~~~~~~~~~~~~^

I do not see anything wrong with this code, can someone please help with what i am missing.

Thank you,

Peter Vullings

Sep 7, 2021, 6:34:54 PMSep 7

This is just a guess, but have you defined SK_VULKAN before you have #included skia?


#define SK_VULKAN

#include ….


static void SetupSkiaVulkan() {

    GrVkBackendContext* vkContext = new GrVkBackendContext;


You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Reply all
Reply to author
0 new messages