Merge "[SDL_Tizen] Add to support EGL_IMG_context_priority extension" into tizen
[platform/upstream/SDL.git] / src / video / SDL_video.c
index b807412..19b2ae4 100755 (executable)
@@ -519,6 +519,9 @@ SDL_VideoInit(const char *driver_name)
     _this->current_glwin_tls = SDL_TLSCreate();
     _this->current_glctx_tls = SDL_TLSCreate();
 
+    /* Set vk_config to default values */
+    _this->vk_config.driver_loaded = 0;
+
     /* Initialize the video subsystem */
     if (_this->VideoInit(_this) < 0) {
         SDL_VideoQuit();
@@ -1369,6 +1372,10 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
             SDL_SetError("No Vulkan support in video driver");
             return NULL;
         }
+
+        if (_this->vulkan_LoadLibrary(_this, NULL) < 0) {
+            return NULL;
+        }
     }
 
     if ((flags & SDL_WINDOW_OPENGL) && (flags & SDL_WINDOW_VULKAN)) {
@@ -3780,7 +3787,7 @@ SDL_Vulkan_GetInstanceExtensions(SDL_Window* window, unsigned int* count, char**
         return SDL_FALSE;
     }
 
-    return _this->vulkan_GetInstanceExtensions(driver, count, names);
+    return _this->vulkan_GetInstanceExtensions(_this, driver, count, names);
 }
 
 SDL_bool