diff options
| author | Konstantin <const@const.me> | 2023-01-18 21:10:40 +0100 |
|---|---|---|
| committer | Konstantin <const@const.me> | 2023-01-18 21:10:40 +0100 |
| commit | 670f889b7e3af360fbd66ae34bc74e7e393edbfe (patch) | |
| tree | 268707bf77309527d2e9cac02b8adf93c01d4d30 /Examples/WhisperDesktop/LoadModelDlg.cpp | |
| parent | 11c399b70c7ad5664b6060b39632e6b9fa815350 (diff) | |
GUI to force specific version of the compute shaders
Diffstat (limited to 'Examples/WhisperDesktop/LoadModelDlg.cpp')
| -rw-r--r-- | Examples/WhisperDesktop/LoadModelDlg.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Examples/WhisperDesktop/LoadModelDlg.cpp b/Examples/WhisperDesktop/LoadModelDlg.cpp index 3aa84e7..ad41397 100644 --- a/Examples/WhisperDesktop/LoadModelDlg.cpp +++ b/Examples/WhisperDesktop/LoadModelDlg.cpp @@ -2,6 +2,7 @@ #include "LoadModelDlg.h" #include "Utils/miscUtils.h" #include "Utils/logger.h" +#include "ModelAdvancedDlg.h" constexpr int progressMaxInteger = 1024 * 8; @@ -43,8 +44,8 @@ LRESULT LoadModelDlg::OnInitDialog( UINT nMessage, WPARAM wParam, LPARAM lParam, return TRUE; } - editorsWindows.reserve( 5 ); - editorsWindows = { modelPath, cbModelType, GetDlgItem( IDC_BROWSE ), GetDlgItem( IDOK ), GetDlgItem( IDCANCEL ) }; + editorsWindows.reserve( 6 ); + editorsWindows = { modelPath, cbModelType, GetDlgItem( IDC_BROWSE ), GetDlgItem( IDC_MODEL_ADV ), GetDlgItem( IDOK ), GetDlgItem( IDCANCEL ) }; pendingWindows.reserve( 2 ); pendingWindows = { GetDlgItem( IDC_PENDING_TEXT ), progressBar }; @@ -140,7 +141,8 @@ void __stdcall LoadModelDlg::poolCallback() noexcept lmcb.cancel = nullptr; lmcb.progress = &LoadModelDlg::progressCallback; lmcb.pv = this; - HRESULT hr = Whisper::loadModel( path, impl, 0, &lmcb, &model ); + const uint32_t flags = appState.gpuFlagsLoad(); + HRESULT hr = Whisper::loadModel( path, impl, flags, &lmcb, &model ); if( SUCCEEDED( hr ) ) appState.model = model; else @@ -203,4 +205,10 @@ LRESULT LoadModelDlg::OnHyperlink( int idCtrl, LPNMHDR pnmh, BOOL& bHandled ) ShellExecute( NULL, L"open", url, NULL, NULL, SW_SHOW ); bHandled = TRUE; return 0; +} + +void LoadModelDlg::onModelAdvanced() +{ + ModelAdvancedDlg dlg{ appState }; + dlg.show( m_hWnd ); }
\ No newline at end of file |
