Projects
Multimedia
obs-studio
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 77
View file
obs-studio.changes
Changed
@@ -1,4 +1,24 @@ ------------------------------------------------------------------- +Sun Apr 05 21:29:12 UTC 2020 - jimmy@boombatower.com + +- Update to version 25.0.4: + * libobs: Update version to 25.0.4 + * win-capture: Update graphics hook version to 1.1.4 + * UI: Don't stretch server field in Qt 5.14 + * obs-browser: Fix interact keyboard input on Linux + * Decklink: Fix crash when no matching device + * libobs: Fix macOS 10.15 hotkey crash (temporary) + * win-capture: Fix crash if GPU can't Vulkan capture + * docs/sphinx: Bump major OBS version + * UI: Use Qt dialogs for Font & Color Pickers on Linux + * obs-qsv11: Fix QuickSync LA_ICQ encoder settings + * rtmp-services: Remove executable bits from json files + * obs-ffmpeg: Expose old NVENC on Windows 7 + * UI: Fix text handling for dialogs + * libobs-winrt: Stronger exception handling + * UI: Fix silent scenes with imported SL scenes + +------------------------------------------------------------------- Tue Mar 24 15:03:52 UTC 2020 - jimmy@boombatower.com - Update to version 25.0.3:
View file
obs-studio.spec
Changed
@@ -1,5 +1,5 @@ Name: obs-studio -Version: 25.0.3 +Version: 25.0.4 Release: 0 Summary: A recording/broadcasting program Group: Productivity/Multimedia/Video/Editors and Convertors
View file
_service
Changed
@@ -1,7 +1,7 @@ <services> <service name="tar_scm" mode="disabled"> <param name="versionformat">@PARENT_TAG@</param> - <param name="revision">refs/tags/25.0.3</param> + <param name="revision">refs/tags/25.0.4</param> <param name="url">git://github.com/jp9000/obs-studio.git</param> <param name="scm">git</param> <param name="changesgenerate">enable</param>
View file
_servicedata
Changed
@@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/jp9000/obs-studio.git</param> - <param name="changesrevision">3c78a8aa8d5f5c3fd0242697c06582dc96daa012</param> + <param name="changesrevision">47058d9b6999f14bb5e2c76f7ae449efa2ca1c13</param> </service> </servicedata>
View file
obs-studio-25.0.3.tar.xz/UI/forms/OBSBasicSettings.ui -> obs-studio-25.0.4.tar.xz/UI/forms/OBSBasicSettings.ui
Changed
@@ -958,6 +958,12 @@ </item> <item row="0" column="1"> <widget class="QStackedWidget" name="serverStackedWidget"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="currentIndex"> <number>1</number> </property>
View file
obs-studio-25.0.3.tar.xz/UI/importers/sl.cpp -> obs-studio-25.0.4.tar.xz/UI/importers/sl.cpp
Changed
@@ -298,15 +298,8 @@ Json::array filter_items = in_filters["items"].array_items(); Json in_settings = scene["settings"]; - Json in_sync = scene["syncOffset"]; - int sync = (int)(in_sync["sec"].number_value() * 1000000000 + - in_sync["nsec"].number_value()); - - double vol = scene["volume"].number_value(); - bool muted = scene["muted"].bool_value(); string name = scene["name"].string_value(); - int monitoring = scene["monitoringType"].int_value(); Json::object out_hotkeys = Json::object{}; get_hotkey_bindings(out_hotkeys, hotkey_items, ""); @@ -336,11 +329,8 @@ {"id", "scene"}, {"sl_id", sl_id}, {"settings", in_settings}, - {"sync", sync}, - {"volume", vol}, - {"muted", muted}, + {"volume", 1.0}, {"name", out_name}, - {"monitoring_type", monitoring}, {"private_settings", Json::object{}}}; Json in_items = scene["sceneItems"];
View file
obs-studio-25.0.3.tar.xz/UI/properties-view.cpp -> obs-studio-25.0.4.tar.xz/UI/properties-view.cpp
Changed
@@ -1694,7 +1694,7 @@ * other open QDialogs on exit, and * https://bugreports.qt-project.org/browse/QTBUG-34532 */ -#ifdef __APPLE__ +#ifndef _WIN32 options |= QColorDialog::DontUseNativeDialog; #endif @@ -1728,7 +1728,7 @@ QFontDialog::FontDialogOptions options; -#ifdef __APPLE__ +#ifndef _WIN32 options = QFontDialog::DontUseNativeDialog; #endif
View file
obs-studio-25.0.3.tar.xz/UI/window-basic-main.cpp -> obs-studio-25.0.4.tar.xz/UI/window-basic-main.cpp
Changed
@@ -7482,7 +7482,7 @@ obs_data_get_string(curPrivData, "color"); const char *customColor = *oldColor != 0 ? oldColor : "#55FF0000"; -#ifdef __APPLE__ +#ifndef _WIN32 options |= QColorDialog::DontUseNativeDialog; #endif
View file
obs-studio-25.0.3.tar.xz/UI/window-importer.cpp -> obs-studio-25.0.4.tar.xz/UI/window-importer.cpp
Changed
@@ -92,6 +92,9 @@ QSizePolicy::ControlType::LineEdit)); layout->addWidget(text); + QObject::connect(text, SIGNAL(editingFinished()), this, + SLOT(updateText())); + QToolButton *browseButton = new QToolButton(); browseButton->setText("..."); browseButton->setSizePolicy(buttonSizePolicy); @@ -121,8 +124,6 @@ { QLineEdit *text = editor->findChild<QLineEdit *>(); text->setText(index.data().toString()); - QObject::connect(text, SIGNAL(textEdited(QString)), this, - SLOT(updateText())); editor->setProperty(PATH_LIST_PROP, QVariant()); }
View file
obs-studio-25.0.3.tar.xz/UI/window-remux.cpp -> obs-studio-25.0.4.tar.xz/UI/window-remux.cpp
Changed
@@ -112,6 +112,9 @@ QSizePolicy::ControlType::LineEdit)); layout->addWidget(text); + QObject::connect(text, SIGNAL(editingFinished()), this, + SLOT(updateText())); + QToolButton *browseButton = new QToolButton(); browseButton->setText("..."); browseButton->setSizePolicy(buttonSizePolicy); @@ -143,8 +146,6 @@ { QLineEdit *text = editor->findChild<QLineEdit *>(); text->setText(index.data().toString()); - QObject::connect(text, SIGNAL(textEdited(QString)), this, - SLOT(updateText())); editor->setProperty(PATH_LIST_PROP, QVariant()); }
View file
obs-studio-25.0.3.tar.xz/docs/sphinx/conf.py -> obs-studio-25.0.4.tar.xz/docs/sphinx/conf.py
Changed
@@ -57,9 +57,9 @@ # built documents. # # The short X.Y version. -version = '20.1.0' +version = '25.0.0' # The full version, including alpha/beta/rc tags. -release = '20.1.0' +release = '25.0.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.
View file
obs-studio-25.0.3.tar.xz/libobs-winrt/winrt-capture.cpp -> obs-studio-25.0.4.tar.xz/libobs-winrt/winrt-capture.cpp
Changed
@@ -18,10 +18,14 @@ return winrt::Windows::Foundation::Metadata::ApiInformation:: IsApiContractPresent(L"Windows.Foundation.UniversalApiContract", 8); -} catch (winrt::hresult_error &err) { +} catch (const winrt::hresult_error &err) { blog(LOG_ERROR, "winrt_capture_supported (0x%08X): %ls", err.to_abi(), err.message().c_str()); return false; +} catch (...) { + blog(LOG_ERROR, "winrt_capture_supported (0x%08X)", + winrt::to_hresult()); + return false; } extern "C" EXPORT BOOL winrt_capture_cursor_toggle_supported() @@ -34,10 +38,14 @@ #else return false; #endif -} catch (winrt::hresult_error &err) { +} catch (const winrt::hresult_error &err) { blog(LOG_ERROR, "winrt_capture_cursor_toggle_supported (0x%08X): %ls", err.to_abi(), err.message().c_str()); return false; +} catch (...) { + blog(LOG_ERROR, "winrt_capture_cursor_toggle_supported (0x%08X)", + winrt::to_hresult()); + return false; } template<typename T> @@ -353,6 +361,10 @@ blog(LOG_ERROR, "CreateForWindow (0x%08X): %ls", err.to_abi(), err.message().c_str()); return nullptr; + } catch (...) { + blog(LOG_ERROR, "CreateForWindow (0x%08X)", + winrt::to_hresult()); + return nullptr; } const winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice @@ -406,10 +418,13 @@ return capture; -} catch (winrt::hresult_error &err) { +} catch (const winrt::hresult_error &err) { blog(LOG_ERROR, "winrt_capture_init (0x%08X): %ls", err.to_abi(), err.message().c_str()); return nullptr; +} catch (...) { + blog(LOG_ERROR, "winrt_capture_init (0x%08X)", winrt::to_hresult()); + return nullptr; } extern "C" EXPORT void winrt_capture_free(struct winrt_capture *capture)
View file
obs-studio-25.0.3.tar.xz/libobs/obs-cocoa.m -> obs-studio-25.0.4.tar.xz/libobs/obs-cocoa.m
Changed
@@ -175,6 +175,8 @@ blog(LOG_INFO, "OS Name: %s", name ? name : "Unknown"); } +static bool using_10_15_or_above = true; + static void log_os_version(id pi, SEL UTF8StringSel) { typedef id (*version_func)(id, SEL); @@ -186,6 +188,16 @@ const char *version = UTF8String(vs, UTF8StringSel); blog(LOG_INFO, "OS Version: %s", version ? version : "Unknown"); + + if (version) { + int major; + int minor; + + int count = sscanf(version, "Version %d.%d", &major, &minor); + if (count == 2 && major == 10) { + using_10_15_or_above = minor >= 15; + } + } } static void log_os(void) @@ -239,6 +251,7 @@ struct obs_hotkeys_platform { volatile long refs; + bool secure_input_activated; TISInputSourceRef tis; CFDataRef layout_data; UCKeyboardLayout *layout; @@ -1749,6 +1762,14 @@ if (key >= OBS_KEY_LAST_VALUE) return false; + /* if secure input is activated, kill hotkeys. + * + * TODO: rewrite all mac hotkey code, suspect there's a bug in 10.15 + * causing the crash internally. */ + if (plat->secure_input_activated) { + return false; + } + for (size_t i = 0; i < plat->keys[key].num;) { IOHIDElementRef element = plat->keys[key].array[i]; IOHIDValueRef value = 0; @@ -1758,6 +1779,11 @@ continue; } + if (using_10_15_or_above && IsSecureEventInputEnabled()) { + plat->secure_input_activated = true; + return false; + } + if (IOHIDDeviceGetValue(device, element, &value) != kIOReturnSuccess) { i += 1;
View file
obs-studio-25.0.3.tar.xz/libobs/obs-config.h -> obs-studio-25.0.4.tar.xz/libobs/obs-config.h
Changed
@@ -41,7 +41,7 @@ * * Reset to zero each major or minor version */ -#define LIBOBS_API_PATCH_VER 3 +#define LIBOBS_API_PATCH_VER 4 #define MAKE_SEMANTIC_VERSION(major, minor, patch) \ ((major << 24) | (minor << 16) | patch)
View file
obs-studio-25.0.3.tar.xz/plugins/decklink/decklink-output.cpp -> obs-studio-25.0.4.tar.xz/plugins/decklink/decklink-output.cpp
Changed
@@ -60,6 +60,9 @@ device.Set(deviceEnum->FindByHash(decklink->deviceHash)); + if (!device) + return false; + DeckLinkDeviceMode *mode = device->FindOutputMode(decklink->modeID); decklink->SetSize(mode->GetWidth(), mode->GetHeight());
View file
obs-studio-25.0.3.tar.xz/plugins/obs-browser/CMakeLists.txt -> obs-studio-25.0.4.tar.xz/plugins/obs-browser/CMakeLists.txt
Changed
@@ -31,6 +31,16 @@ endif() endif() +if(UNIX AND NOT APPLE) + find_package(X11 REQUIRED) + if(NOT X11_FOUND) + message(STATUS "X11 Not found -- obs-browser plugin disabled.") + return() + endif() + include_directories("${X11_INCLUDE_DIR}") +endif() + + configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/browser-config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/browser-config.h")
View file
obs-studio-25.0.4.tar.xz/plugins/obs-browser/linux-keyboard-helpers.hpp
Added
@@ -0,0 +1,752 @@ +#pragma once + +#define XK_3270 +#include <X11/keysym.h> +#include <X11/XF86keysym.h> + +#ifndef VKEY_UNKNOWN + +#define VKEY_UNKNOWN 0 + +// POSIX specific VKEYs. Note that as of Windows SDK 7.1, 0x97-9F, 0xD8-DA, +// and 0xE8 are unassigned. +#define VKEY_WLAN 0x97 +#define VKEY_POWER 0x98 +#define VKEY_BRIGHTNESS_DOWN 0xD8 +#define VKEY_BRIGHTNESS_UP 0xD9 +#define VKEY_KBD_BRIGHTNESS_DOWN 0xDA +#define VKEY_KBD_BRIGHTNESS_UP 0xE8 + +// Windows does not have a specific key code for AltGr. We use the unused 0xE1 +// (VK_OEM_AX) code to represent AltGr, matching the behaviour of Firefox on +// Linux. +#define VKEY_ALTGR 0xE1 +// Windows does not have a specific key code for Compose. We use the unused +// 0xE6 (VK_ICO_CLEAR) code to represent Compose. +#define VKEY_COMPOSE 0xE6 + +// Left mouse button +#ifndef VKEY_LBUTTON +#define VKEY_LBUTTON 0x01 +#endif +// Right mouse button +#ifndef VKEY_RBUTTON +#define VKEY_RBUTTON 0x02 +#endif +// Middle mouse button (three-button mouse) +#ifndef VKEY_MBUTTON +#define VKEY_MBUTTON 0x04 +#endif +#ifndef VKEY_XBUTTON1 +#define VKEY_XBUTTON1 0x05 +#endif +#ifndef VKEY_XBUTTON2 +#define VKEY_XBUTTON2 0x06 +#endif + +#ifndef VKEY_BACK +#define VKEY_BACK 0x08 +#endif +#ifndef VKEY_TAB +#define VKEY_TAB 0x09 +#endif +#ifndef VKEY_CLEAR +#define VKEY_CLEAR 0x0C +#endif +#ifndef VKEY_RETURN +#define VKEY_RETURN 0x0D +#endif +#ifndef VKEY_SHIFT +#define VKEY_SHIFT 0x10 +#endif +#ifndef VKEY_CONTROL +#define VKEY_CONTROL 0x11 // CTRL key +#endif +#ifndef VKEY_MENU +#define VKEY_MENU 0x12 // ALT key +#endif +#ifndef VKEY_PAUSE +#define VKEY_PAUSE 0x13 // PAUSE key +#endif +#ifndef VKEY_CAPITAL +#define VKEY_CAPITAL 0x14 // CAPS LOCK key +#endif +#ifndef VKEY_KANA +#define VKEY_KANA 0x15 // Input Method Editor (IME) Kana mode +#endif +#ifndef VKEY_HANGUL +#define VKEY_HANGUL 0x15 // IME Hangul mode +#endif +#ifndef VKEY_JUNJA +#define VKEY_JUNJA 0x17 // IME Junja mode +#endif +#ifndef VKEY_FINAL +#define VKEY_FINAL 0x18 // IME final mode +#endif +#ifndef VKEY_HANJA +#define VKEY_HANJA 0x19 // IME Hanja mode +#endif +#ifndef VKEY_KANJI +#define VKEY_KANJI 0x19 // IME Kanji mode +#endif +#ifndef VKEY_ESCAPE +#define VKEY_ESCAPE 0x1B // ESC key +#endif +#ifndef VKEY_CONVERT +#define VKEY_CONVERT 0x1C // IME convert +#endif +#ifndef VKEY_NONCONVERT +#define VKEY_NONCONVERT 0x1D // IME nonconvert +#endif +#ifndef VKEY_ACCEPT +#define VKEY_ACCEPT 0x1E // IME accept +#endif +#ifndef VKEY_MODECHANGE +#define VKEY_MODECHANGE 0x1F // IME mode change request +#endif +#ifndef VKEY_SPACE +#define VKEY_SPACE 0x20 // SPACE key +#endif +#ifndef VKEY_PRIOR +#define VKEY_PRIOR 0x21 // PAGE UP key +#endif +#ifndef VKEY_NEXT +#define VKEY_NEXT 0x22 // PAGE DOWN key +#endif +#ifndef VKEY_END +#define VKEY_END 0x23 // END key +#endif +#ifndef VKEY_HOME +#define VKEY_HOME 0x24 // HOME key +#endif +#ifndef VKEY_LEFT +#define VKEY_LEFT 0x25 // LEFT ARROW key +#endif +#ifndef VKEY_UP +#define VKEY_UP 0x26 // UP ARROW key +#endif +#ifndef VKEY_RIGHT +#define VKEY_RIGHT 0x27 // RIGHT ARROW key +#endif +#ifndef VKEY_DOWN +#define VKEY_DOWN 0x28 // DOWN ARROW key +#endif +#ifndef VKEY_SELECT +#define VKEY_SELECT 0x29 // SELECT key +#endif +#ifndef VKEY_PRINT +#define VKEY_PRINT 0x2A // PRINT key +#endif +#ifndef VKEY_EXECUTE +#define VKEY_EXECUTE 0x2B // EXECUTE key +#endif +#ifndef VKEY_SNAPSHOT +#define VKEY_SNAPSHOT 0x2C // PRINT SCREEN key +#endif +#ifndef VKEY_INSERT +#define VKEY_INSERT 0x2D // INS key +#endif +#ifndef VKEY_DELETE +#define VKEY_DELETE 0x2E // DEL key +#endif +#ifndef VKEY_HELP +#define VKEY_HELP 0x2F // HELP key +#endif + +#define VKEY_0 0x30 +#define VKEY_1 0x31 +#define VKEY_2 0x32 +#define VKEY_3 0x33 +#define VKEY_4 0x34 +#define VKEY_5 0x35 +#define VKEY_6 0x36 +#define VKEY_7 0x37 +#define VKEY_8 0x38 +#define VKEY_9 0x39 +#define VKEY_A 0x41 +#define VKEY_B 0x42 +#define VKEY_C 0x43 +#define VKEY_D 0x44 +#define VKEY_E 0x45 +#define VKEY_F 0x46 +#define VKEY_G 0x47 +#define VKEY_H 0x48 +#define VKEY_I 0x49 +#define VKEY_J 0x4A +#define VKEY_K 0x4B +#define VKEY_L 0x4C +#define VKEY_M 0x4D +#define VKEY_N 0x4E +#define VKEY_O 0x4F +#define VKEY_P 0x50 +#define VKEY_Q 0x51 +#define VKEY_R 0x52 +#define VKEY_S 0x53 +#define VKEY_T 0x54 +#define VKEY_U 0x55 +#define VKEY_V 0x56 +#define VKEY_W 0x57 +#define VKEY_X 0x58 +#define VKEY_Y 0x59 +#define VKEY_Z 0x5A + +#define VKEY_LWIN 0x5B // Left Windows key (Microsoft Natural keyboard) + +#define VKEY_RWIN 0x5C // Right Windows key (Natural keyboard) + +#define VKEY_APPS 0x5D // Applications key (Natural keyboard) + +#define VKEY_SLEEP 0x5F // Computer Sleep key
View file
obs-studio-25.0.3.tar.xz/plugins/obs-browser/obs-browser-source.cpp -> obs-studio-25.0.4.tar.xz/plugins/obs-browser/obs-browser-source.cpp
Changed
@@ -28,6 +28,10 @@ #include <thread> #include <mutex> +#ifdef __linux__ +#include "linux-keyboard-helpers.hpp" +#endif + #ifdef USE_QT_LOOP #include <QEventLoop> #include <QThread> @@ -294,13 +298,19 @@ { uint32_t modifiers = event->modifiers; std::string text = event->text; +#ifdef __linux__ + uint32_t native_vkey = KeyboardCodeFromXKeysym(event->native_vkey); +#else uint32_t native_vkey = event->native_vkey; +#endif + uint32_t native_scancode = event->native_scancode; + uint32_t native_modifiers = event->native_modifiers; ExecuteOnBrowser( [=](CefRefPtr<CefBrowser> cefBrowser) { CefKeyEvent e; e.windows_key_code = native_vkey; - e.native_key_code = 0; + e.native_key_code = native_scancode; e.type = key_up ? KEYEVENT_KEYUP : KEYEVENT_RAWKEYDOWN; @@ -311,13 +321,18 @@ } //e.native_key_code = native_vkey; - e.modifiers = modifiers; + e.modifiers = native_modifiers; cefBrowser->GetHost()->SendKeyEvent(e); if (!text.empty() && !key_up) { e.type = KEYEVENT_CHAR; +#ifdef __linux__ + e.windows_key_code = + KeyboardCodeFromXKeysym(e.character); +#else e.windows_key_code = e.character; - e.native_key_code = native_vkey; +#endif + e.native_key_code = native_scancode; cefBrowser->GetHost()->SendKeyEvent(e); } },
View file
obs-studio-25.0.3.tar.xz/plugins/obs-ffmpeg/obs-ffmpeg.c -> obs-studio-25.0.4.tar.xz/plugins/obs-ffmpeg/obs-ffmpeg.c
Changed
@@ -240,6 +240,11 @@ #ifdef _WIN32 if (get_win_ver_int() > 0x0601) { jim_nvenc_load(); + } else { + // if on Win 7, new nvenc isn't available so there's + // no nvenc encoder for the user to select, expose + // the old encoder directly + nvenc_encoder_info.caps &= ~OBS_ENCODER_CAP_INTERNAL; } #endif obs_register_encoder(&nvenc_encoder_info);
View file
obs-studio-25.0.3.tar.xz/plugins/obs-qsv11/QSV_Encoder_Internal.cpp -> obs-studio-25.0.4.tar.xz/plugins/obs-qsv11/QSV_Encoder_Internal.cpp
Changed
@@ -240,6 +240,7 @@ break; case MFX_RATECONTROL_LA_ICQ: m_mfxEncParams.mfx.ICQQuality = pParams->nICQQuality; + break; case MFX_RATECONTROL_LA_HRD: m_mfxEncParams.mfx.TargetKbps = pParams->nTargetBitRate; m_mfxEncParams.mfx.MaxKbps = pParams->nTargetBitRate;
View file
obs-studio-25.0.3.tar.xz/plugins/win-capture/graphics-hook-ver.h -> obs-studio-25.0.4.tar.xz/plugins/win-capture/graphics-hook-ver.h
Changed
@@ -13,7 +13,7 @@ #define HOOK_VER_MAJOR 1 #define HOOK_VER_MINOR 1 -#define HOOK_VER_PATCH 3 +#define HOOK_VER_PATCH 4 #define STRINGIFY(s) #s #define MAKE_VERSION_NAME(major, minor, patch) \
View file
obs-studio-25.0.3.tar.xz/plugins/win-capture/graphics-hook/vulkan-capture.c -> obs-studio-25.0.4.tar.xz/plugins/win-capture/graphics-hook/vulkan-capture.c
Changed
@@ -1181,18 +1181,17 @@ } static VkResult VKAPI OBS_CreateDevice(VkPhysicalDevice phy_device, - const VkDeviceCreateInfo *cinfo, + const VkDeviceCreateInfo *info, const VkAllocationCallbacks *ac, VkDevice *p_device) { - VkDeviceCreateInfo info = *cinfo; struct vk_inst_data *idata = get_inst_data(phy_device); struct vk_inst_funcs *ifuncs = &idata->funcs; struct vk_data *data = NULL; VkResult ret = VK_ERROR_INITIALIZATION_FAILED; - VkLayerDeviceCreateInfo *ldci = (void *)info.pNext; + VkLayerDeviceCreateInfo *ldci = (void *)info->pNext; /* -------------------------------------------------------- */ /* step through chain until we get to the link info */ @@ -1222,8 +1221,7 @@ PFN_vkCreateDevice createFunc = (PFN_vkCreateDevice)gipa(VK_NULL_HANDLE, "vkCreateDevice"); - ret = createFunc(phy_device, idata->valid ? &info : cinfo, ac, - p_device); + ret = createFunc(phy_device, info, ac, p_device); if (ret != VK_SUCCESS) { goto fail; } @@ -1291,6 +1289,7 @@ if (funcs_not_found) { goto fail; } + if (!idata->valid) { flog("instance not valid"); goto fail; @@ -1320,11 +1319,15 @@ if (!data) return; - for (uint32_t fam_idx = 0; fam_idx < _countof(data->cmd_pools); - fam_idx++) { - struct vk_cmd_pool_data *pool_data = &data->cmd_pools[fam_idx]; - if (pool_data->cmd_pool != VK_NULL_HANDLE) { - vk_shtex_destroy_cmd_pool_objects(data, pool_data); + if (data->valid) { + for (uint32_t fam_idx = 0; fam_idx < _countof(data->cmd_pools); + fam_idx++) { + struct vk_cmd_pool_data *pool_data = + &data->cmd_pools[fam_idx]; + if (pool_data->cmd_pool != VK_NULL_HANDLE) { + vk_shtex_destroy_cmd_pool_objects(data, + pool_data); + } } } @@ -1339,15 +1342,17 @@ const VkAllocationCallbacks *ac, VkSwapchainKHR *p_sc) { struct vk_data *data = get_device_data(device); - struct vk_device_funcs *funcs = &data->funcs; VkSwapchainCreateInfoKHR info = *cinfo; - info.imageUsage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; + if (data->valid) + info.imageUsage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; + struct vk_device_funcs *funcs = &data->funcs; VkResult res = funcs->CreateSwapchainKHR(device, &info, ac, p_sc); debug_res("CreateSwapchainKHR", res); - if (res != VK_SUCCESS) + if ((res != VK_SUCCESS) || !data->valid) return res; + VkSwapchainKHR sc = *p_sc; uint32_t count = 0; @@ -1379,14 +1384,16 @@ struct vk_data *data = get_device_data(device); struct vk_device_funcs *funcs = &data->funcs; - struct vk_swap_data *swap = get_swap_data(data, sc); - if (swap) { - if (data->cur_swap == swap) { - vk_shtex_free(data); + if (data->valid) { + struct vk_swap_data *swap = get_swap_data(data, sc); + if (swap) { + if (data->cur_swap == swap) { + vk_shtex_free(data); + } + + swap->sc = VK_NULL_HANDLE; + swap->hwnd = NULL; } - - swap->sc = VK_NULL_HANDLE; - swap->hwnd = NULL; } funcs->DestroySwapchainKHR(device, sc, ac);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.