├── .github └── FUNDING.yml ├── .gitignore ├── .travis.yml ├── CMakeLists.txt ├── CMakeSettings.json ├── LICENSE ├── README.md ├── appveyor.yml ├── gui ├── AutoEmbedLibs │ ├── ICSharpCode.AvalonEdit.dll │ ├── SharpDX.D3DCompiler.dll │ ├── SharpDX.DXGI.dll │ ├── SharpDX.Direct2D1.dll │ ├── SharpDX.Direct3D11.dll │ ├── SharpDX.dll │ └── System.Windows.Interactivity.dll ├── CMakeLists.txt ├── FodyWeavers.xml ├── FodyWeavers.xsd ├── InteractiveDataDisplay.WPF │ ├── Axes │ │ ├── Axis.cs │ │ ├── AxisGrid.cs │ │ ├── AxisOrientation.cs │ │ ├── ILabelProvider.cs │ │ ├── LabelProvider.cs │ │ ├── MinorTicksProvider.cs │ │ ├── PlotAxis.cs │ │ ├── RoundHelper.cs │ │ └── TicksProvider.cs │ ├── Chart.cs │ ├── Common │ │ ├── ArrayHelper.cs │ │ ├── DataRect.cs │ │ ├── IPalette.cs │ │ ├── MathHelper.cs │ │ ├── Palette.cs │ │ └── Range.cs │ ├── Figure.cs │ ├── InteractiveDataDisplay.WPF.csproj │ ├── Legend │ │ ├── CountToVisibilityConverter.cs │ │ ├── DefaultTemplates.xaml │ │ ├── Legend.cs │ │ ├── LegendItemsPanel.cs │ │ └── SizeLegendControl.cs │ ├── Navigation │ │ ├── KeyboardNavigation.cs │ │ └── MouseNavigation.cs │ ├── Palette │ │ ├── Palette.Converters.cs │ │ └── PaletteControl.cs │ ├── PlotBase.cs │ ├── PlotCompositionChange.cs │ ├── Plots │ │ ├── Base │ │ │ ├── BackgroundBitmapRenderer.cs │ │ │ └── Plot.cs │ │ ├── BingMaps │ │ │ └── BingMapsChart.cs │ │ ├── Heatmap │ │ │ ├── HeatmapBuilder.cs │ │ │ ├── HeatmapGraph.cs │ │ │ └── HeatmapTooltipLayer.cs │ │ ├── Line │ │ │ └── LineGraph.cs │ │ └── Markers │ │ │ ├── CartesianMarkerGraph.cs │ │ │ ├── DataSeries.cs │ │ │ ├── DynamicMarkerViewModel.cs │ │ │ ├── GenericDataSeries.cs │ │ │ ├── MarkerGraph.Converters.cs │ │ │ ├── MarkerGraph.cs │ │ │ ├── MarkerGraphsWithTemplates.cs │ │ │ └── MarkerTemplates.xaml │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Themes │ │ └── Generic.xaml │ ├── Transforms │ │ └── DataTransforms.cs │ └── VerticalContentControl.cs ├── Optick │ ├── App.xaml │ ├── App.xaml.cs │ ├── AppBootStrapper.cs │ ├── Controls │ │ ├── AttachmentViewControl.xaml │ │ ├── AttachmentViewControl.xaml.cs │ │ ├── CaptureStats.xaml │ │ ├── CaptureStats.xaml.cs │ │ ├── CaptureThumbnail.xaml │ │ ├── CaptureThumbnail.xaml.cs │ │ ├── EditStorageListDialog.xaml │ │ ├── EditStorageListDialog.xaml.cs │ │ ├── EditTaskTrackerListDialog.xaml │ │ ├── EditTaskTrackerListDialog.xaml.cs │ │ ├── FileHistory.xaml │ │ ├── FileHistory.xaml.cs │ │ ├── FrameCapture.xaml │ │ ├── FrameCapture.xaml.cs │ │ ├── FunctionSearch.xaml │ │ ├── FunctionSearch.xaml.cs │ │ ├── RoutedEvents.cs │ │ ├── Settings.cs │ │ ├── SettingsControl.xaml │ │ ├── SettingsControl.xaml.cs │ │ ├── SharedSettings.cs │ │ ├── TagsControl.xaml │ │ └── TagsControl.xaml.cs │ ├── FodyWeavers.xml │ ├── FodyWeavers.xsd │ ├── Frames │ │ ├── FrameDataTable.xaml │ │ ├── FrameDataTable.xaml.cs │ │ ├── FrameInfo.xaml │ │ ├── FrameInfo.xaml.cs │ │ ├── SourceViewControl.xaml │ │ └── SourceViewControl.xaml.cs │ ├── Optick.csproj │ ├── Platform │ │ └── Platform.cs │ ├── ProfilerClient.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── DesignTimeResources.xaml │ │ ├── Resources.Designer.cs │ │ └── Resources.resx │ ├── Resources │ │ ├── Bug.ico │ │ └── icon.ico │ ├── SamplingFrameControl.xaml │ ├── SamplingFrameControl.xaml.cs │ ├── SearchBox.xaml │ ├── SearchBox.xaml.cs │ ├── SourceWindow.xaml │ ├── SourceWindow.xaml.cs │ ├── TaskManager │ │ ├── AttachmentStorage.cs │ │ ├── TaskTracker.cs │ │ └── brofiler-github-07994fd14248.p12 │ ├── TimeLine │ │ ├── Icons │ │ │ ├── CallStack-icon.png │ │ │ ├── Clear-icon.png │ │ │ ├── ClearSampling-icon.png │ │ │ ├── Eye-icon.png │ │ │ ├── Filter-icon.png │ │ │ ├── Glasses-icon.png │ │ │ ├── Hook-icon.png │ │ │ ├── Pause-icon.png │ │ │ ├── Percent-icon.png │ │ │ ├── Play-icon.png │ │ │ ├── Save-icon.png │ │ │ ├── Search-icon.png │ │ │ ├── Source-icon.png │ │ │ ├── Stop-icon.ico │ │ │ ├── Stop-icon.png │ │ │ ├── Timer-icon.png │ │ │ ├── Trash2-icon.png │ │ │ └── Warning-icon.png │ │ ├── TimeLine.xaml │ │ ├── TimeLine.xaml.cs │ │ ├── TimeLineItem.xaml │ │ └── TimeLineItem.xaml.cs │ ├── ViewModels │ │ ├── AddressBarViewModel.cs │ │ ├── CaptureSettingsViewModel.cs │ │ ├── FunctionSummaryViewModel.cs │ │ ├── MainViewModel.cs │ │ ├── MemoryStatsViewModel.cs │ │ ├── ScreenShotViewModel.cs │ │ ├── SummaryViewerModel.cs │ │ └── TaskTrackerViewModel.cs │ ├── Views │ │ ├── AddressBarView.xaml │ │ ├── AddressBarView.xaml.cs │ │ ├── CaptureSettingsView.xaml │ │ ├── CaptureSettingsView.xaml.cs │ │ ├── FunctionDescriptionView.xaml │ │ ├── FunctionDescriptionView.xaml.cs │ │ ├── FunctionHistoryChartView.xaml │ │ ├── FunctionHistoryChartView.xaml.cs │ │ ├── FunctionHistoryTableView.xaml │ │ ├── FunctionHistoryTableView.xaml.cs │ │ ├── FunctionInstanceView.xaml │ │ ├── FunctionInstanceView.xaml.cs │ │ ├── FunctionSummaryView.xaml │ │ ├── FunctionSummaryView.xaml.cs │ │ ├── MainView.xaml │ │ ├── MainView.xaml.cs │ │ ├── ScreenShotView.xaml │ │ ├── ScreenShotView.xaml.cs │ │ ├── SummaryViewer.xaml │ │ ├── SummaryViewer.xaml.cs │ │ ├── TaskTrackerView.xaml │ │ └── TaskTrackerView.xaml.cs │ ├── app.config │ ├── packages.config │ └── themes │ │ ├── BaseDark.xaml │ │ ├── Blue.xaml │ │ ├── Brushes.xaml │ │ ├── Controls.xaml │ │ ├── Steel.xaml │ │ └── Window.xaml ├── OptickApp_vs2022.sln ├── OptickVSIX │ ├── BuildProgressState.cs │ ├── BuildProgressWindow.cs │ ├── BuildProgressWindowCommand.cs │ ├── OptickVSIX.csproj │ ├── OptickVSIXPackage.cs │ ├── OptickVSIXPackage.vsct │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── BuildProgressWindowCommand.png │ │ └── Style.xaml │ ├── ViewModels │ │ └── BuildViewModel.cs │ ├── Views │ │ ├── BuildProgressWindowControl.xaml │ │ └── BuildProgressWindowControl.xaml.cs │ └── source.extension.vsixmanifest ├── Profiler.Controls │ ├── ColorToBrushConverter.cs │ ├── ControlUtils.cs │ ├── Converters.cs │ ├── FunctionSearch.xaml │ ├── FunctionSearch.xaml.cs │ ├── Icons │ │ └── Icons.xaml │ ├── Profiler.Controls.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RoutedEvents.cs │ ├── SourceView.cs │ ├── ThreadView │ │ ├── ChartRow.cs │ │ ├── EventThreadView.xaml │ │ ├── EventThreadView.xaml.cs │ │ ├── EventsThreadRow.cs │ │ ├── SamplingThreadView.xaml │ │ ├── SamplingThreadView.xaml.cs │ │ ├── ThreadNameView.xaml │ │ ├── ThreadNameView.xaml.cs │ │ ├── ThreadRow.cs │ │ ├── ThreadViewControl.xaml │ │ ├── ThreadViewControl.xaml.cs │ │ └── ThreadViewSettings.cs │ ├── ViewModels │ │ ├── SamplingViewModel.cs │ │ └── ThreadFilterViewModel.cs │ ├── Views │ │ ├── ThreadFilterView.xaml │ │ └── ThreadFilterView.xaml.cs │ └── packages.config ├── Profiler.Data │ ├── Callstack.cs │ ├── Capture.cs │ ├── CaptureSettings.cs │ ├── Communication │ │ └── Message.cs │ ├── Durationable.cs │ ├── EventBoard.cs │ ├── EventData.cs │ ├── EventDescription.cs │ ├── EventFrame.cs │ ├── EventTree.cs │ ├── Frame.cs │ ├── FrameCollection.cs │ ├── FunctionStats.cs │ ├── Mode.cs │ ├── Profiler.Data.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ResponseHolder.cs │ ├── SamplingFrame.cs │ ├── Summary.cs │ ├── Synchronization.cs │ ├── SysCall.cs │ ├── Tag.cs │ ├── TraceGroup.cs │ ├── Utils.cs │ └── packages.config ├── Profiler.DirectX │ ├── ComplexDynamicMesh.cs │ ├── DirectXCanvas.xaml │ ├── DirectXCanvas.xaml.cs │ ├── DynamicBuffer.cs │ ├── DynamicMesh.cs │ ├── Fonts │ │ ├── SegoeUI_16_Normal.fnt │ │ ├── SegoeUI_16_Normal_0.png │ │ ├── SegoeUI_20_Normal.fnt │ │ ├── SegoeUI_20_Normal_0.png │ │ ├── SegoeUI_24_Normal.fnt │ │ ├── SegoeUI_24_Normal_0.png │ │ ├── SegoeUI_28_Normal.fnt │ │ ├── SegoeUI_28_Normal_0.png │ │ ├── SegoeUI_32_Normal.fnt │ │ └── SegoeUI_32_Normal_0.png │ ├── Fragment.cs │ ├── Mesh.cs │ ├── Profiler.DirectX.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RenderSettings.cs │ ├── ScrollableWinFormsHost.cs │ ├── Shaders │ │ ├── Basic.fx │ │ ├── Basic_ps.fxo │ │ ├── Basic_vs.fxo │ │ ├── Compile.bat │ │ ├── Text.fx │ │ ├── Text_ps.fxo │ │ └── Text_vs.fxo │ ├── TextManager.cs │ ├── TextureLoader.cs │ └── Utils.cs ├── Profiler.InfrastructureMvvm │ ├── BaseViewModel.cs │ ├── BoolToVisibilityConverter.cs │ ├── BootStrapperBase.cs │ ├── DialogManager.cs │ ├── DialogViewModel.cs │ ├── FileDialogService.cs │ ├── IDialogManager.cs │ ├── IDialogViewModel.cs │ ├── IFileDialogService.cs │ ├── IOnClosingHandler.cs │ ├── IOnLoadedHandler.cs │ ├── IUiExecution.cs │ ├── IWindowManager.cs │ ├── Profiler.InfrastructureMvvm.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RelayCommand.cs │ ├── RelayCommandAsync.cs │ ├── RelayCommandGeneric.cs │ ├── RelayCommandGenericAsync.cs │ ├── ViewLocator.cs │ ├── ViewModelLocator.cs │ ├── ViewModelPresenter.cs │ ├── WindowManager.cs │ └── packages.config ├── Profiler.Interop │ ├── DbgHelp.cs │ ├── NtDll.cs │ ├── Profiler.Interop.csproj │ └── Properties │ │ └── AssemblyInfo.cs └── Profiler.Trace │ ├── Config.cs │ ├── DataCollector.cs │ ├── DataEvents.cs │ ├── DiagnosticsCollector.cs │ ├── ETWCollector.cs │ ├── Profiler.Trace.csproj │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── premake5.lua ├── samples ├── Common │ ├── TaskScheduler │ │ ├── README.txt │ │ └── Scheduler │ │ │ ├── Include │ │ │ ├── MTAppInterop.h │ │ │ ├── MTArrayView.h │ │ │ ├── MTAtomic.h │ │ │ ├── MTColorTable.h │ │ │ ├── MTConcurrentRingBuffer.h │ │ │ ├── MTConfig.h │ │ │ ├── MTDebug.h │ │ │ ├── MTFiberContext.h │ │ │ ├── MTFiberContext.inl │ │ │ ├── MTGroupedTask.h │ │ │ ├── MTPlatform.h │ │ │ ├── MTProfilerEventListener.h │ │ │ ├── MTQueueMPMC.h │ │ │ ├── MTScheduler.h │ │ │ ├── MTScheduler.inl │ │ │ ├── MTStackRequirements.h │ │ │ ├── MTStaticVector.h │ │ │ ├── MTTaskBucket.h │ │ │ ├── MTTaskDesc.h │ │ │ ├── MTTaskGroup.h │ │ │ ├── MTTaskPool.h │ │ │ ├── MTTaskQueue.h │ │ │ ├── MTThreadContext.h │ │ │ ├── MTTools.h │ │ │ ├── MTTypes.h │ │ │ ├── Platform │ │ │ │ ├── Common │ │ │ │ │ ├── MTAtomic.h │ │ │ │ │ ├── MTSpinWait.h │ │ │ │ │ └── MTThread.h │ │ │ │ ├── Posix │ │ │ │ │ ├── MTAtomic.h │ │ │ │ │ ├── MTCommon.h │ │ │ │ │ ├── MTEvent.h │ │ │ │ │ ├── MTFiber.h │ │ │ │ │ ├── MTMemory.h │ │ │ │ │ ├── MTMutex.h │ │ │ │ │ ├── MTThread.h │ │ │ │ │ └── MTUtils.h │ │ │ │ └── Windows │ │ │ │ │ ├── MTAtomic.h │ │ │ │ │ ├── MTCommon.h │ │ │ │ │ ├── MTEvent.h │ │ │ │ │ ├── MTFiber.h │ │ │ │ │ ├── MTFiberDefault.h │ │ │ │ │ ├── MTFiberOptimized.h │ │ │ │ │ ├── MTMemory.h │ │ │ │ │ ├── MTMutex.h │ │ │ │ │ ├── MTThread.h │ │ │ │ │ ├── MTUtils.h │ │ │ │ │ ├── MicroWindows.cpp │ │ │ │ │ └── MicroWindows.h │ │ │ └── Scopes │ │ │ │ └── MTScopes.h │ │ │ └── Source │ │ │ ├── MTDefaultAppInterop.cpp │ │ │ ├── MTFiberContext.cpp │ │ │ ├── MTScheduler.cpp │ │ │ └── MTThreadContext.cpp │ └── TestEngine │ │ ├── TestEngine.cpp │ │ ├── TestEngine.h │ │ └── TestImage.h ├── ConsoleApp │ └── main.cpp ├── ConsoleAppMT │ └── main.cpp ├── DurangoUWP │ ├── App.cpp │ ├── App.h │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.png │ │ └── Wide310x150Logo.scale-200.png │ ├── BrofilerDurangoTest.vcxproj │ ├── BrofilerDurangoTest.vcxproj.filters │ ├── BrofilerDurangoTestMain.cpp │ ├── BrofilerDurangoTestMain.h │ ├── BrofilerDurangoTest_TemporaryKey.pfx │ ├── BrofilerDurangoTest_backup.vcxproj │ ├── BrofilerDurangoTest_backup.vcxproj.filters │ ├── Common │ │ ├── DeviceResources.cpp │ │ ├── DeviceResources.h │ │ ├── DirectXHelper.h │ │ └── StepTimer.h │ ├── Content │ │ ├── Sample3DSceneRenderer.cpp │ │ ├── Sample3DSceneRenderer.h │ │ ├── SampleFpsTextRenderer.cpp │ │ ├── SampleFpsTextRenderer.h │ │ ├── SamplePixelShader.hlsl │ │ ├── SampleVertexShader.hlsl │ │ └── ShaderStructures.h │ ├── Package.appxmanifest │ ├── pch.cpp │ └── pch.h ├── UnrealEnginePlugin │ ├── Config │ │ └── FilterPlugin.ini │ ├── GUI │ │ └── Config.xml │ ├── OptickPlugin.uplugin │ ├── Resources │ │ └── Icon128.png │ ├── Setup.bat │ └── Source │ │ ├── OptickPlugin.Build.cs │ │ ├── Private │ │ ├── OptickCommands.cpp │ │ ├── OptickCommands.h │ │ ├── OptickPlugin.cpp │ │ ├── OptickStyle.cpp │ │ ├── OptickStyle.h │ │ └── OptickUE4Classes.h │ │ ├── Public │ │ └── IOptickPlugin.h │ │ └── ThirdParty │ │ └── Optick │ │ └── README.txt ├── WindowsD3D12 │ ├── Camera.cpp │ ├── Camera.h │ ├── D3D12Multithreading.cpp │ ├── D3D12Multithreading.h │ ├── DXSample.cpp │ ├── DXSample.h │ ├── DXSampleHelper.h │ ├── FrameResource.cpp │ ├── FrameResource.h │ ├── Main.cpp │ ├── ScreenGrab12.cpp │ ├── ScreenGrab12.h │ ├── SquidRoom.bin │ ├── SquidRoom.h │ ├── StepTimer.h │ ├── Win32Application.cpp │ ├── Win32Application.h │ ├── d3dx12.h │ ├── shaders.hlsl │ ├── stdafx.cpp │ └── stdafx.h └── WindowsVulkan │ ├── assimp │ ├── .editorconfig │ ├── Compiler │ │ ├── poppack1.h │ │ ├── pstdint.h │ │ └── pushpack1.h │ ├── DefaultLogger.hpp │ ├── Exporter.hpp │ ├── IOStream.hpp │ ├── IOSystem.hpp │ ├── Importer.hpp │ ├── LogStream.hpp │ ├── Logger.hpp │ ├── NullLogger.hpp │ ├── ProgressHandler.hpp │ ├── ai_assert.h │ ├── anim.h │ ├── camera.h │ ├── cexport.h │ ├── cfileio.h │ ├── cimport.h │ ├── color4.h │ ├── color4.inl │ ├── config.h │ ├── defs.h │ ├── importerdesc.h │ ├── light.h │ ├── material.h │ ├── material.inl │ ├── matrix3x3.h │ ├── matrix3x3.inl │ ├── matrix4x4.h │ ├── matrix4x4.inl │ ├── mesh.h │ ├── metadata.h │ ├── port │ │ └── AndroidJNI │ │ │ └── AndroidJNIIOSystem.h │ ├── postprocess.h │ ├── quaternion.h │ ├── quaternion.inl │ ├── scene.h │ ├── texture.h │ ├── types.h │ ├── vector2.h │ ├── vector2.inl │ ├── vector3.h │ ├── vector3.inl │ └── version.h │ ├── base │ ├── VulkanAndroid.cpp │ ├── VulkanAndroid.h │ ├── VulkanBuffer.hpp │ ├── VulkanDebug.cpp │ ├── VulkanDebug.h │ ├── VulkanDevice.hpp │ ├── VulkanFrameBuffer.hpp │ ├── VulkanHeightmap.hpp │ ├── VulkanInitializers.hpp │ ├── VulkanModel.hpp │ ├── VulkanSwapChain.hpp │ ├── VulkanTexture.hpp │ ├── VulkanTools.cpp │ ├── VulkanTools.h │ ├── VulkanUIOverlay.cpp │ ├── VulkanUIOverlay.h │ ├── VulkanglTFModel.hpp │ ├── benchmark.hpp │ ├── camera.hpp │ ├── frustum.hpp │ ├── keycodes.hpp │ ├── threadpool.hpp │ ├── vulkanexamplebase.cpp │ └── vulkanexamplebase.h │ ├── data │ ├── models │ │ ├── retroufo.dae │ │ ├── retroufo_glow.dae │ │ ├── retroufo_license.txt │ │ ├── retroufo_red.dae │ │ ├── retroufo_red_lowpoly.dae │ │ ├── sphere.3ds │ │ └── sphere.obj │ └── shaders │ │ ├── base │ │ ├── uioverlay.frag │ │ ├── uioverlay.frag.spv │ │ ├── uioverlay.vert │ │ └── uioverlay.vert.spv │ │ └── multithreading │ │ ├── generate-spirv.bat │ │ ├── phong.frag │ │ ├── phong.frag.spv │ │ ├── phong.vert │ │ ├── phong.vert.spv │ │ ├── starsphere.frag │ │ ├── starsphere.frag.spv │ │ ├── starsphere.vert │ │ └── starsphere.vert.spv │ ├── dll │ └── assimp-vc140-mt.dll │ ├── gli │ ├── CMakeLists.txt │ ├── clear.hpp │ ├── comparison.hpp │ ├── convert.hpp │ ├── copy.hpp │ ├── core │ │ ├── bc.hpp │ │ ├── bc.inl │ │ ├── clear.hpp │ │ ├── clear.inl │ │ ├── comparison.inl │ │ ├── convert.inl │ │ ├── convert_func.hpp │ │ ├── coord.hpp │ │ ├── copy.inl │ │ ├── duplicate.inl │ │ ├── dx.inl │ │ ├── file.hpp │ │ ├── file.inl │ │ ├── filter.hpp │ │ ├── filter.inl │ │ ├── filter_compute.hpp │ │ ├── flip.hpp │ │ ├── flip.inl │ │ ├── format.inl │ │ ├── generate_mipmaps.inl │ │ ├── gl.inl │ │ ├── image.inl │ │ ├── levels.inl │ │ ├── load.inl │ │ ├── load_dds.inl │ │ ├── load_kmg.inl │ │ ├── load_ktx.inl │ │ ├── make_texture.inl │ │ ├── mipmaps_compute.hpp │ │ ├── reduce.inl │ │ ├── s3tc.hpp │ │ ├── s3tc.inl │ │ ├── sampler.inl │ │ ├── sampler1d.inl │ │ ├── sampler1d_array.inl │ │ ├── sampler2d.inl │ │ ├── sampler2d_array.inl │ │ ├── sampler3d.inl │ │ ├── sampler_cube.inl │ │ ├── sampler_cube_array.inl │ │ ├── save.inl │ │ ├── save_dds.inl │ │ ├── save_kmg.inl │ │ ├── save_ktx.inl │ │ ├── storage.hpp │ │ ├── storage.inl │ │ ├── storage_linear.hpp │ │ ├── storage_linear.inl │ │ ├── texture.inl │ │ ├── texture1d.inl │ │ ├── texture1d_array.inl │ │ ├── texture2d.inl │ │ ├── texture2d_array.inl │ │ ├── texture3d.inl │ │ ├── texture_cube.inl │ │ ├── texture_cube_array.inl │ │ ├── transform.inl │ │ ├── view.inl │ │ └── workaround.hpp │ ├── duplicate.hpp │ ├── dx.hpp │ ├── format.hpp │ ├── generate_mipmaps.hpp │ ├── gl.hpp │ ├── gli.hpp │ ├── image.hpp │ ├── levels.hpp │ ├── load.hpp │ ├── load_dds.hpp │ ├── load_kmg.hpp │ ├── load_ktx.hpp │ ├── make_texture.hpp │ ├── reduce.hpp │ ├── sampler.hpp │ ├── sampler1d.hpp │ ├── sampler1d_array.hpp │ ├── sampler2d.hpp │ ├── sampler2d_array.hpp │ ├── sampler3d.hpp │ ├── sampler_cube.hpp │ ├── sampler_cube_array.hpp │ ├── save.hpp │ ├── save_dds.hpp │ ├── save_kmg.hpp │ ├── save_ktx.hpp │ ├── target.hpp │ ├── texture.hpp │ ├── texture1d.hpp │ ├── texture1d_array.hpp │ ├── texture2d.hpp │ ├── texture2d_array.hpp │ ├── texture3d.hpp │ ├── texture_cube.hpp │ ├── texture_cube_array.hpp │ ├── transform.hpp │ ├── type.hpp │ └── view.hpp │ ├── glm │ ├── CMakeLists.txt │ ├── common.hpp │ ├── detail │ │ ├── _features.hpp │ │ ├── _fixes.hpp │ │ ├── _noise.hpp │ │ ├── _swizzle.hpp │ │ ├── _swizzle_func.hpp │ │ ├── _vectorize.hpp │ │ ├── dummy.cpp │ │ ├── func_common.hpp │ │ ├── func_common.inl │ │ ├── func_common_simd.inl │ │ ├── func_exponential.hpp │ │ ├── func_exponential.inl │ │ ├── func_exponential_simd.inl │ │ ├── func_geometric.hpp │ │ ├── func_geometric.inl │ │ ├── func_geometric_simd.inl │ │ ├── func_integer.hpp │ │ ├── func_integer.inl │ │ ├── func_integer_simd.inl │ │ ├── func_matrix.hpp │ │ ├── func_matrix.inl │ │ ├── func_matrix_simd.inl │ │ ├── func_packing.hpp │ │ ├── func_packing.inl │ │ ├── func_packing_simd.inl │ │ ├── func_trigonometric.hpp │ │ ├── func_trigonometric.inl │ │ ├── func_trigonometric_simd.inl │ │ ├── func_vector_relational.hpp │ │ ├── func_vector_relational.inl │ │ ├── func_vector_relational_simd.inl │ │ ├── glm.cpp │ │ ├── precision.hpp │ │ ├── setup.hpp │ │ ├── type_float.hpp │ │ ├── type_gentype.hpp │ │ ├── type_gentype.inl │ │ ├── type_half.hpp │ │ ├── type_half.inl │ │ ├── type_int.hpp │ │ ├── type_mat.hpp │ │ ├── type_mat.inl │ │ ├── type_mat2x2.hpp │ │ ├── type_mat2x2.inl │ │ ├── type_mat2x3.hpp │ │ ├── type_mat2x3.inl │ │ ├── type_mat2x4.hpp │ │ ├── type_mat2x4.inl │ │ ├── type_mat3x2.hpp │ │ ├── type_mat3x2.inl │ │ ├── type_mat3x3.hpp │ │ ├── type_mat3x3.inl │ │ ├── type_mat3x4.hpp │ │ ├── type_mat3x4.inl │ │ ├── type_mat4x2.hpp │ │ ├── type_mat4x2.inl │ │ ├── type_mat4x3.hpp │ │ ├── type_mat4x3.inl │ │ ├── type_mat4x4.hpp │ │ ├── type_mat4x4.inl │ │ ├── type_mat4x4_simd.inl │ │ ├── type_vec.hpp │ │ ├── type_vec.inl │ │ ├── type_vec1.hpp │ │ ├── type_vec1.inl │ │ ├── type_vec2.hpp │ │ ├── type_vec2.inl │ │ ├── type_vec3.hpp │ │ ├── type_vec3.inl │ │ ├── type_vec4.hpp │ │ ├── type_vec4.inl │ │ └── type_vec4_simd.inl │ ├── exponential.hpp │ ├── ext.hpp │ ├── fwd.hpp │ ├── geometric.hpp │ ├── glm.hpp │ ├── gtc │ │ ├── bitfield.hpp │ │ ├── bitfield.inl │ │ ├── color_space.hpp │ │ ├── color_space.inl │ │ ├── constants.hpp │ │ ├── constants.inl │ │ ├── epsilon.hpp │ │ ├── epsilon.inl │ │ ├── functions.hpp │ │ ├── functions.inl │ │ ├── integer.hpp │ │ ├── integer.inl │ │ ├── matrix_access.hpp │ │ ├── matrix_access.inl │ │ ├── matrix_integer.hpp │ │ ├── matrix_inverse.hpp │ │ ├── matrix_inverse.inl │ │ ├── matrix_transform.hpp │ │ ├── matrix_transform.inl │ │ ├── noise.hpp │ │ ├── noise.inl │ │ ├── packing.hpp │ │ ├── packing.inl │ │ ├── quaternion.hpp │ │ ├── quaternion.inl │ │ ├── quaternion_simd.inl │ │ ├── random.hpp │ │ ├── random.inl │ │ ├── reciprocal.hpp │ │ ├── reciprocal.inl │ │ ├── round.hpp │ │ ├── round.inl │ │ ├── type_aligned.hpp │ │ ├── type_precision.hpp │ │ ├── type_precision.inl │ │ ├── type_ptr.hpp │ │ ├── type_ptr.inl │ │ ├── ulp.hpp │ │ ├── ulp.inl │ │ ├── vec1.hpp │ │ └── vec1.inl │ ├── gtx │ │ ├── associated_min_max.hpp │ │ ├── associated_min_max.inl │ │ ├── bit.hpp │ │ ├── bit.inl │ │ ├── closest_point.hpp │ │ ├── closest_point.inl │ │ ├── color_encoding.hpp │ │ ├── color_encoding.inl │ │ ├── color_space.hpp │ │ ├── color_space.inl │ │ ├── color_space_YCoCg.hpp │ │ ├── color_space_YCoCg.inl │ │ ├── common.hpp │ │ ├── common.inl │ │ ├── compatibility.hpp │ │ ├── compatibility.inl │ │ ├── component_wise.hpp │ │ ├── component_wise.inl │ │ ├── dual_quaternion.hpp │ │ ├── dual_quaternion.inl │ │ ├── euler_angles.hpp │ │ ├── euler_angles.inl │ │ ├── extend.hpp │ │ ├── extend.inl │ │ ├── extended_min_max.hpp │ │ ├── extended_min_max.inl │ │ ├── exterior_product.hpp │ │ ├── exterior_product.inl │ │ ├── fast_exponential.hpp │ │ ├── fast_exponential.inl │ │ ├── fast_square_root.hpp │ │ ├── fast_square_root.inl │ │ ├── fast_trigonometry.hpp │ │ ├── fast_trigonometry.inl │ │ ├── float_notmalize.inl │ │ ├── gradient_paint.hpp │ │ ├── gradient_paint.inl │ │ ├── handed_coordinate_space.hpp │ │ ├── handed_coordinate_space.inl │ │ ├── hash.hpp │ │ ├── hash.inl │ │ ├── integer.hpp │ │ ├── integer.inl │ │ ├── intersect.hpp │ │ ├── intersect.inl │ │ ├── io.hpp │ │ ├── io.inl │ │ ├── log_base.hpp │ │ ├── log_base.inl │ │ ├── matrix_cross_product.hpp │ │ ├── matrix_cross_product.inl │ │ ├── matrix_decompose.hpp │ │ ├── matrix_decompose.inl │ │ ├── matrix_factorisation.hpp │ │ ├── matrix_factorisation.inl │ │ ├── matrix_interpolation.hpp │ │ ├── matrix_interpolation.inl │ │ ├── matrix_major_storage.hpp │ │ ├── matrix_major_storage.inl │ │ ├── matrix_operation.hpp │ │ ├── matrix_operation.inl │ │ ├── matrix_query.hpp │ │ ├── matrix_query.inl │ │ ├── matrix_transform_2d.hpp │ │ ├── matrix_transform_2d.inl │ │ ├── mixed_product.hpp │ │ ├── mixed_product.inl │ │ ├── norm.hpp │ │ ├── norm.inl │ │ ├── normal.hpp │ │ ├── normal.inl │ │ ├── normalize_dot.hpp │ │ ├── normalize_dot.inl │ │ ├── number_precision.hpp │ │ ├── number_precision.inl │ │ ├── optimum_pow.hpp │ │ ├── optimum_pow.inl │ │ ├── orthonormalize.hpp │ │ ├── orthonormalize.inl │ │ ├── perpendicular.hpp │ │ ├── perpendicular.inl │ │ ├── polar_coordinates.hpp │ │ ├── polar_coordinates.inl │ │ ├── projection.hpp │ │ ├── projection.inl │ │ ├── quaternion.hpp │ │ ├── quaternion.inl │ │ ├── range.hpp │ │ ├── raw_data.hpp │ │ ├── raw_data.inl │ │ ├── rotate_normalized_axis.hpp │ │ ├── rotate_normalized_axis.inl │ │ ├── rotate_vector.hpp │ │ ├── rotate_vector.inl │ │ ├── scalar_multiplication.hpp │ │ ├── scalar_relational.hpp │ │ ├── scalar_relational.inl │ │ ├── spline.hpp │ │ ├── spline.inl │ │ ├── std_based_type.hpp │ │ ├── std_based_type.inl │ │ ├── string_cast.hpp │ │ ├── string_cast.inl │ │ ├── transform.hpp │ │ ├── transform.inl │ │ ├── transform2.hpp │ │ ├── transform2.inl │ │ ├── type_aligned.hpp │ │ ├── type_aligned.inl │ │ ├── type_trait.hpp │ │ ├── type_trait.inl │ │ ├── vec_swizzle.hpp │ │ ├── vector_angle.hpp │ │ ├── vector_angle.inl │ │ ├── vector_query.hpp │ │ ├── vector_query.inl │ │ ├── wrap.hpp │ │ └── wrap.inl │ ├── integer.hpp │ ├── mat2x2.hpp │ ├── mat2x3.hpp │ ├── mat2x4.hpp │ ├── mat3x2.hpp │ ├── mat3x3.hpp │ ├── mat3x4.hpp │ ├── mat4x2.hpp │ ├── mat4x3.hpp │ ├── mat4x4.hpp │ ├── matrix.hpp │ ├── packing.hpp │ ├── simd │ │ ├── common.h │ │ ├── exponential.h │ │ ├── geometric.h │ │ ├── integer.h │ │ ├── matrix.h │ │ ├── packing.h │ │ ├── platform.h │ │ ├── trigonometric.h │ │ └── vector_relational.h │ ├── trigonometric.hpp │ ├── vec2.hpp │ ├── vec3.hpp │ ├── vec4.hpp │ └── vector_relational.hpp │ ├── imgui │ ├── LICENSE.txt │ ├── imconfig.h │ ├── imgui.cpp │ ├── imgui.h │ ├── imgui_demo.cpp │ ├── imgui_draw.cpp │ ├── imgui_internal.h │ ├── imgui_widgets.cpp │ ├── imstb_rectpack.h │ ├── imstb_textedit.h │ └── imstb_truetype.h │ ├── libs │ └── assimp │ │ ├── assimp-vc140-mt.lib │ │ └── assimp.lib │ └── multithreading.cpp ├── src ├── optick.config.h ├── optick.h ├── optick_capi.cpp ├── optick_capi.h ├── optick_common.h ├── optick_core.cpp ├── optick_core.freebsd.h ├── optick_core.h ├── optick_core.linux.h ├── optick_core.macos.h ├── optick_core.platform.h ├── optick_core.win.h ├── optick_gpu.cpp ├── optick_gpu.d3d12.cpp ├── optick_gpu.h ├── optick_gpu.vulkan.cpp ├── optick_memory.h ├── optick_message.cpp ├── optick_message.h ├── optick_miniz.cpp ├── optick_miniz.h ├── optick_serialization.cpp ├── optick_serialization.h ├── optick_server.cpp └── optick_server.h └── tools ├── GenerateProjects.bat ├── GenerateProjects_all.bat ├── GenerateProjects_cmake.bat ├── GenerateProjects_gpu.bat ├── Linux └── premake5 ├── MacOS └── premake5 ├── OptickConfig.cmake.in ├── Publish.bat ├── Publish_Main.bat ├── Publish_UnrealEngine.bat ├── RemoveXML.exe ├── Step1_PrepareVersion.cmd ├── StripNdaCode.cmd ├── Windows └── premake5.exe └── sunifdef.exe /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: optick 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['https://www.paypal.me/optick'] 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Bin/ 2 | Optick/.vs/ 3 | Optick/obj/ 4 | OptickApp/obj/ 5 | OptickApp/packages/ 6 | OptickApp/.vs/ 7 | gui/obj/ 8 | gui/packages/ 9 | gui/InteractiveDataDisplay.WPF/obj/ 10 | gui/*/obj/ 11 | gui/.vs/ 12 | [Bb]uild*/ 13 | Tools/Publish/ 14 | *.suo 15 | *.user 16 | Publish/ 17 | *.rej 18 | *.orig 19 | .DS_Store 20 | /Samples/UnrealEnginePlugin/Binaries 21 | /.vs 22 | /samples/UnrealEnginePlugin/GUI/Optick.exe 23 | samples/UnrealEnginePlugin/Source/ThirdParty/Optick/src 24 | *.bak 25 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: 2 | - cpp 3 | 4 | os: 5 | - linux 6 | - osx 7 | 8 | compiler: 9 | - clang 10 | - gcc 11 | 12 | 13 | script: 14 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./tools/Linux/premake5 gmake && pushd build/gmake/ && make config=release_x64 && popd; fi 15 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./tools/MacOS/premake5 gmake && pushd build/gmake/ && make config=debug_x64 && popd; fi -------------------------------------------------------------------------------- /CMakeSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux-Debug", 5 | "generator": "Unix Makefiles", 6 | "remoteMachineName": "${defaultRemoteMachineName}", 7 | "configurationType": "Debug", 8 | "remoteCMakeListsRoot": "/var/tmp/src/${workspaceHash}/${name}", 9 | "cmakeExecutable": "/usr/bin", 10 | "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}", 11 | "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", 12 | "remoteBuildRoot": "/var/tmp/build/${workspaceHash}/build/${name}", 13 | "remoteInstallRoot": "/var/tmp/build/${workspaceHash}/install/${name}", 14 | "remoteCopySources": true, 15 | "remoteCopySourcesOutputVerbosity": "Normal", 16 | "remoteCopySourcesConcurrentCopies": "10", 17 | "remoteCopySourcesMethod": "rsync", 18 | "remoteCopySourcesExclusionList": [ 19 | ".vs", 20 | ".git", 21 | "Bin", 22 | "build", 23 | "gui", 24 | "stc", 25 | "tools", 26 | "publish", 27 | "samples/DurangoUWP", 28 | "samples/UnrealEnginePlugin", 29 | "samples/WindowsVulkan", 30 | "samples/WindowsD3D12" 31 | ], 32 | "rsyncCommandArgs": "-t --delete --delete-excluded", 33 | "remoteCopyBuildOutput": false, 34 | "cmakeCommandArgs": "", 35 | "buildCommandArgs": "", 36 | "ctestCommandArgs": "", 37 | "inheritEnvironments": [ 38 | "linux_x64" 39 | ] 40 | } 41 | ] 42 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019 Vadim Slyusarev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 2.0.{build} 2 | 3 | image: Visual Studio 2019 4 | 5 | platform: 6 | - x64 7 | 8 | configuration: 9 | - Debug 10 | - Release 11 | 12 | matrix: 13 | fast_finish: true 14 | 15 | before_build: 16 | - nuget restore gui/OptickApp_vs2022.sln 17 | 18 | build_script: 19 | - tools\Windows\premake5.exe vs2019 20 | - cd build/vs2019 21 | - MsBuild Optick.sln /t:Rebuild /p:Configuration=%CONFIGURATION% 22 | - cd ../../gui 23 | - MsBuild OptickApp_vs2022.sln /t:Rebuild /p:Configuration=%CONFIGURATION% -------------------------------------------------------------------------------- /gui/AutoEmbedLibs/ICSharpCode.AvalonEdit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/AutoEmbedLibs/ICSharpCode.AvalonEdit.dll -------------------------------------------------------------------------------- /gui/AutoEmbedLibs/SharpDX.D3DCompiler.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/AutoEmbedLibs/SharpDX.D3DCompiler.dll -------------------------------------------------------------------------------- /gui/AutoEmbedLibs/SharpDX.DXGI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/AutoEmbedLibs/SharpDX.DXGI.dll -------------------------------------------------------------------------------- /gui/AutoEmbedLibs/SharpDX.Direct2D1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/AutoEmbedLibs/SharpDX.Direct2D1.dll -------------------------------------------------------------------------------- /gui/AutoEmbedLibs/SharpDX.Direct3D11.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/AutoEmbedLibs/SharpDX.Direct3D11.dll -------------------------------------------------------------------------------- /gui/AutoEmbedLibs/SharpDX.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/AutoEmbedLibs/SharpDX.dll -------------------------------------------------------------------------------- /gui/AutoEmbedLibs/System.Windows.Interactivity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/AutoEmbedLibs/System.Windows.Interactivity.dll -------------------------------------------------------------------------------- /gui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.8) 2 | enable_language(CSharp) 3 | 4 | # TODO 5 | -------------------------------------------------------------------------------- /gui/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /gui/InteractiveDataDisplay.WPF/Axes/AxisOrientation.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Microsoft Corporation. All Rights Reserved. 2 | // Licensed under the MIT License. 3 | 4 | namespace InteractiveDataDisplay.WPF 5 | { 6 | /// 7 | /// Specifies axes orientation. 8 | /// 9 | public enum AxisOrientation 10 | { 11 | /// 12 | /// Axis will be vertical and ticks will be aligned to right. 13 | /// 14 | Left, 15 | /// 16 | /// Axis will be vertical and ticks will be aligned to left. 17 | /// 18 | Right, 19 | /// 20 | /// Axis will be horizontal and ticks will be aligned to bottom. 21 | /// 22 | Top, 23 | /// 24 | /// Axis will be horizontal and ticks will be aligned to top. 25 | /// 26 | Bottom 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /gui/InteractiveDataDisplay.WPF/Axes/ILabelProvider.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Microsoft Corporation. All Rights Reserved. 2 | // Licensed under the MIT License. 3 | 4 | using System.Windows; 5 | 6 | namespace InteractiveDataDisplay.WPF 7 | { 8 | /// 9 | /// Defines a method to create labels as an array of from an array of double values. 10 | /// 11 | public interface ILabelProvider 12 | { 13 | /// 14 | /// Generates an array of labels from an array of double. 15 | /// 16 | /// An array of double ticks. 17 | /// 18 | FrameworkElement[] GetLabels(double[] ticks); 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /gui/InteractiveDataDisplay.WPF/Axes/LabelProvider.cs: -------------------------------------------------------------------------------- 1 | // Copyright © Microsoft Corporation. All Rights Reserved. 2 | // Licensed under the MIT License. 3 | 4 | using System; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Collections.Generic; 8 | using System.Globalization; 9 | 10 | namespace InteractiveDataDisplay.WPF 11 | { 12 | /// 13 | /// Provides mechanisms to generate labels displayed on an axis by double ticks. 14 | /// 15 | public class LabelProvider : ILabelProvider 16 | { 17 | /// 18 | /// Generates an array of labels from an array of double. 19 | /// 20 | /// An array of double ticks. 21 | /// An array of . 22 | public FrameworkElement[] GetLabels(double[] ticks) 23 | { 24 | if (ticks == null) 25 | throw new ArgumentNullException("ticks"); 26 | 27 | List Labels = new List(); 28 | foreach (double tick in ticks) 29 | { 30 | TextBlock text = new TextBlock(); 31 | text.Text = tick.ToString(CultureInfo.InvariantCulture); 32 | Labels.Add(text); 33 | } 34 | return Labels.ToArray(); 35 | } 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /gui/InteractiveDataDisplay.WPF/Common/IPalette.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All Rights Reserved. 2 | // Licensed under the MIT License. 3 | 4 | // Copyright © 2010 Microsoft Corporation, All Rights Reserved. 5 | // This code released under the terms of the Microsoft Research License Agreement (MSR-LA, http://sds.codeplex.com/License) 6 | using System.Windows.Media; 7 | 8 | namespace InteractiveDataDisplay.WPF 9 | { 10 | /// 11 | /// Represents a color palette, which can convert double values to colors. 12 | /// 13 | public interface IPalette 14 | { 15 | /// 16 | /// Gets a color for the specified value. 17 | /// 18 | /// A value from the . 19 | /// A color. 20 | Color GetColor(double value); 21 | 22 | /// 23 | /// Gets the value indicating whether the contains absolute values 24 | /// or it is relative ([0...1]). 25 | /// 26 | bool IsNormalized { get; } 27 | 28 | /// 29 | /// Gets the range on which palette is defined. 30 | /// 31 | Range Range { get; } 32 | } 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /gui/InteractiveDataDisplay.WPF/Legend/DefaultTemplates.xaml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /gui/Optick/AppBootStrapper.cs: -------------------------------------------------------------------------------- 1 | using Autofac; 2 | using Profiler.InfrastructureMvvm; 3 | using Profiler.ViewModels; 4 | using Profiler.Views; 5 | using Profiler.Controls; 6 | 7 | namespace Profiler 8 | { 9 | public class AppBootStrapper: BootStrapperBase 10 | { 11 | protected override void ConfigureContainer(ContainerBuilder builder) 12 | { 13 | base.ConfigureContainer(builder); 14 | 15 | builder.RegisterType().AsSelf().AsImplementedInterfaces().SingleInstance(); 16 | builder.RegisterType().SingleInstance(); 17 | builder.RegisterType().AsSelf().AsImplementedInterfaces().SingleInstance(); 18 | builder.RegisterType().SingleInstance(); 19 | builder.RegisterType().AsSelf().AsImplementedInterfaces(); 20 | builder.RegisterType().AsSelf(); 21 | builder.RegisterType().As(); 22 | 23 | builder.RegisterType().AsSelf().AsImplementedInterfaces(); 24 | builder.RegisterType().AsSelf(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /gui/Optick/Controls/AttachmentViewControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using Profiler.Data; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Data; 10 | using System.Windows.Documents; 11 | using System.Windows.Input; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | using System.Windows.Navigation; 15 | using System.Windows.Shapes; 16 | 17 | namespace Profiler.Controls 18 | { 19 | public class AttachmnetTemplateSelector : DataTemplateSelector 20 | { 21 | public DataTemplate ImageTemplate { get; set; } 22 | public DataTemplate TextTemplate { get; set; } 23 | public DataTemplate OtherTemplate { get; set; } 24 | 25 | public override DataTemplate SelectTemplate(object item, DependencyObject container) 26 | { 27 | FileAttachment attachment = item as FileAttachment; 28 | if (attachment != null) 29 | { 30 | switch (attachment.FileType) 31 | { 32 | case FileAttachment.Type.IMAGE: 33 | return ImageTemplate; 34 | 35 | case FileAttachment.Type.TEXT: 36 | return TextTemplate; 37 | } 38 | } 39 | return OtherTemplate; 40 | } 41 | } 42 | 43 | /// 44 | /// Interaction logic for AttachmentViewControl.xaml 45 | /// 46 | public partial class AttachmentViewControl : UserControl 47 | { 48 | public AttachmentViewControl() 49 | { 50 | InitializeComponent(); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /gui/Optick/Controls/CaptureThumbnail.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /gui/Optick/Controls/CaptureThumbnail.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace Profiler.Controls 4 | { 5 | /// 6 | /// Interaction logic for CaptureThumbnail.xaml 7 | /// 8 | public partial class CaptureThumbnail : UserControl 9 | { 10 | public CaptureThumbnail() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /gui/Optick/Controls/EditStorageListDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using MahApps.Metro.Controls.Dialogs; 2 | using Profiler.InfrastructureMvvm; 3 | using Profiler.TaskManager; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.ObjectModel; 7 | using System.ComponentModel; 8 | using System.Diagnostics; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | using System.Windows; 13 | using System.Windows.Controls; 14 | using System.Windows.Data; 15 | using System.Windows.Documents; 16 | using System.Windows.Input; 17 | using System.Windows.Media; 18 | using System.Windows.Media.Imaging; 19 | using System.Windows.Navigation; 20 | using System.Windows.Shapes; 21 | 22 | namespace Profiler.Controls 23 | { 24 | /// 25 | /// Interaction logic for EditTaskTrackerListDialog.xaml 26 | /// 27 | public partial class EditStorageListDialog : BaseMetroDialog 28 | { 29 | public EditStorageListDialog() 30 | { 31 | InitializeComponent(); 32 | } 33 | 34 | public ICommand OKPressed { set { PART_AffirmativeButton.Command = value; } } 35 | public ICommand CancelPressed { set { PART_NegativeButton.Command = value; } } 36 | 37 | public ExternalStorage GetStorage() 38 | { 39 | return new NetworkStorage(UploadURL.Text, DownloadURL.Text); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /gui/Optick/Controls/FileHistory.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /gui/Optick/Controls/RoutedEvents.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using Profiler.Views; 8 | 9 | namespace Profiler.Controls 10 | { 11 | public class OpenCaptureEventArgs : RoutedEventArgs 12 | { 13 | public String Path { get; set; } 14 | public Data.SummaryPack Summary { get; set; } 15 | 16 | public OpenCaptureEventArgs(String path, Data.SummaryPack summary = null) 17 | : base(MainView.OpenCaptureEvent) 18 | { 19 | Path = path; 20 | Summary = summary; 21 | } 22 | } 23 | 24 | public class SaveCaptureEventArgs : RoutedEventArgs 25 | { 26 | public String Path { get; set; } 27 | public Data.SummaryPack Summary { get; set; } 28 | 29 | public SaveCaptureEventArgs(String path) 30 | : base(MainView.SaveCaptureEvent) 31 | { 32 | Path = path; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /gui/Optick/Controls/SettingsControl.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /gui/Optick/Controls/SettingsControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Profiler.Controls 17 | { 18 | /// 19 | /// Interaction logic for SettingsControl.xaml 20 | /// 21 | public partial class SettingsControl : UserControl 22 | { 23 | public SettingsControl() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /gui/Optick/Controls/TagsControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Profiler.Controls 17 | { 18 | /// 19 | /// Interaction logic for TagsControl.xaml 20 | /// 21 | public partial class TagsControl : UserControl 22 | { 23 | public TagsControl() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /gui/Optick/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /gui/Optick/Frames/SourceViewControl.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 20 | 21 | -------------------------------------------------------------------------------- /gui/Optick/Properties/DesignTimeResources.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | -------------------------------------------------------------------------------- /gui/Optick/Resources/Bug.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/Resources/Bug.ico -------------------------------------------------------------------------------- /gui/Optick/Resources/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/Resources/icon.ico -------------------------------------------------------------------------------- /gui/Optick/SamplingFrameControl.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | -------------------------------------------------------------------------------- /gui/Optick/SamplingFrameControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Navigation; 13 | using System.Windows.Shapes; 14 | using Profiler.Data; 15 | 16 | namespace Profiler 17 | { 18 | /// 19 | /// Interaction logic for SamplingFrameControl.xaml 20 | /// 21 | public partial class SamplingFrameControl : UserControl 22 | { 23 | public SamplingFrameControl() 24 | { 25 | InitializeComponent(); 26 | Init(); 27 | DataContextChanged += new DependencyPropertyChangedEventHandler(OnDataContextChanged); 28 | } 29 | 30 | void Init() 31 | { 32 | if (DataContext is SamplingFrame) 33 | { 34 | SamplingFrame frame = DataContext as SamplingFrame; 35 | 36 | 37 | } 38 | } 39 | 40 | private void OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs e) 41 | { 42 | Init(); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /gui/Optick/SourceWindow.xaml: -------------------------------------------------------------------------------- 1 |  18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /gui/Optick/SourceWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using MahApps.Metro.Controls; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Shapes; 13 | 14 | namespace Profiler 15 | { 16 | /// 17 | /// Interaction logic for SourceWindow.xaml 18 | /// 19 | public partial class SourceWindow : MetroWindow 20 | { 21 | public SourceWindow() 22 | { 23 | this.InitializeComponent(); 24 | } 25 | 26 | private void Window_KeyDown(object sender, KeyEventArgs e) 27 | { 28 | if (e.Key == Key.Escape) 29 | { 30 | Close(); 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /gui/Optick/TaskManager/brofiler-github-07994fd14248.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TaskManager/brofiler-github-07994fd14248.p12 -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/CallStack-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/CallStack-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Clear-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Clear-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/ClearSampling-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/ClearSampling-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Eye-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Eye-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Filter-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Filter-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Glasses-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Glasses-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Hook-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Hook-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Pause-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Pause-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Percent-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Percent-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Play-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Play-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Save-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Save-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Search-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Search-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Source-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Source-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Stop-icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Stop-icon.ico -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Stop-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Stop-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Timer-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Timer-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Trash2-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Trash2-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/Icons/Warning-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Optick/TimeLine/Icons/Warning-icon.png -------------------------------------------------------------------------------- /gui/Optick/TimeLine/TimeLineItem.xaml: -------------------------------------------------------------------------------- 1 |  13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /gui/Optick/ViewModels/MainViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Profiler.InfrastructureMvvm; 8 | 9 | namespace Profiler.ViewModels 10 | { 11 | public class MainViewModel: BaseViewModel 12 | { 13 | public String Version { get { return Assembly.GetEntryAssembly().GetName().Version.ToString(); } } 14 | 15 | private bool _isCapturing = false; 16 | public bool IsCapturing 17 | { 18 | get { return _isCapturing; } 19 | set { SetProperty(ref _isCapturing, value); } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /gui/Optick/ViewModels/ScreenShotViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Media; 3 | using System.Windows.Media.Imaging; 4 | using System.Windows.Input; //ICommand 5 | using Profiler.InfrastructureMvvm; 6 | using System.Windows; 7 | 8 | namespace Profiler.ViewModels 9 | { 10 | public class ScreenShotViewModel: BaseViewModel 11 | { 12 | #region properties 13 | 14 | ImageSource _attachmentImage; 15 | public ImageSource AttachmentImage 16 | { 17 | get { return _attachmentImage; } 18 | set { SetProperty(ref _attachmentImage, value); } 19 | } 20 | 21 | public string Title { get; set; } 22 | 23 | #endregion 24 | 25 | #region commands 26 | 27 | public ICommand CloseViewCommand { get; set; } 28 | 29 | #endregion 30 | 31 | #region constructor 32 | public ScreenShotViewModel(BitmapImage image =null, string title=null) 33 | { 34 | AttachmentImage = image; 35 | Title = title; 36 | 37 | CloseViewCommand = new RelayCommand(x => 38 | { 39 | if (x != null) 40 | x.Close(); 41 | 42 | 43 | }); 44 | } 45 | 46 | #endregion 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /gui/Optick/Views/CaptureSettingsView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Profiler.Views 17 | { 18 | /// 19 | /// Interaction logic for CaptureSettingsView.xaml 20 | /// 21 | public partial class CaptureSettingsView : UserControl 22 | { 23 | public CaptureSettingsView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /gui/Optick/Views/FunctionDescriptionView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Profiler.Views 17 | { 18 | /// 19 | /// Interaction logic for FunctionDescriptionView.xaml 20 | /// 21 | public partial class FunctionDescriptionView : UserControl 22 | { 23 | public FunctionDescriptionView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /gui/Optick/Views/FunctionHistoryTableView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Profiler.Data; 2 | using Profiler.ViewModels; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | using System.Windows.Controls; 10 | using System.Windows.Data; 11 | using System.Windows.Documents; 12 | using System.Windows.Input; 13 | using System.Windows.Media; 14 | using System.Windows.Media.Imaging; 15 | using System.Windows.Navigation; 16 | using System.Windows.Shapes; 17 | 18 | namespace Profiler.Views 19 | { 20 | /// 21 | /// Interaction logic for FunctionHistoryTableView.xaml 22 | /// 23 | public partial class FunctionHistoryTableView : UserControl 24 | { 25 | public FunctionHistoryTableView() 26 | { 27 | InitializeComponent(); 28 | } 29 | 30 | private void FunctionInstanceDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) 31 | { 32 | List indices = new List(); 33 | 34 | foreach (FunctionStats.Sample sample in FunctionInstanceDataGrid.SelectedItems) 35 | indices.Add(sample.Index); 36 | 37 | if (indices.Count > 0) 38 | { 39 | FunctionViewModel vm = DataContext as FunctionViewModel; 40 | if (vm != null) 41 | vm.OnDataClick(this, indices); 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /gui/Optick/Views/FunctionInstanceView.xaml.cs: -------------------------------------------------------------------------------- 1 | using Profiler.Data; 2 | using Profiler.ViewModels; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | using System.Windows.Controls; 10 | using System.Windows.Data; 11 | using System.Windows.Documents; 12 | using System.Windows.Input; 13 | using System.Windows.Media; 14 | using System.Windows.Media.Imaging; 15 | using System.Windows.Navigation; 16 | using System.Windows.Shapes; 17 | 18 | namespace Profiler.Views 19 | { 20 | /// 21 | /// Interaction logic for FunctionInstanceView.xaml 22 | /// 23 | public partial class FunctionInstanceView : UserControl 24 | { 25 | public FunctionInstanceView() 26 | { 27 | InitializeComponent(); 28 | } 29 | 30 | private void FunctionInstanceDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) 31 | { 32 | List indices = new List(); 33 | 34 | foreach (FunctionStats.Sample sample in FunctionInstanceDataGrid.SelectedItems) 35 | indices.Add(sample.Index); 36 | 37 | if (indices.Count > 0) 38 | { 39 | FunctionViewModel vm = DataContext as FunctionViewModel; 40 | if (vm != null) 41 | vm.OnDataClick(this, indices); 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /gui/Optick/Views/FunctionSummaryView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Profiler.Views 17 | { 18 | /// 19 | /// Interaction logic for FunctionSummaryView.xaml 20 | /// 21 | public partial class FunctionSummaryView : UserControl 22 | { 23 | public FunctionSummaryView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /gui/Optick/Views/ScreenShotView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Shapes; 14 | using MahApps.Metro.Controls; 15 | 16 | namespace Profiler.Views 17 | { 18 | /// 19 | /// Interaction logic for ScreenshotView.xaml 20 | /// 21 | public partial class ScreenShotView : MetroWindow 22 | { 23 | public ScreenShotView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /gui/Optick/Views/SummaryViewer.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using Profiler.ViewModels; 9 | 10 | namespace Profiler.Views 11 | { 12 | /// 13 | /// Interaction logic for SummaryViewer.xaml 14 | /// 15 | public partial class SummaryViewer : UserControl 16 | { 17 | public SummaryViewer() 18 | { 19 | InitializeComponent(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /gui/Optick/Views/TaskTrackerView.xaml.cs: -------------------------------------------------------------------------------- 1 | using MahApps.Metro.Controls; 2 | using MahApps.Metro.Controls.Dialogs; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | using System.Windows.Controls; 10 | using System.Windows.Data; 11 | using System.Windows.Documents; 12 | using System.Windows.Input; 13 | using System.Windows.Media; 14 | using System.Windows.Media.Imaging; 15 | using System.Windows.Navigation; 16 | using System.Windows.Shapes; 17 | 18 | namespace Profiler.Views 19 | { 20 | /// 21 | /// Interaction logic for TaskTrackerView.xaml 22 | /// 23 | public partial class TaskTrackerView : MetroWindow 24 | { 25 | public TaskTrackerView() 26 | { 27 | InitializeComponent(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /gui/Optick/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /gui/Optick/themes/Brushes.xaml: -------------------------------------------------------------------------------- 1 |  5 | #FF888888 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /gui/OptickVSIX/BuildProgressState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace OptickVSIX 8 | { 9 | public class BuildProgressState 10 | { 11 | public EnvDTE80.DTE2 DTE { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /gui/OptickVSIX/BuildProgressWindow.cs: -------------------------------------------------------------------------------- 1 | namespace OptickVSIX 2 | { 3 | using System; 4 | using System.Runtime.InteropServices; 5 | using Microsoft.VisualStudio.Shell; 6 | 7 | /// 8 | /// This class implements the tool window exposed by this package and hosts a user control. 9 | /// 10 | /// 11 | /// In Visual Studio tool windows are composed of a frame (implemented by the shell) and a pane, 12 | /// usually implemented by the package implementer. 13 | /// 14 | /// This class derives from the ToolWindowPane class provided from the MPF in order to use its 15 | /// implementation of the IVsUIElementPane interface. 16 | /// 17 | /// 18 | [Guid(WindowGuidString)] 19 | public class BuildProgressWindow : ToolWindowPane 20 | { 21 | public const string WindowGuidString = "86d4c770-4241-4cb2-a4b2-c79ac8b95834"; 22 | public const string Title = "Build Progress Window"; 23 | 24 | /// 25 | /// Initializes a new instance of the class. 26 | /// 27 | public BuildProgressWindow(BuildProgressState state) : base(null) 28 | { 29 | this.Caption = Title; 30 | 31 | // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable, 32 | // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on 33 | // the object returned by the Content property. 34 | this.Content = new BuildProgressWindowControl(state); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /gui/OptickVSIX/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("OptickVSIX")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("OptickVSIX")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /gui/OptickVSIX/Resources/BuildProgressWindowCommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/OptickVSIX/Resources/BuildProgressWindowCommand.png -------------------------------------------------------------------------------- /gui/OptickVSIX/Resources/Style.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 22 12 | -------------------------------------------------------------------------------- /gui/OptickVSIX/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | OptickVSIX 6 | Empty VSIX Project. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /gui/Profiler.Controls/ColorToBrushConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Data; 3 | using System.Windows.Media; 4 | using Profiler.Data; 5 | 6 | 7 | namespace Profiler.Controls 8 | { 9 | public class ColorToBrushConverter : IValueConverter 10 | { 11 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 12 | { 13 | if (value is Color) 14 | return new SolidColorBrush((Color)value); 15 | 16 | return null; 17 | } 18 | 19 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 20 | { 21 | throw new NotImplementedException(); 22 | } 23 | } 24 | 25 | public class CategoryWidthConverter : IMultiValueConverter 26 | { 27 | public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) 28 | { 29 | double ratio = (double)values[0]; 30 | double availiableSpace = (double)values[1]; 31 | 32 | return Math.Max(ratio * availiableSpace - 1, 0); 33 | } 34 | 35 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture) 36 | { 37 | throw new NotImplementedException(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /gui/Profiler.Controls/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Optick.Controls")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Optick.Controls")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("2b515f9a-27ed-4a0f-85f1-2e73b838bd81")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /gui/Profiler.Controls/RoutedEvents.cs: -------------------------------------------------------------------------------- 1 | using Profiler.Data; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | using System.Windows; 6 | 7 | namespace Profiler.Controls 8 | { 9 | public class HighlightFrameEventArgs : RoutedEventArgs 10 | { 11 | public List Items { get; set; } 12 | 13 | public HighlightFrameEventArgs(IEnumerable items, bool focus = true) 14 | : base(ThreadViewControl.HighlightFrameEvent) 15 | { 16 | Items = new List(items); 17 | } 18 | } 19 | 20 | public class FocusFrameEventArgs : RoutedEventArgs 21 | { 22 | public Data.Frame Frame { get; set; } 23 | public IDurable Focus { get; set; } 24 | 25 | public FocusFrameEventArgs(RoutedEvent routedEvent, Data.Frame frame, IDurable focus = null) : base(routedEvent) 26 | { 27 | Frame = frame; 28 | Focus = focus; 29 | } 30 | 31 | public delegate void Handler(object sender, FocusFrameEventArgs e); 32 | } 33 | 34 | public class GlobalEvents 35 | { 36 | public static readonly RoutedEvent FocusFrameEvent = EventManager.RegisterRoutedEvent("FocusFrame", RoutingStrategy.Bubble, typeof(FocusFrameEventArgs.Handler), typeof(GlobalEvents)); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /gui/Profiler.Controls/ThreadView/SamplingThreadView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /gui/Profiler.Controls/ThreadView/ThreadNameView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Profiler.Controls 17 | { 18 | /// 19 | /// Interaction logic for ThreadNameView.xaml 20 | /// 21 | public partial class ThreadNameView : UserControl 22 | { 23 | public ThreadNameView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /gui/Profiler.Controls/ThreadView/ThreadViewSettings.cs: -------------------------------------------------------------------------------- 1 | using Profiler.InfrastructureMvvm; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace Profiler.Controls 10 | { 11 | public enum ExpandMode 12 | { 13 | [Display(Name = "Expand MainThread", Description = "Expand MainThread Only")] 14 | ExpandMain, 15 | [Display(Name = "Expand All", Description = "Expand All Threads")] 16 | ExpandAll, 17 | [Display(Name = "Collapse All", Description = "Collapse All Threads")] 18 | CollapseAll, 19 | } 20 | 21 | public class ThreadViewSettings : BaseViewModel 22 | { 23 | public int CollapsedMaxThreadDepth { get; set; } = 2; 24 | public int ExpandedMaxThreadDepth { get; set; } = 12; 25 | public ExpandMode ThreadExpandMode { get; set; } = ExpandMode.ExpandAll; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /gui/Profiler.Controls/ViewModels/ThreadFilterViewModel.cs: -------------------------------------------------------------------------------- 1 | using Profiler.Data; 2 | using Profiler.InfrastructureMvvm; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace Profiler.Controls.ViewModels 10 | { 11 | class ThreadFilterViewModel : BaseViewModel 12 | { 13 | private FrameGroup _group = null; 14 | public FrameGroup Group 15 | { 16 | get { return _group; } 17 | set { SetProperty(ref _group, value); } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /gui/Profiler.Controls/Views/ThreadFilterView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Profiler.Views 17 | { 18 | /// 19 | /// Interaction logic for ThreadFilterView.xaml 20 | /// 21 | public partial class ThreadFilterView : UserControl 22 | { 23 | public ThreadFilterView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /gui/Profiler.Controls/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /gui/Profiler.Data/CaptureSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Profiler.Data 8 | { 9 | public class CaptureSettings 10 | { 11 | public Mode Mode { get; set; } = (Mode.INSTRUMENTATION_CATEGORIES | Mode.INSTRUMENTATION_EVENTS); 12 | public UInt32 CategoryMask { get; set; } = UInt32.MaxValue; 13 | public UInt32 SamplingFrequencyHz { get; set; } = 1000; 14 | public UInt32 FrameLimit { get; set; } = 0; 15 | public UInt32 TimeLimitUs { get; set; } = 0; 16 | public UInt32 MaxSpikeLimitUs { get; set; } = 0; 17 | public UInt64 MemoryLimitMb { get; set; } = 0; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /gui/Profiler.Data/Frame.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.IO; 6 | using System.Windows.Media; 7 | using System.Windows; 8 | 9 | namespace Profiler.Data 10 | { 11 | public abstract class Frame 12 | { 13 | public DataResponse Response { get; private set; } 14 | 15 | public FrameGroup Group { get; set; } 16 | public virtual String Description { get; set; } 17 | public virtual String FilteredDescription { get; set; } 18 | public virtual double Duration { get; set; } 19 | 20 | public bool IsLoaded { get; protected set; } 21 | public abstract void Load(); 22 | 23 | public Frame(DataResponse response, FrameGroup group) 24 | { 25 | Group = group; 26 | Response = response; 27 | } 28 | 29 | public abstract DataResponse.Type ResponseType { get; } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /gui/Profiler.Data/Mode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Profiler.Data 8 | { 9 | public enum Mode 10 | { 11 | OFF = 0x0, 12 | INSTRUMENTATION_CATEGORIES = (1 << 0), 13 | INSTRUMENTATION_EVENTS = (1 << 1), 14 | SAMPLING = (1 << 2), 15 | TAGS = (1 << 3), 16 | AUTOSAMPLING = (1 << 4), 17 | SWITCH_CONTEXT = (1 << 5), 18 | IO = (1 << 6), 19 | GPU = (1 << 7), 20 | END_SCREENSHOT = (1 << 8), 21 | RESERVED_0 = (1 << 9), 22 | RESERVED_1 = (1 << 10), 23 | HW_COUNTERS = (1 << 11), 24 | LIVE = (1 << 12), 25 | RESERVED_2 = (1 << 13), 26 | RESERVED_3 = (1 << 14), 27 | RESERVED_4 = (1 << 15), 28 | SYS_CALLS = (1 << 16), 29 | OTHER_PROCESSES = (1 << 17), 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /gui/Profiler.Data/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Profiler.Data")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Profiler.Data")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("37d3fa6a-86fa-43b2-8a4f-681daa3c5e63")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /gui/Profiler.Data/ResponseHolder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Profiler.Data 8 | { 9 | public abstract class IResponseHolder 10 | { 11 | public abstract DataResponse Response { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /gui/Profiler.Data/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /gui/Profiler.DirectX/DirectXCanvas.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Fonts/SegoeUI_16_Normal_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Profiler.DirectX/Fonts/SegoeUI_16_Normal_0.png -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Fonts/SegoeUI_20_Normal_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Profiler.DirectX/Fonts/SegoeUI_20_Normal_0.png -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Fonts/SegoeUI_24_Normal_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Profiler.DirectX/Fonts/SegoeUI_24_Normal_0.png -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Fonts/SegoeUI_28_Normal_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Profiler.DirectX/Fonts/SegoeUI_28_Normal_0.png -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Fonts/SegoeUI_32_Normal_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Profiler.DirectX/Fonts/SegoeUI_32_Normal_0.png -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Fragment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using SharpDX.Direct3D11; 7 | 8 | namespace Profiler.DirectX 9 | { 10 | public class Fragment : IDisposable 11 | { 12 | public PixelShader PS { get; set; } 13 | public VertexShader VS { get; set; } 14 | public InputLayout Layout { get; set; } 15 | 16 | public void Dispose() 17 | { 18 | PS.Dispose(); 19 | VS.Dispose(); 20 | Layout.Dispose(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Optick.DirectX")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Optick.DirectX")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e86c057e-e135-4100-a4a4-c943c7f14c56")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /gui/Profiler.DirectX/RenderSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Profiler.DirectX 8 | { 9 | public class RenderSettings 10 | { 11 | public static double dpiScaleX = 1.0; 12 | public static double dpiScaleY = 1.0; 13 | 14 | static RenderSettings() 15 | { 16 | using (System.Drawing.Graphics g = System.Drawing.Graphics.FromHwnd(IntPtr.Zero)) 17 | { 18 | dpiScaleX = (g.DpiX / 96.0); 19 | dpiScaleY = (g.DpiY / 96.0); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Shaders/Basic.fx: -------------------------------------------------------------------------------- 1 | cbuffer ConstantBuffer : register(b0) 2 | { 3 | matrix View; 4 | matrix World; 5 | } 6 | 7 | struct VS_IN 8 | { 9 | float2 pos : POSITION; 10 | float4 col : COLOR; 11 | }; 12 | 13 | struct PS_IN 14 | { 15 | float4 pos : SV_POSITION; 16 | float4 col : COLOR; 17 | }; 18 | 19 | PS_IN VS( VS_IN input ) 20 | { 21 | PS_IN output = (PS_IN)0; 22 | 23 | float4x4 wv = mul(View, World); 24 | 25 | output.pos = mul(wv, float4(input.pos, 0.5f, 1.0f)); 26 | output.col = input.col; 27 | 28 | return output; 29 | } 30 | 31 | float4 PS( PS_IN input ) : SV_Target 32 | { 33 | return input.col; 34 | } 35 | 36 | technique10 Render 37 | { 38 | pass P0 39 | { 40 | SetGeometryShader( 0 ); 41 | SetVertexShader( CompileShader( vs_4_0, VS() ) ); 42 | SetPixelShader( CompileShader( ps_4_0, PS() ) ); 43 | } 44 | } -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Shaders/Basic_ps.fxo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Profiler.DirectX/Shaders/Basic_ps.fxo -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Shaders/Basic_vs.fxo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Profiler.DirectX/Shaders/Basic_vs.fxo -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Shaders/Compile.bat: -------------------------------------------------------------------------------- 1 | Echo Building shaders 2 | Echo Launch dir: "%~dp0" 3 | Echo Current dir: "%CD%" 4 | cd "%~dp0" 5 | PATH="c:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Utilities\bin\x64\" 6 | fxc.exe /T vs_4_0 /O3 /E VS /Fo Basic_vs.fxo Basic.fx 7 | fxc.exe /T ps_4_0 /O3 /E PS /Fo Basic_ps.fxo Basic.fx 8 | fxc.exe /T vs_4_0 /O3 /E VS /Fo Text_vs.fxo Text.fx 9 | fxc.exe /T ps_4_0 /O3 /E PS /Fo Text_ps.fxo Text.fx 10 | -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Shaders/Text.fx: -------------------------------------------------------------------------------- 1 | cbuffer ConstantBuffer : register(b0) 2 | { 3 | matrix View; 4 | matrix World; 5 | } 6 | 7 | Texture2D FontTexture : register(t0); 8 | SamplerState FontSampler : register(s0); 9 | 10 | struct VS_IN 11 | { 12 | float2 pos : POSITION; 13 | float2 uv : TEXCOORD0; 14 | float4 col : COLOR; 15 | }; 16 | 17 | struct PS_IN 18 | { 19 | float4 pos : SV_POSITION; 20 | float2 uv : TEXCOORD0; 21 | float4 col : COLOR; 22 | }; 23 | 24 | PS_IN VS(VS_IN input) 25 | { 26 | PS_IN output = (PS_IN)0; 27 | 28 | float4x4 wv = mul(View, World); 29 | 30 | output.pos = mul(wv, float4(input.pos, 0.5f, 1.0f)); 31 | output.uv = input.uv; 32 | output.col = input.col; 33 | 34 | return output; 35 | } 36 | 37 | float4 PS(PS_IN input) : SV_Target 38 | { 39 | float4 tex = FontTexture.Sample(FontSampler, input.uv); 40 | return float4(input.col.rgb, tex.r);// *input.col; 41 | } 42 | 43 | technique10 Render 44 | { 45 | pass P0 46 | { 47 | SetGeometryShader(0); 48 | SetVertexShader(CompileShader(vs_4_0, VS())); 49 | SetPixelShader(CompileShader(ps_4_0, PS())); 50 | } 51 | } -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Shaders/Text_ps.fxo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Profiler.DirectX/Shaders/Text_ps.fxo -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Shaders/Text_vs.fxo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/gui/Profiler.DirectX/Shaders/Text_vs.fxo -------------------------------------------------------------------------------- /gui/Profiler.DirectX/Utils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Profiler.DirectX 8 | { 9 | public class Utils 10 | { 11 | public static SharpDX.Color Convert(System.Windows.Media.Color color) 12 | { 13 | return new SharpDX.Color(color.R, color.G, color.B, color.A); 14 | } 15 | 16 | public static SharpDX.Matrix Convert(System.Windows.Media.Matrix m) 17 | { 18 | return new SharpDX.Matrix((float)m.M11, (float)m.M12, 0.0f, 0.0f, 19 | (float)m.M21, (float)m.M22, 0.0f, 0.0f, 20 | 0.0f, 0.0f, 1.0f, 0.0f, 21 | (float)m.OffsetX, (float)m.OffsetY, 0.0f, 1.0f); 22 | } 23 | 24 | public static System.Windows.Point Convert(SharpDX.Vector2 pos) 25 | { 26 | return new System.Windows.Point(pos.X, pos.Y); 27 | } 28 | 29 | public static System.Windows.Media.Color MultiplyColor(System.Windows.Media.Color color, float mul) 30 | { 31 | return System.Windows.Media.Color.FromRgb((byte)(color.R * mul), (byte)(color.G * mul), (byte)(color.B * mul)); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /gui/Profiler.InfrastructureMvvm/BaseViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; //INotifyPropertyChanged 4 | using System.Runtime.CompilerServices; //CallerMemberName 5 | // using System.Windows; //DependencyObject, DependencyProperty 6 | 7 | namespace Profiler.InfrastructureMvvm 8 | { 9 | public abstract class BaseViewModel : INotifyPropertyChanged // DependencyObject, 10 | { 11 | public event PropertyChangedEventHandler PropertyChanged; 12 | 13 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) 14 | { 15 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 16 | } 17 | 18 | protected bool SetProperty(ref T field, T value,[CallerMemberName] string propertyName = null) 19 | { 20 | if (EqualityComparer.Default.Equals(field, value)) return false; 21 | field = value; 22 | OnPropertyChanged(propertyName); 23 | return true; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /gui/Profiler.InfrastructureMvvm/BoolToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Windows; 5 | using System.Windows.Data; 6 | 7 | namespace Profiler.InfrastructureMvvm 8 | { 9 | public sealed class BoolToVisibilityConverter : BoolToVisibilityConverterGeneric 10 | { 11 | public BoolToVisibilityConverter() : 12 | base(Visibility.Visible, Visibility.Collapsed) 13 | { } 14 | } 15 | 16 | public class BoolToVisibilityConverterGeneric : IValueConverter 17 | { 18 | public BoolToVisibilityConverterGeneric(T trueValue, T falseValue) 19 | { 20 | True = trueValue; 21 | False = falseValue; 22 | } 23 | 24 | public T True { get; set; } 25 | public T False { get; set; } 26 | 27 | public virtual object Convert(object value, Type targetType, object parameter, CultureInfo culture) 28 | { 29 | return value is bool && ((bool)value) ? True : False; 30 | } 31 | 32 | public virtual object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 33 | { 34 | return value is T && EqualityComparer.Default.Equals((T)value, True); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /gui/Profiler.InfrastructureMvvm/IDialogViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Profiler.InfrastructureMvvm 8 | { 9 | /// 10 | /// Interface for dialog view models. 11 | /// 12 | public interface IDialogViewModel 13 | { 14 | /// 15 | /// This event is raised when the dialog was closed. 16 | /// 17 | event EventHandler Closed; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /gui/Profiler.InfrastructureMvvm/IFileDialogService.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Profiler.InfrastructureMvvm 3 | { 4 | public interface IFileDialogService 5 | { 6 | void ShowMessage(string message); 7 | string FilePath { get; set; } 8 | bool OpenFileDialog(); 9 | bool OpenFolderDialog(); 10 | bool SaveFileDialog(); 11 | bool SaveFileDialog(string defaultFileName, string defaultExt, string filter = null, string initialDirectory = null); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /gui/Profiler.InfrastructureMvvm/IOnClosingHandler.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Profiler.InfrastructureMvvm 3 | { 4 | /// 5 | /// This interface can be implemented by view models, which want to be notified when 6 | /// the corresponding view is about to be closed. 7 | /// 8 | public interface IOnClosingHandler 9 | { 10 | /// 11 | /// This method is called when the corresponding view closes. 12 | /// 13 | /// 14 | /// When the corresponding view is a , this method is called when 15 | /// is raised; otherwise, when is raised. 16 | /// 17 | /// If you want to intercept when the corresponding window is about to be closed, 18 | /// use . 19 | void OnClosing(); 20 | } 21 | 22 | /// 23 | /// This interface can be implemented by view models, which want to be notified when 24 | /// the corresponding window is about to be closed. 25 | /// 26 | public interface ICancelableOnClosingHandler 27 | { 28 | /// 29 | /// This method is called when the corresponding view's event was raised. 30 | /// 31 | /// the the window can be closed; otherwise, . 32 | bool OnClosing(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /gui/Profiler.InfrastructureMvvm/IOnLoadedHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Profiler.InfrastructureMvvm 8 | { 9 | /// 10 | /// This interface can be implemented by view models, which want to be notified when 11 | /// the corresponding view was loaded. 12 | /// 13 | public interface IOnLoadedHandler 14 | { 15 | /// 16 | /// This method is called when the corresponding view's or 17 | /// event was raised. 18 | /// 19 | /// 20 | Task OnLoadedAsync(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /gui/Profiler.InfrastructureMvvm/IUiExecution.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Profiler.InfrastructureMvvm 8 | { 9 | /// 10 | /// Provides an method to execute an action in the dispatcher thread. 11 | /// 12 | public interface IUiExecution 13 | { 14 | /// 15 | /// Executes the passed action in the dispatcher thread. 16 | /// 17 | /// The action to execute. 18 | void Execute(Action action); 19 | 20 | /// 21 | /// Executes the passed action in the dispatcher thread asynchronously. 22 | /// 23 | /// The action to execute. 24 | Task ExecuteAsync(Action action); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /gui/Profiler.InfrastructureMvvm/IWindowManager.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Profiler.InfrastructureMvvm 4 | { 5 | /// 6 | /// Declares methods to show windows. 7 | /// 8 | public interface IWindowManager 9 | { 10 | /// 11 | /// Shows a window for a given view model type. 12 | /// 13 | /// An optional owner for the new window. 14 | /// The type of the view model. 15 | /// The window. 16 | Window ShowWindow(Window owningWindow = null); 17 | 18 | /// 19 | /// Shows a window for a given view model object. 20 | /// 21 | /// The view model for the window to be displayed. 22 | /// An optional owner for the new window. 23 | /// The window. 24 | Window ShowWindow(object viewModel, Window owningWindow = null); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /gui/Profiler.InfrastructureMvvm/RelayCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; //ICommand 3 | 4 | 5 | namespace Profiler.InfrastructureMvvm 6 | { 7 | public class RelayCommand : ICommand 8 | { 9 | public Predicate CanExecuteDelegate { get; set; } 10 | public Action ExecuteDelegate { get; set; } 11 | 12 | public RelayCommand(Action action, Predicate predicate) 13 | { 14 | ExecuteDelegate = action; 15 | CanExecuteDelegate = predicate; 16 | } 17 | public RelayCommand(Action action) 18 | : this(action, null) 19 | { 20 | } 21 | //Implement ICommand interface 22 | public event EventHandler CanExecuteChanged 23 | { 24 | add { CommandManager.RequerySuggested += value; } 25 | remove { CommandManager.RequerySuggested -= value; } 26 | } 27 | 28 | public bool CanExecute(object parameter) 29 | { 30 | if(CanExecuteDelegate != null) 31 | { 32 | return CanExecuteDelegate(parameter); 33 | } 34 | return true; 35 | } 36 | 37 | 38 | public void Execute(object parameter) 39 | { 40 | if (ExecuteDelegate != null) 41 | ExecuteDelegate(parameter); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /gui/Profiler.InfrastructureMvvm/ViewModelPresenter.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Windows; 3 | using System.Windows.Controls; 4 | 5 | namespace Profiler.InfrastructureMvvm 6 | { 7 | /// 8 | /// A content control presenting a view for a given view model via binding. 9 | /// 10 | public class ViewModelPresenter : ContentControl 11 | { 12 | /// 13 | /// The view model for which this control should display the corresponding view. 14 | /// 15 | public object ViewModel 16 | { 17 | get { return GetValue(ViewModelProperty); } 18 | set { SetValue(ViewModelProperty, value); } 19 | } 20 | 21 | public static readonly DependencyProperty ViewModelProperty = 22 | DependencyProperty.Register("ViewModel", typeof(object), typeof(ViewModelPresenter), 23 | new PropertyMetadata(default(object), OnViewModelChanged)); 24 | 25 | private static void OnViewModelChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) 26 | { 27 | if (DesignerProperties.GetIsInDesignMode(d)) 28 | { 29 | return; 30 | } 31 | 32 | var self = (ViewModelPresenter)d; 33 | self.Content = null; 34 | 35 | if (e.NewValue != null) 36 | { 37 | var view = ViewLocator.GetViewForViewModel(e.NewValue); 38 | self.Content = view; 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /gui/Profiler.InfrastructureMvvm/WindowManager.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Profiler.InfrastructureMvvm 4 | { 5 | public class WindowManager:IWindowManager 6 | { 7 | public Window ShowWindow(Window owningWindow = null) 8 | { 9 | var window = (Window)ViewLocator.GetViewForViewModel(); 10 | window.Owner = owningWindow; 11 | window.Show(); 12 | return window; 13 | } 14 | 15 | public Window ShowWindow(object viewModel, Window owningWindow = null) 16 | { 17 | var window = (Window)ViewLocator.GetViewForViewModel(viewModel); 18 | window.Owner = owningWindow; 19 | window.Show(); 20 | return window; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /gui/Profiler.InfrastructureMvvm/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /gui/Profiler.Interop/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Profiler.Interop")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Profiler.Interop")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("168efede-d263-41c7-8839-07cfa7815ac0")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /gui/Profiler.Trace/Config.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Profiler.Trace 8 | { 9 | public class Config 10 | { 11 | public IEnumerable ProcessFilters { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /gui/Profiler.Trace/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Profiler.Tracer")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Profiler.Tracer")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9adf36ae-023d-4d81-a13c-9a18a9e84359")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /gui/Profiler.Trace/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /samples/Common/TaskScheduler/README.txt: -------------------------------------------------------------------------------- 1 | Original source here: https://github.com/SergeyMakeev/TaskScheduler -------------------------------------------------------------------------------- /samples/Common/TaskScheduler/Scheduler/Include/MTAtomic.h: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Sergey Makeev, Vadim Slyusarev 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #pragma once 24 | 25 | #ifndef __MT_ATOMIC_MAIN__ 26 | #define __MT_ATOMIC_MAIN__ 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /samples/Common/TaskScheduler/Scheduler/Include/MTStackRequirements.h: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015 Sergey Makeev, Vadim Slyusarev 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #pragma once 24 | 25 | 26 | namespace MT 27 | { 28 | namespace StackRequirements 29 | { 30 | enum Type 31 | { 32 | INVALID, 33 | 34 | STANDARD, 35 | EXTENDED 36 | }; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /samples/Common/TaskScheduler/Scheduler/Include/Platform/Posix/MTCommon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef __MT_COMMON__ 4 | #define __MT_COMMON__ 5 | 6 | #include "MTUtils.h" 7 | #include "MTThread.h" 8 | #include "MTMutex.h" 9 | #include "MTAtomic.h" 10 | #include "MTEvent.h" 11 | #include "MTFiber.h" 12 | #include "MTMemory.h" 13 | 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /samples/Common/TaskScheduler/Scheduler/Include/Platform/Posix/MTMemory.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef __MT_MEMORY__ 4 | #define __MT_MEMORY__ 5 | 6 | 7 | #include 8 | 9 | #define MT_ALLOCATE_ON_STACK(BYTES_COUNT) alloca(BYTES_COUNT) 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /samples/Common/TaskScheduler/Scheduler/Include/Platform/Windows/MTCommon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef __MT_COMMON__ 4 | #define __MT_COMMON__ 5 | 6 | 7 | #include "MTAtomic.h" 8 | 9 | #include "MicroWindows.h" 10 | 11 | #include "MTUtils.h" 12 | #include "MTThread.h" 13 | #include "MTMutex.h" 14 | #include "MTEvent.h" 15 | #include "MTFiber.h" 16 | #include "MTMemory.h" 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /samples/Common/TaskScheduler/Scheduler/Include/Platform/Windows/MTMemory.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef __MT_MEMORY__ 4 | #define __MT_MEMORY__ 5 | 6 | #define MT_ALLOCATE_ON_STACK(BYTES_COUNT) _alloca(BYTES_COUNT) 7 | 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /samples/Common/TestEngine/TestEngine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | // Inject brofiler code into the task scope 7 | #define MT_SCHEDULER_PROFILER_TASK_SCOPE_CODE_INJECTION( TYPE, DEBUG_COLOR, SRC_FILE, SRC_LINE) OPTICK_CATEGORY( MT_TEXT( #TYPE ), OPTICK_MAKE_CATEGORY(0, DEBUG_COLOR) ); 8 | 9 | #if !defined(OPTICK_ENABLE_FIBERS) 10 | #define OPTICK_ENABLE_FIBERS (0) 11 | #endif 12 | 13 | #if OPTICK_ENABLE_FIBERS 14 | #include 15 | #endif //OPTICK_ENABLE_FILBERS 16 | 17 | namespace Test 18 | { 19 | // Test engine: emulates some hard CPU work. 20 | class Engine 21 | { 22 | #if OPTICK_ENABLE_FIBERS 23 | MT::TaskScheduler scheduler; 24 | #endif //OPTICK_ENABLE_FILBERS 25 | 26 | static const size_t WORKER_THREAD_COUNT = 2; 27 | std::array workers; 28 | bool isAlive; 29 | 30 | void UpdateInput(); 31 | void UpdateMessages(); 32 | void UpdateLogic(); 33 | void UpdateTasks(); 34 | void UpdateScene(); 35 | void Draw(); 36 | public: 37 | Engine(); 38 | ~Engine(); 39 | 40 | // Updates engine, should be called once per frame. 41 | // Returns false if it doesn't want to update any more. 42 | bool Update(); 43 | 44 | void UpdatePhysics(); 45 | void UpdateRecursive(); 46 | 47 | bool IsAlive() const { return isAlive; } 48 | }; 49 | 50 | bool OnOptickStateChanged(Optick::State::Type state); 51 | void SpinSleep(uint32_t milliseconds); 52 | } 53 | -------------------------------------------------------------------------------- /samples/DurangoUWP/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/DurangoUWP/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /samples/DurangoUWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/DurangoUWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /samples/DurangoUWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/DurangoUWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/DurangoUWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/DurangoUWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /samples/DurangoUWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/DurangoUWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /samples/DurangoUWP/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/DurangoUWP/Assets/StoreLogo.png -------------------------------------------------------------------------------- /samples/DurangoUWP/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/DurangoUWP/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/DurangoUWP/BrofilerDurangoTestMain.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Common\StepTimer.h" 4 | #include "Common\DeviceResources.h" 5 | #include "Content\Sample3DSceneRenderer.h" 6 | #include "Content\SampleFpsTextRenderer.h" 7 | 8 | // Renders Direct2D and 3D content on the screen. 9 | namespace BrofilerDurangoTest 10 | { 11 | class BrofilerDurangoTestMain : public DX::IDeviceNotify 12 | { 13 | public: 14 | BrofilerDurangoTestMain(const std::shared_ptr& deviceResources); 15 | ~BrofilerDurangoTestMain(); 16 | void CreateWindowSizeDependentResources(); 17 | void Update(); 18 | bool Render(); 19 | 20 | // IDeviceNotify 21 | virtual void OnDeviceLost(); 22 | virtual void OnDeviceRestored(); 23 | 24 | private: 25 | // Cached pointer to device resources. 26 | std::shared_ptr m_deviceResources; 27 | 28 | // TODO: Replace with your own content renderers. 29 | std::unique_ptr m_sceneRenderer; 30 | std::unique_ptr m_fpsTextRenderer; 31 | 32 | // Rendering loop timer. 33 | DX::StepTimer m_timer; 34 | }; 35 | } -------------------------------------------------------------------------------- /samples/DurangoUWP/BrofilerDurangoTest_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/DurangoUWP/BrofilerDurangoTest_TemporaryKey.pfx -------------------------------------------------------------------------------- /samples/DurangoUWP/Content/SampleFpsTextRenderer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "..\Common\DeviceResources.h" 5 | #include "..\Common\StepTimer.h" 6 | 7 | namespace BrofilerDurangoTest 8 | { 9 | // Renders the current FPS value in the bottom right corner of the screen using Direct2D and DirectWrite. 10 | class SampleFpsTextRenderer 11 | { 12 | public: 13 | SampleFpsTextRenderer(const std::shared_ptr& deviceResources); 14 | void CreateDeviceDependentResources(); 15 | void ReleaseDeviceDependentResources(); 16 | void Update(DX::StepTimer const& timer); 17 | void Render(); 18 | 19 | private: 20 | // Cached pointer to device resources. 21 | std::shared_ptr m_deviceResources; 22 | 23 | // Resources related to text rendering. 24 | std::wstring m_text; 25 | DWRITE_TEXT_METRICS m_textMetrics; 26 | Microsoft::WRL::ComPtr m_whiteBrush; 27 | Microsoft::WRL::ComPtr m_stateBlock; 28 | Microsoft::WRL::ComPtr m_textLayout; 29 | Microsoft::WRL::ComPtr m_textFormat; 30 | }; 31 | } -------------------------------------------------------------------------------- /samples/DurangoUWP/Content/SamplePixelShader.hlsl: -------------------------------------------------------------------------------- 1 | // Per-pixel color data passed through the pixel shader. 2 | struct PixelShaderInput 3 | { 4 | float4 pos : SV_POSITION; 5 | float3 color : COLOR0; 6 | }; 7 | 8 | // A pass-through function for the (interpolated) color data. 9 | float4 main(PixelShaderInput input) : SV_TARGET 10 | { 11 | return float4(input.color, 1.0f); 12 | } 13 | -------------------------------------------------------------------------------- /samples/DurangoUWP/Content/SampleVertexShader.hlsl: -------------------------------------------------------------------------------- 1 | // A constant buffer that stores the three basic column-major matrices for composing geometry. 2 | cbuffer ModelViewProjectionConstantBuffer : register(b0) 3 | { 4 | matrix model; 5 | matrix view; 6 | matrix projection; 7 | }; 8 | 9 | // Per-vertex data used as input to the vertex shader. 10 | struct VertexShaderInput 11 | { 12 | float3 pos : POSITION; 13 | float3 color : COLOR0; 14 | }; 15 | 16 | // Per-pixel color data passed through the pixel shader. 17 | struct PixelShaderInput 18 | { 19 | float4 pos : SV_POSITION; 20 | float3 color : COLOR0; 21 | }; 22 | 23 | // Simple shader to do vertex processing on the GPU. 24 | PixelShaderInput main(VertexShaderInput input) 25 | { 26 | PixelShaderInput output; 27 | float4 pos = float4(input.pos, 1.0f); 28 | 29 | // Transform the vertex position into projected space. 30 | pos = mul(pos, model); 31 | pos = mul(pos, view); 32 | pos = mul(pos, projection); 33 | output.pos = pos; 34 | 35 | // Pass the color through without modification. 36 | output.color = input.color; 37 | 38 | return output; 39 | } 40 | -------------------------------------------------------------------------------- /samples/DurangoUWP/Content/ShaderStructures.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace BrofilerDurangoTest 4 | { 5 | // Constant buffer used to send MVP matrices to the vertex shader. 6 | struct ModelViewProjectionConstantBuffer 7 | { 8 | DirectX::XMFLOAT4X4 model; 9 | DirectX::XMFLOAT4X4 view; 10 | DirectX::XMFLOAT4X4 projection; 11 | }; 12 | 13 | // Used to send per-vertex data to the vertex shader. 14 | struct VertexPositionColor 15 | { 16 | DirectX::XMFLOAT3 pos; 17 | DirectX::XMFLOAT3 color; 18 | }; 19 | } -------------------------------------------------------------------------------- /samples/DurangoUWP/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /samples/DurangoUWP/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include -------------------------------------------------------------------------------- /samples/UnrealEnginePlugin/Config/FilterPlugin.ini: -------------------------------------------------------------------------------- 1 | [FilterPlugin] 2 | ; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and 3 | ; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively. 4 | ; 5 | ; Examples: 6 | ; /README.txt 7 | ; /Extras/... 8 | ; /Binaries/ThirdParty/*.dll 9 | 10 | /Config/... 11 | /GUI/... -------------------------------------------------------------------------------- /samples/UnrealEnginePlugin/GUI/Config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | -------------------------------------------------------------------------------- /samples/UnrealEnginePlugin/OptickPlugin.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "1.4.0", 5 | "FriendlyName": "Optick", 6 | "Description": "Super Lightweight Performance Profiler", 7 | "Category": "Performance", 8 | "CreatedBy": "Vadim Slyusarev", 9 | "CreatedByURL": "https://github.com/bombomby/optick", 10 | "DocsURL": "https://github.com/bombomby/optick/wiki/UE5-Optick-Plugin", 11 | "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/95c078f6fa924b2b82fd8f281e04850f", 12 | "SupportURL": "https://github.com/bombomby/optick/issues", 13 | "EngineVersion": "5.0.0", 14 | "CanContainContent": false, 15 | "IsBetaVersion": false, 16 | "Installed": true, 17 | "Modules": [ 18 | { 19 | "Name": "OptickPlugin", 20 | "Type": "DeveloperTool", 21 | "LoadingPhase": "Default", 22 | "WhitelistPlatforms": [ "Win64", "Mac", "Linux", "PS4", "XboxOne", "Android" ] 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /samples/UnrealEnginePlugin/Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/UnrealEnginePlugin/Resources/Icon128.png -------------------------------------------------------------------------------- /samples/UnrealEnginePlugin/Setup.bat: -------------------------------------------------------------------------------- 1 | mklink /D "Source\ThirdParty\Optick\src" "..\..\..\..\..\src" 2 | PAUSE -------------------------------------------------------------------------------- /samples/UnrealEnginePlugin/Source/Private/OptickCommands.cpp: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2019 Vadim Slyusarev 2 | 3 | #include "OptickCommands.h" 4 | 5 | #if WITH_EDITOR 6 | 7 | #define LOCTEXT_NAMESPACE "FOptickModule" 8 | 9 | void FOptickCommands::RegisterCommands() 10 | { 11 | UI_COMMAND(PluginAction, "Optick", "Open Optick Profiler", EUserInterfaceActionType::Button, FInputGesture()); 12 | } 13 | 14 | #undef LOCTEXT_NAMESPACE 15 | 16 | #endif -------------------------------------------------------------------------------- /samples/UnrealEnginePlugin/Source/Private/OptickCommands.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2019 Vadim Slyusarev 2 | 3 | #pragma once 4 | 5 | #if WITH_EDITOR 6 | 7 | #include "Slate/Public/Framework/Commands/Commands.h" 8 | 9 | #include "OptickStyle.h" 10 | 11 | class FOptickCommands : public TCommands 12 | { 13 | public: 14 | 15 | FOptickCommands() 16 | : TCommands(TEXT("Optick"), NSLOCTEXT("Contexts", "Optick", "Optick Plugin"), NAME_None, FOptickStyle::GetStyleSetName()) 17 | { 18 | } 19 | 20 | // TCommands<> interface 21 | virtual void RegisterCommands() override; 22 | 23 | public: 24 | TSharedPtr< FUICommandInfo > PluginAction; 25 | }; 26 | 27 | #endif -------------------------------------------------------------------------------- /samples/UnrealEnginePlugin/Source/Private/OptickStyle.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2019 Vadim Slyusarev 2 | 3 | #pragma once 4 | 5 | #if WITH_EDITOR 6 | 7 | #include "SlateCore/Public/Styling/SlateStyle.h" 8 | 9 | /** */ 10 | class FOptickStyle 11 | { 12 | public: 13 | 14 | static void Initialize(); 15 | 16 | static void Shutdown(); 17 | 18 | /** reloads textures used by slate renderer */ 19 | static void ReloadTextures(); 20 | 21 | /** @return The Slate style set for the Shooter game */ 22 | static const ISlateStyle& Get(); 23 | 24 | static FName GetStyleSetName(); 25 | 26 | private: 27 | 28 | static TSharedRef< class FSlateStyleSet > Create(); 29 | 30 | private: 31 | 32 | static TSharedPtr< class FSlateStyleSet > StyleInstance; 33 | }; 34 | 35 | #endif -------------------------------------------------------------------------------- /samples/UnrealEnginePlugin/Source/Public/IOptickPlugin.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2019 Vadim Slyusarev 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Modules/ModuleInterface.h" 7 | #include "Modules/ModuleManager.h" 8 | 9 | DECLARE_LOG_CATEGORY_EXTERN(OptickLog, Log, All); 10 | 11 | /** 12 | * The public interface to this module. In most cases, this interface is only public to sibling modules 13 | * within this plugin. 14 | */ 15 | class OPTICKPLUGIN_API IOptickPlugin : public IModuleInterface 16 | { 17 | 18 | public: 19 | 20 | /** 21 | * Singleton-like access to this module's interface. This is just for convenience! 22 | * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already. 23 | * 24 | * @return Returns singleton instance, loading the module on demand if needed 25 | */ 26 | static inline IOptickPlugin& Get() 27 | { 28 | return FModuleManager::LoadModuleChecked< IOptickPlugin >( "OptickPlugin" ); 29 | } 30 | 31 | /** 32 | * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true. 33 | * 34 | * @return True if the module is loaded and ready to use 35 | */ 36 | static inline bool IsAvailable() 37 | { 38 | return FModuleManager::Get().IsModuleLoaded( "OptickPlugin" ); 39 | } 40 | }; -------------------------------------------------------------------------------- /samples/UnrealEnginePlugin/Source/ThirdParty/Optick/README.txt: -------------------------------------------------------------------------------- 1 | Optick is a super-lightweight C++ profiler for Games. 2 | It provides access for all the necessary tools required for efficient performance analysis and optimization: 3 | instrumentation, switch-contexts, sampling, GPU counters. 4 | 5 | https://github.com/bombomby/optick -------------------------------------------------------------------------------- /samples/WindowsD3D12/Camera.h: -------------------------------------------------------------------------------- 1 | //********************************************************* 2 | // 3 | // Copyright (c) Microsoft. All rights reserved. 4 | // This code is licensed under the MIT License (MIT). 5 | // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF 6 | // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY 7 | // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR 8 | // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. 9 | // 10 | //********************************************************* 11 | 12 | #pragma once 13 | #include "stdafx.h" 14 | 15 | using namespace DirectX; 16 | 17 | class Camera 18 | { 19 | public: 20 | Camera(); 21 | ~Camera(); 22 | 23 | void Get3DViewProjMatrices(XMFLOAT4X4 *view, XMFLOAT4X4 *proj, float fovInDegrees, float screenWidth, float screenHeight); 24 | void Reset(); 25 | void Set(XMVECTOR eye, XMVECTOR at, XMVECTOR up); 26 | static Camera *get(); 27 | void RotateYaw(float deg); 28 | void RotatePitch(float deg); 29 | void GetOrthoProjMatrices(XMFLOAT4X4 *view, XMFLOAT4X4 *proj, float width, float height); 30 | XMVECTOR mEye; // Where the camera is in world space. Z increases into of the screen when using LH coord system (which we are and DX uses) 31 | XMVECTOR mAt; // What the camera is looking at (world origin) 32 | XMVECTOR mUp; // Which way is up 33 | private: 34 | static Camera* mCamera; 35 | }; 36 | -------------------------------------------------------------------------------- /samples/WindowsD3D12/Main.cpp: -------------------------------------------------------------------------------- 1 | //********************************************************* 2 | // 3 | // Copyright (c) Microsoft. All rights reserved. 4 | // This code is licensed under the MIT License (MIT). 5 | // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF 6 | // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY 7 | // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR 8 | // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. 9 | // 10 | //********************************************************* 11 | 12 | #include "stdafx.h" 13 | #include "D3D12Multithreading.h" 14 | 15 | _Use_decl_annotations_ 16 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow) 17 | { 18 | D3D12Multithreading sample(1280, 720, L"D3D12 Multithreading Sample"); 19 | return Win32Application::Run(&sample, hInstance, nCmdShow); 20 | } 21 | -------------------------------------------------------------------------------- /samples/WindowsD3D12/SquidRoom.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsD3D12/SquidRoom.bin -------------------------------------------------------------------------------- /samples/WindowsD3D12/Win32Application.h: -------------------------------------------------------------------------------- 1 | //********************************************************* 2 | // 3 | // Copyright (c) Microsoft. All rights reserved. 4 | // This code is licensed under the MIT License (MIT). 5 | // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF 6 | // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY 7 | // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR 8 | // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. 9 | // 10 | //********************************************************* 11 | 12 | #pragma once 13 | 14 | #include "DXSample.h" 15 | 16 | class DXSample; 17 | 18 | class Win32Application 19 | { 20 | public: 21 | static int Run(DXSample* pSample, HINSTANCE hInstance, int nCmdShow); 22 | static HWND GetHwnd() { return m_hwnd; } 23 | 24 | protected: 25 | static LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); 26 | 27 | private: 28 | static HWND m_hwnd; 29 | }; 30 | -------------------------------------------------------------------------------- /samples/WindowsD3D12/stdafx.cpp: -------------------------------------------------------------------------------- 1 | //********************************************************* 2 | // 3 | // Copyright (c) Microsoft. All rights reserved. 4 | // This code is licensed under the MIT License (MIT). 5 | // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF 6 | // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY 7 | // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR 8 | // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. 9 | // 10 | //********************************************************* 11 | 12 | #include "stdafx.h" 13 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/assimp/.editorconfig: -------------------------------------------------------------------------------- 1 | # See for details 2 | 3 | [*.{h,hpp,inl}] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | indent_size = 4 8 | indent_style = space 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/assimp/Compiler/poppack1.h: -------------------------------------------------------------------------------- 1 | 2 | // =============================================================================== 3 | // May be included multiple times - resets structure packing to the defaults 4 | // for all supported compilers. Reverts the changes made by #include 5 | // 6 | // Currently this works on the following compilers: 7 | // MSVC 7,8,9 8 | // GCC 9 | // BORLAND (complains about 'pack state changed but not reverted', but works) 10 | // =============================================================================== 11 | 12 | #ifndef AI_PUSHPACK_IS_DEFINED 13 | # error pushpack1.h must be included after poppack1.h 14 | #endif 15 | 16 | // reset packing to the original value 17 | #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) 18 | # pragma pack( pop ) 19 | #endif 20 | #undef PACK_STRUCT 21 | 22 | #undef AI_PUSHPACK_IS_DEFINED 23 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/assimp/Compiler/pushpack1.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | // =============================================================================== 4 | // May be included multiple times - sets structure packing to 1 5 | // for all supported compilers. #include reverts the changes. 6 | // 7 | // Currently this works on the following compilers: 8 | // MSVC 7,8,9 9 | // GCC 10 | // BORLAND (complains about 'pack state changed but not reverted', but works) 11 | // Clang 12 | // 13 | // 14 | // USAGE: 15 | // 16 | // struct StructToBePacked { 17 | // } PACK_STRUCT; 18 | // 19 | // =============================================================================== 20 | 21 | #ifdef AI_PUSHPACK_IS_DEFINED 22 | # error poppack1.h must be included after pushpack1.h 23 | #endif 24 | 25 | #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) 26 | # pragma pack(push,1) 27 | # define PACK_STRUCT 28 | #elif defined( __GNUC__ ) 29 | # if !defined(HOST_MINGW) 30 | # define PACK_STRUCT __attribute__((__packed__)) 31 | # else 32 | # define PACK_STRUCT __attribute__((gcc_struct, __packed__)) 33 | # endif 34 | #else 35 | # error Compiler not supported 36 | #endif 37 | 38 | #if defined(_MSC_VER) 39 | 40 | // C4103: Packing was changed after the inclusion of the header, probably missing #pragma pop 41 | # pragma warning (disable : 4103) 42 | #endif 43 | 44 | #define AI_PUSHPACK_IS_DEFINED 45 | 46 | 47 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/assimp/ai_assert.h: -------------------------------------------------------------------------------- 1 | /** @file ai_assert.h 2 | */ 3 | #ifndef AI_DEBUG_H_INC 4 | #define AI_DEBUG_H_INC 5 | 6 | #ifdef ASSIMP_BUILD_DEBUG 7 | # include 8 | # define ai_assert(expression) assert(expression) 9 | #else 10 | # define ai_assert(expression) 11 | #endif 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/assimp/matrix3x3.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/assimp/matrix3x3.h -------------------------------------------------------------------------------- /samples/WindowsVulkan/assimp/matrix3x3.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/assimp/matrix3x3.inl -------------------------------------------------------------------------------- /samples/WindowsVulkan/assimp/matrix4x4.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/assimp/matrix4x4.h -------------------------------------------------------------------------------- /samples/WindowsVulkan/assimp/matrix4x4.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/assimp/matrix4x4.inl -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/models/retroufo_license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/data/models/retroufo_license.txt -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/models/sphere.3ds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/data/models/sphere.3ds -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/base/uioverlay.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (binding = 0) uniform sampler2D fontSampler; 4 | 5 | layout (location = 0) in vec2 inUV; 6 | layout (location = 1) in vec4 inColor; 7 | 8 | layout (location = 0) out vec4 outColor; 9 | 10 | void main() 11 | { 12 | outColor = inColor * texture(fontSampler, inUV); 13 | } -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/base/uioverlay.frag.spv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/data/shaders/base/uioverlay.frag.spv -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/base/uioverlay.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec2 inPos; 4 | layout (location = 1) in vec2 inUV; 5 | layout (location = 2) in vec4 inColor; 6 | 7 | layout (push_constant) uniform PushConstants { 8 | vec2 scale; 9 | vec2 translate; 10 | } pushConstants; 11 | 12 | layout (location = 0) out vec2 outUV; 13 | layout (location = 1) out vec4 outColor; 14 | 15 | out gl_PerVertex 16 | { 17 | vec4 gl_Position; 18 | }; 19 | 20 | void main() 21 | { 22 | outUV = inUV; 23 | outColor = inColor; 24 | gl_Position = vec4(inPos * pushConstants.scale + pushConstants.translate, 0.0, 1.0); 25 | } -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/base/uioverlay.vert.spv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/data/shaders/base/uioverlay.vert.spv -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/multithreading/generate-spirv.bat: -------------------------------------------------------------------------------- 1 | glslangvalidator -V phong.vert -o phong.vert.spv 2 | glslangvalidator -V phong.frag -o phong.frag.spv 3 | glslangvalidator -V starsphere.vert -o starsphere.vert.spv 4 | glslangvalidator -V starsphere.frag -o starsphere.frag.spv -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/multithreading/phong.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | #extension GL_ARB_separate_shader_objects : enable 4 | #extension GL_ARB_shading_language_420pack : enable 5 | 6 | layout (location = 0) in vec3 inNormal; 7 | layout (location = 1) in vec3 inColor; 8 | layout (location = 3) in vec3 inViewVec; 9 | layout (location = 4) in vec3 inLightVec; 10 | 11 | layout (location = 0) out vec4 outFragColor; 12 | 13 | 14 | void main() 15 | { 16 | vec3 N = normalize(inNormal); 17 | vec3 L = normalize(inLightVec); 18 | vec3 V = normalize(inViewVec); 19 | vec3 R = reflect(-L, N); 20 | vec3 diffuse = max(dot(N, L), 0.0) * inColor; 21 | vec3 specular = pow(max(dot(R, V), 0.0), 8.0) * vec3(0.75); 22 | outFragColor = vec4(diffuse + specular, 1.0); 23 | } -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/multithreading/phong.frag.spv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/data/shaders/multithreading/phong.frag.spv -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/multithreading/phong.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | #extension GL_ARB_separate_shader_objects : enable 4 | #extension GL_ARB_shading_language_420pack : enable 5 | 6 | layout (location = 0) in vec3 inPos; 7 | layout (location = 1) in vec3 inNormal; 8 | layout (location = 2) in vec3 inColor; 9 | 10 | layout (std140, push_constant) uniform PushConsts 11 | { 12 | mat4 mvp; 13 | vec3 color; 14 | } pushConsts; 15 | 16 | layout (location = 0) out vec3 outNormal; 17 | layout (location = 1) out vec3 outColor; 18 | layout (location = 3) out vec3 outViewVec; 19 | layout (location = 4) out vec3 outLightVec; 20 | 21 | void main() 22 | { 23 | outNormal = inNormal; 24 | 25 | if ( (inColor.r == 1.0) && (inColor.g == 0.0) && (inColor.b == 0.0)) 26 | { 27 | outColor = pushConsts.color; 28 | } 29 | else 30 | { 31 | outColor = inColor; 32 | } 33 | 34 | gl_Position = pushConsts.mvp * vec4(inPos.xyz, 1.0); 35 | 36 | vec4 pos = pushConsts.mvp * vec4(inPos, 1.0); 37 | outNormal = mat3(pushConsts.mvp) * inNormal; 38 | // vec3 lPos = ubo.lightPos.xyz; 39 | vec3 lPos = vec3(0.0); 40 | outLightVec = lPos - pos.xyz; 41 | outViewVec = -pos.xyz; 42 | } -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/multithreading/phong.vert.spv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/data/shaders/multithreading/phong.vert.spv -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/multithreading/starsphere.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | #extension GL_ARB_separate_shader_objects : enable 4 | #extension GL_ARB_shading_language_420pack : enable 5 | 6 | layout (location = 0) in vec3 inUVW; 7 | 8 | layout (location = 0) out vec4 outFragColor; 9 | 10 | #define HASHSCALE3 vec3(443.897, 441.423, 437.195) 11 | #define STARFREQUENCY 0.01 12 | 13 | // Hash function by Dave Hoskins (https://www.shadertoy.com/view/4djSRW) 14 | float hash33(vec3 p3) 15 | { 16 | p3 = fract(p3 * HASHSCALE3); 17 | p3 += dot(p3, p3.yxz+vec3(19.19)); 18 | return fract((p3.x + p3.y)*p3.z + (p3.x+p3.z)*p3.y + (p3.y+p3.z)*p3.x); 19 | } 20 | 21 | vec3 starField(vec3 pos) 22 | { 23 | vec3 color = vec3(0.0); 24 | float threshhold = (1.0 - STARFREQUENCY); 25 | float rnd = hash33(pos); 26 | if (rnd >= threshhold) 27 | { 28 | float starCol = pow((rnd - threshhold) / (1.0 - threshhold), 16.0); 29 | color += vec3(starCol); 30 | } 31 | return color; 32 | } 33 | 34 | void main() 35 | { 36 | // Fake atmosphere at the bottom 37 | vec3 atmosphere = clamp(vec3(0.1, 0.15, 0.4) * (inUVW.t - 5.0), 0.0, 1.0); 38 | 39 | vec3 color = starField(inUVW) + atmosphere; 40 | 41 | outFragColor = vec4(color, 1.0); 42 | } -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/multithreading/starsphere.frag.spv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/data/shaders/multithreading/starsphere.frag.spv -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/multithreading/starsphere.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | #extension GL_ARB_separate_shader_objects : enable 4 | #extension GL_ARB_shading_language_420pack : enable 5 | 6 | layout (location = 0) in vec3 inPos; 7 | 8 | layout (std140, push_constant) uniform PushConsts 9 | { 10 | mat4 mvp; 11 | } pushConsts; 12 | 13 | layout (location = 0) out vec3 outUVW; 14 | 15 | void main() 16 | { 17 | outUVW = inPos; 18 | gl_Position = pushConsts.mvp * vec4(inPos.xyz, 1.0); 19 | } 20 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/data/shaders/multithreading/starsphere.vert.spv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/data/shaders/multithreading/starsphere.vert.spv -------------------------------------------------------------------------------- /samples/WindowsVulkan/dll/assimp-vc140-mt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/dll/assimp-vc140-mt.dll -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(NAME gli_dummy) 2 | 3 | file(GLOB ROOT_SOURCE *.cpp) 4 | file(GLOB ROOT_INLINE *.inl) 5 | file(GLOB ROOT_HEADER *.hpp) 6 | file(GLOB ROOT_TEXT ../*.txt) 7 | file(GLOB ROOT_MD ../*.md) 8 | file(GLOB ROOT_KMG ../doc/spec/*.html) 9 | 10 | file(GLOB_RECURSE CORE_SOURCE ./core/*.cpp) 11 | file(GLOB_RECURSE CORE_INLINE ./core/*.inl) 12 | file(GLOB_RECURSE CORE_HEADER ./core/*.hpp) 13 | 14 | file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) 15 | file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) 16 | file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) 17 | 18 | source_group("KMG Spec" FILES ${ROOT_KMG}) 19 | source_group("Text Files" FILES ${ROOT_TEXT} ${ROOT_MD}) 20 | source_group("Core Files" FILES ${CORE_SOURCE}) 21 | source_group("Core Files" FILES ${CORE_INLINE}) 22 | source_group("Core Files" FILES ${CORE_HEADER}) 23 | source_group("GTX Files" FILES ${GTX_SOURCE}) 24 | source_group("GTX Files" FILES ${GTX_INLINE}) 25 | source_group("GTX Files" FILES ${GTX_HEADER}) 26 | 27 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) 28 | 29 | add_executable(${NAME} ${ROOT_TEXT} ${ROOT_MD} ${ROOT_KMG} 30 | ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} 31 | ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} 32 | ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER}) 33 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/comparison.hpp: -------------------------------------------------------------------------------- 1 | /// @brief Include to use operators to compare whether two textures or images are equal 2 | /// @file gli/comparison.hpp 3 | 4 | #pragma once 5 | 6 | #include "image.hpp" 7 | #include "texture1d.hpp" 8 | #include "texture1d_array.hpp" 9 | #include "texture2d.hpp" 10 | #include "texture2d_array.hpp" 11 | #include "texture3d.hpp" 12 | #include "texture_cube.hpp" 13 | #include "texture_cube_array.hpp" 14 | 15 | namespace gli 16 | { 17 | /// Compare two images. Two images are equal when the date is the same. 18 | bool operator==(image const& ImageA, image const& ImageB); 19 | 20 | /// Compare two images. Two images are equal when the date is the same. 21 | bool operator!=(image const& ImageA, image const& ImageB); 22 | 23 | /// Compare two textures. Two textures are the same when the data, the format and the targets are the same. 24 | bool operator==(texture const& A, texture const& B); 25 | 26 | /// Compare two textures. Two textures are the same when the data, the format and the targets are the same. 27 | bool operator!=(texture const& A, texture const& B); 28 | }//namespace gli 29 | 30 | #include "./core/comparison.inl" 31 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/convert.hpp: -------------------------------------------------------------------------------- 1 | /// @brief Include to copy textures, images or a subset of either textures or an images. These operations will cause memory allocations. 2 | /// @file gli/convert.hpp 3 | 4 | #pragma once 5 | 6 | #include "texture1d.hpp" 7 | #include "texture1d_array.hpp" 8 | #include "texture2d.hpp" 9 | #include "texture2d_array.hpp" 10 | #include "texture3d.hpp" 11 | #include "texture_cube.hpp" 12 | #include "texture_cube_array.hpp" 13 | 14 | namespace gli 15 | { 16 | /// Convert texture data to a new format 17 | /// 18 | /// @param Texture Source texture, the format must be uncompressed. 19 | /// @param Format Destination Texture format, it must be uncompressed. 20 | template 21 | texture_type convert(texture_type const& Texture, format Format); 22 | }//namespace gli 23 | 24 | #include "./core/convert.inl" 25 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/core/clear.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "convert_func.hpp" 4 | 5 | namespace gli{ 6 | namespace detail 7 | { 8 | template 9 | struct clear 10 | { 11 | static void call(textureType & Texture, typename convert::writeFunc Write, vec<4, T, P> const& Color) 12 | { 13 | GLI_ASSERT(Write); 14 | 15 | texture const ConvertTexel(Texture.target(), Texture.format(), texture::extent_type(1), 1, 1, 1); 16 | textureType Texel(ConvertTexel); 17 | Write(Texel, typename textureType::extent_type(0), 0, 0, 0, Color); 18 | 19 | size_t const BlockSize(block_size(Texture.format())); 20 | for(size_t BlockIndex = 0, BlockCount = Texture.size() / BlockSize; BlockIndex < BlockCount; ++BlockIndex) 21 | memcpy(static_cast(Texture.data()) + BlockSize * BlockIndex, Texel.data(), BlockSize); 22 | } 23 | }; 24 | }//namespace detail 25 | }//namespace gli 26 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/core/file.hpp: -------------------------------------------------------------------------------- 1 | /// @brief File helper functions 2 | /// @file gli/core/file.hpp 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace gli{ 9 | namespace detail 10 | { 11 | FILE* open_file(const char *Filename, const char *mode); 12 | }//namespace detail 13 | }//namespace gli 14 | 15 | #include "./file.inl" 16 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/core/file.inl: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace gli{ 6 | namespace detail 7 | { 8 | inline FILE* open_file(const char *Filename, const char *Mode) 9 | { 10 | # if GLM_COMPILER & GLM_COMPILER_VC 11 | FILE *File = nullptr; 12 | fopen_s(&File, Filename, Mode); 13 | return File; 14 | # else 15 | return std::fopen(Filename, Mode); 16 | # endif 17 | } 18 | }//namespace detail 19 | }//namespace gli 20 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/core/filter.hpp: -------------------------------------------------------------------------------- 1 | /// @brief Include to use filter enum, to select filtering methods. 2 | /// @file gli/core/filter.hpp 3 | 4 | #pragma once 5 | 6 | namespace gli 7 | { 8 | /// Texture filtring modes 9 | enum filter 10 | { 11 | FILTER_NONE = 0, 12 | FILTER_NEAREST, FILTER_FIRST = FILTER_NEAREST, 13 | FILTER_LINEAR, FILTER_LAST = FILTER_LINEAR 14 | }; 15 | 16 | enum 17 | { 18 | FILTER_COUNT = FILTER_LAST - FILTER_FIRST + 1, 19 | FILTER_INVALID = -1 20 | }; 21 | }//namespace gli 22 | 23 | #include "filter.inl" 24 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/core/filter.inl: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace gli{ 4 | namespace detail 5 | { 6 | 7 | }//namespace detail 8 | }//namespace gli 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/core/flip.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "../texture2d.hpp" 6 | #include "../texture2d_array.hpp" 7 | #include "../texture_cube.hpp" 8 | #include "../texture_cube_array.hpp" 9 | 10 | namespace gli 11 | { 12 | template 13 | texture flip(texture const & Texture); 14 | 15 | }//namespace gli 16 | 17 | #include "flip.inl" 18 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/core/levels.inl: -------------------------------------------------------------------------------- 1 | #include 2 | #define GLM_ENABLE_EXPERIMENTAL 3 | #include 4 | 5 | namespace gli 6 | { 7 | template class vecType> 8 | inline T levels(vecType const& Extent) 9 | { 10 | return glm::log2(compMax(Extent)) + static_cast(1); 11 | } 12 | 13 | template 14 | inline T levels(T Extent) 15 | { 16 | return static_cast(glm::log2(Extent) + static_cast(1)); 17 | } 18 | /* 19 | inline int levels(int Extent) 20 | { 21 | return glm::log2(Extent) + static_cast(1); 22 | } 23 | */ 24 | }//namespace gli 25 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/core/load.inl: -------------------------------------------------------------------------------- 1 | #include "../load_dds.hpp" 2 | #include "../load_kmg.hpp" 3 | #include "../load_ktx.hpp" 4 | #include "file.hpp" 5 | 6 | namespace gli 7 | { 8 | /// Load a texture (DDS, KTX or KMG) from memory 9 | inline texture load(char const * Data, std::size_t Size) 10 | { 11 | { 12 | texture Texture = load_dds(Data, Size); 13 | if(!Texture.empty()) 14 | return Texture; 15 | } 16 | { 17 | texture Texture = load_kmg(Data, Size); 18 | if(!Texture.empty()) 19 | return Texture; 20 | } 21 | { 22 | texture Texture = load_ktx(Data, Size); 23 | if(!Texture.empty()) 24 | return Texture; 25 | } 26 | 27 | return texture(); 28 | } 29 | 30 | /// Load a texture (DDS, KTX or KMG) from file 31 | inline texture load(char const * Filename) 32 | { 33 | FILE* File = detail::open_file(Filename, "rb"); 34 | if(!File) 35 | return texture(); 36 | 37 | long Beg = std::ftell(File); 38 | std::fseek(File, 0, SEEK_END); 39 | long End = std::ftell(File); 40 | std::fseek(File, 0, SEEK_SET); 41 | 42 | std::vector Data(static_cast(End - Beg)); 43 | 44 | std::fread(&Data[0], 1, Data.size(), File); 45 | std::fclose(File); 46 | 47 | return load(&Data[0], Data.size()); 48 | } 49 | 50 | /// Load a texture (DDS, KTX or KMG) from file 51 | inline texture load(std::string const & Filename) 52 | { 53 | return load(Filename.c_str()); 54 | } 55 | }//namespace gli 56 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/core/s3tc.hpp: -------------------------------------------------------------------------------- 1 | /// @brief Include to compress and decompress s3tc blocks 2 | /// @file gli/s3tc.hpp 3 | 4 | #pragma once 5 | 6 | namespace gli 7 | { 8 | namespace detail 9 | { 10 | struct dxt1_block { 11 | uint16_t Color0; 12 | uint16_t Color1; 13 | uint8_t Row[4]; 14 | }; 15 | 16 | struct dxt3_block { 17 | uint16_t AlphaRow[4]; 18 | uint16_t Color0; 19 | uint16_t Color1; 20 | uint8_t Row[4]; 21 | }; 22 | 23 | struct dxt5_block { 24 | uint8_t Alpha[2]; 25 | uint8_t AlphaBitmap[6]; 26 | uint16_t Color0; 27 | uint16_t Color1; 28 | uint8_t Row[4]; 29 | }; 30 | 31 | struct texel_block4x4 { 32 | // row x col 33 | glm::vec4 Texel[4][4]; 34 | }; 35 | 36 | glm::vec4 decompress_dxt1(const dxt1_block &Block, const extent2d &BlockTexelCoord); 37 | texel_block4x4 decompress_dxt1_block(const dxt1_block &Block); 38 | 39 | glm::vec4 decompress_dxt3(const dxt3_block &Block, const extent2d &BlockTexelCoord); 40 | texel_block4x4 decompress_dxt3_block(const dxt3_block &Block); 41 | 42 | glm::vec4 decompress_dxt5(const dxt5_block &Block, const extent2d &BlockTexelCoord); 43 | texel_block4x4 decompress_dxt5_block(const dxt5_block &Block); 44 | 45 | }//namespace detail 46 | }//namespace gli 47 | 48 | #include "./s3tc.inl" 49 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/core/sampler.inl: -------------------------------------------------------------------------------- 1 | #define GLM_ENABLE_EXPERIMENTAL 2 | #include 3 | 4 | namespace gli{ 5 | namespace detail 6 | { 7 | template 8 | inline T passThrought(T const & SampleCoord) 9 | { 10 | return SampleCoord; 11 | } 12 | }//namespace detail 13 | 14 | inline sampler::sampler(wrap Wrap, filter Mip, filter Min) 15 | : Wrap(get_func(Wrap)) 16 | , Mip(Mip) 17 | , Min(Min) 18 | {} 19 | 20 | inline sampler::wrap_type sampler::get_func(wrap WrapMode) const 21 | { 22 | static wrap_type Table[] = 23 | { 24 | glm::clamp, 25 | detail::passThrought, 26 | glm::repeat, 27 | glm::mirrorRepeat, 28 | glm::mirrorClamp, 29 | glm::mirrorClamp 30 | }; 31 | static_assert(sizeof(Table) / sizeof(Table[0]) == WRAP_COUNT, "Table needs to be updated"); 32 | 33 | return Table[WrapMode]; 34 | } 35 | }//namespace gli 36 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/core/save.inl: -------------------------------------------------------------------------------- 1 | #include "../save_dds.hpp" 2 | #include "../save_kmg.hpp" 3 | #include "../save_ktx.hpp" 4 | 5 | namespace gli 6 | { 7 | inline bool save(texture const & Texture, char const * Path) 8 | { 9 | return save(Texture, std::string(Path)); 10 | } 11 | 12 | inline bool save(texture const & Texture, std::string const & Path) 13 | { 14 | if(Path.rfind(".dds") != std::string::npos) 15 | return save_dds(Texture, Path); 16 | if(Path.rfind(".kmg") != std::string::npos) 17 | return save_kmg(Texture, Path); 18 | if(Path.rfind(".ktx") != std::string::npos) 19 | return save_ktx(Texture, Path); 20 | return false; 21 | } 22 | }//namespace gli 23 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/load.hpp: -------------------------------------------------------------------------------- 1 | /// @brief Include to load DDS, KTX or KMG textures from files or memory. 2 | /// @file gli/load.hpp 3 | 4 | #pragma once 5 | 6 | #include "texture.hpp" 7 | 8 | namespace gli 9 | { 10 | /// Loads a texture storage_linear from file. Returns an empty storage_linear in case of failure. 11 | /// 12 | /// @param Path Path of the file to open including filaname and filename extension 13 | texture load(char const* Path); 14 | 15 | /// Loads a texture storage_linear from file. Returns an empty storage_linear in case of failure. 16 | /// 17 | /// @param Path Path of the file to open including filaname and filename extension 18 | texture load(std::string const& Path); 19 | 20 | /// Loads a texture storage_linear from memory. Returns an empty storage_linear in case of failure. 21 | /// 22 | /// @param Data Data of a texture 23 | /// @param Size Size of the data 24 | texture load(char const* Data, std::size_t Size); 25 | }//namespace gli 26 | 27 | #include "./core/load.inl" 28 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/load_dds.hpp: -------------------------------------------------------------------------------- 1 | /// @brief Include to load DDS textures from files or memory. 2 | /// @file gli/load_dds.hpp 3 | 4 | #pragma once 5 | 6 | #include "texture.hpp" 7 | 8 | namespace gli 9 | { 10 | /// Loads a texture storage_linear from DDS file. Returns an empty storage_linear in case of failure. 11 | /// 12 | /// @param Path Path of the file to open including filaname and filename extension 13 | texture load_dds(char const* Path); 14 | 15 | /// Loads a texture storage_linear from DDS file. Returns an empty storage_linear in case of failure. 16 | /// 17 | /// @param Path Path of the file to open including filaname and filename extension 18 | texture load_dds(std::string const& Path); 19 | 20 | /// Loads a texture storage_linear from DDS memory. Returns an empty storage_linear in case of failure. 21 | /// 22 | /// @param Data Pointer to the beginning of the texture container data to read 23 | /// @param Size Size of texture container Data to read 24 | texture load_dds(char const* Data, std::size_t Size); 25 | }//namespace gli 26 | 27 | #include "./core/load_dds.inl" 28 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/load_kmg.hpp: -------------------------------------------------------------------------------- 1 | /// @brief Include to load KMG textures from files or memory. 2 | /// @file gli/load_kmg.hpp 3 | 4 | #pragma once 5 | 6 | #include "texture.hpp" 7 | 8 | namespace gli 9 | { 10 | /// Loads a texture storage_linear from KMG (Khronos Image) file. Returns an empty storage_linear in case of failure. 11 | /// 12 | /// @param Path Path of the file to open including filaname and filename extension 13 | texture load_kmg(char const* Path); 14 | 15 | /// Loads a texture storage_linear from KMG (Khronos Image) file. Returns an empty storage_linear in case of failure. 16 | /// 17 | /// @param Path Path of the file to open including filaname and filename extension 18 | texture load_kmg(std::string const& Path); 19 | 20 | /// Loads a texture storage_linear from KMG (Khronos Image) memory. Returns an empty storage_linear in case of failure. 21 | /// 22 | /// @param Data Pointer to the beginning of the texture container data to read 23 | /// @param Size Size of texture container Data to read 24 | texture load_kmg(char const* Data, std::size_t Size); 25 | }//namespace gli 26 | 27 | #include "./core/load_kmg.inl" 28 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/load_ktx.hpp: -------------------------------------------------------------------------------- 1 | /// @brief Include to load KTX textures from files or memory. 2 | /// @file gli/load_ktx.hpp 3 | 4 | #pragma once 5 | 6 | #include "texture.hpp" 7 | 8 | namespace gli 9 | { 10 | /// Loads a texture storage_linear from KTX file. Returns an empty storage_linear in case of failure. 11 | /// 12 | /// @param Path Path of the file to open including filaname and filename extension 13 | texture load_ktx(char const* Path); 14 | 15 | /// Loads a texture storage_linear from KTX file. Returns an empty storage_linear in case of failure. 16 | /// 17 | /// @param Path Path of the file to open including filaname and filename extension 18 | texture load_ktx(std::string const& Path); 19 | 20 | /// Loads a texture storage_linear from KTX memory. Returns an empty storage_linear in case of failure. 21 | /// 22 | /// @param Data Pointer to the beginning of the texture container data to read 23 | /// @param Size Size of texture container Data to read 24 | texture load_ktx(char const* Data, std::size_t Size); 25 | }//namespace gli 26 | 27 | #include "./core/load_ktx.inl" 28 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/sampler.hpp: -------------------------------------------------------------------------------- 1 | /// @brief Include to use wrap modes and the sampler base class. 2 | /// @file gli/sampler.hpp 3 | 4 | #pragma once 5 | 6 | #include "core/filter.hpp" 7 | 8 | namespace gli 9 | { 10 | /// Texture coordinate wrapping mode 11 | enum wrap 12 | { 13 | WRAP_CLAMP_TO_EDGE, WRAP_FIRST = WRAP_CLAMP_TO_EDGE, 14 | WRAP_CLAMP_TO_BORDER, 15 | WRAP_REPEAT, 16 | WRAP_MIRROR_REPEAT, 17 | WRAP_MIRROR_CLAMP_TO_EDGE, 18 | WRAP_MIRROR_CLAMP_TO_BORDER, WRAP_LAST = WRAP_MIRROR_CLAMP_TO_BORDER 19 | }; 20 | 21 | enum 22 | { 23 | WRAP_COUNT = WRAP_LAST - WRAP_FIRST + 1 24 | }; 25 | 26 | /// Evaluate whether the texture coordinate wrapping mode relies on border color 27 | inline bool is_border(wrap Wrap) 28 | { 29 | return Wrap == WRAP_CLAMP_TO_BORDER || Wrap == WRAP_MIRROR_CLAMP_TO_BORDER; 30 | } 31 | 32 | /// Genetic sampler class. 33 | class sampler 34 | { 35 | public: 36 | sampler(wrap Wrap, filter Mip, filter Min); 37 | virtual ~sampler() = default; 38 | 39 | protected: 40 | typedef float(*wrap_type)(float const & SamplerCoord); 41 | 42 | wrap_type get_func(wrap WrapMode) const; 43 | 44 | wrap_type Wrap; 45 | filter Mip; 46 | filter Min; 47 | }; 48 | }//namespace gli 49 | 50 | #include "./core/sampler.inl" 51 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/save.hpp: -------------------------------------------------------------------------------- 1 | /// @brief Include to save DDS, KTX or KMG textures to files or memory. 2 | /// @file gli/save.hpp 3 | 4 | #pragma once 5 | 6 | #include "save_dds.hpp" 7 | #include "save_ktx.hpp" 8 | 9 | namespace gli 10 | { 11 | /// Save a texture storage_linear to file. 12 | /// 13 | /// @param Texture Source texture to save 14 | /// @param Path Path for where to save the file. It must include the filaname and filename extension. 15 | /// The function use the filename extension included in the path to figure out the file container to use. 16 | /// @return Returns false if the function fails to save the file. 17 | bool save(texture const & Texture, char const * Path); 18 | 19 | /// Save a texture storage_linear to file. 20 | /// 21 | /// @param Texture Source texture to save 22 | /// @param Path Path for where to save the file. It must include the filaname and filename extension. 23 | /// The function use the filename extension included in the path to figure out the file container to use. 24 | /// @return Returns false if the function fails to save the file. 25 | bool save(texture const & Texture, std::string const & Path); 26 | }//namespace gli 27 | 28 | #include "./core/save.inl" 29 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/gli/target.hpp: -------------------------------------------------------------------------------- 1 | /// @brief Include to use the target enum and query properties of targets. 2 | /// @file gli/target.hpp 3 | 4 | #pragma once 5 | 6 | namespace gli 7 | { 8 | /// Texture target: type/shape of the texture storage_linear 9 | enum target 10 | { 11 | TARGET_1D = 0, TARGET_FIRST = TARGET_1D, 12 | TARGET_1D_ARRAY, 13 | TARGET_2D, 14 | TARGET_2D_ARRAY, 15 | TARGET_3D, 16 | TARGET_RECT, 17 | TARGET_RECT_ARRAY, 18 | TARGET_CUBE, 19 | TARGET_CUBE_ARRAY, TARGET_LAST = TARGET_CUBE_ARRAY 20 | }; 21 | 22 | enum 23 | { 24 | TARGET_COUNT = TARGET_LAST - TARGET_FIRST + 1, 25 | TARGET_INVALID = -1 26 | }; 27 | 28 | /// Check whether a target is a 1D target 29 | inline bool is_target_1d(target Target) 30 | { 31 | return Target == TARGET_1D || Target == TARGET_1D_ARRAY; 32 | } 33 | 34 | /// Check whether a target is an array target 35 | inline bool is_target_array(target Target) 36 | { 37 | return Target == TARGET_1D_ARRAY || Target == TARGET_2D_ARRAY || Target == TARGET_CUBE_ARRAY; 38 | } 39 | 40 | /// Check whether a target is a cube map target 41 | inline bool is_target_cube(target Target) 42 | { 43 | return Target == TARGET_CUBE || Target == TARGET_CUBE_ARRAY; 44 | } 45 | 46 | /// Check whether a target is a rectangle target 47 | inline bool is_target_rect(target Target) 48 | { 49 | return Target == TARGET_RECT || Target == TARGET_RECT_ARRAY; 50 | } 51 | }//namespace gli 52 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/common.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/common.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/func_common.hpp" 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/detail/_fixes.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/_fixes.hpp 3 | 4 | #include 5 | 6 | //! Workaround for compatibility with other libraries 7 | #ifdef max 8 | #undef max 9 | #endif 10 | 11 | //! Workaround for compatibility with other libraries 12 | #ifdef min 13 | #undef min 14 | #endif 15 | 16 | //! Workaround for Android 17 | #ifdef isnan 18 | #undef isnan 19 | #endif 20 | 21 | //! Workaround for Android 22 | #ifdef isinf 23 | #undef isinf 24 | #endif 25 | 26 | //! Workaround for Chrone Native Client 27 | #ifdef log2 28 | #undef log2 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/detail/func_exponential_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_exponential_simd.inl 3 | 4 | #include "../simd/exponential.h" 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | namespace glm{ 9 | namespace detail 10 | { 11 | template 12 | struct compute_sqrt<4, float, P, true> 13 | { 14 | GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) 15 | { 16 | vec<4, float, P> result(uninitialize); 17 | result.data = _mm_sqrt_ps(v.data); 18 | return result; 19 | } 20 | }; 21 | 22 | template<> 23 | struct compute_sqrt<4, float, aligned_lowp, true> 24 | { 25 | GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const & v) 26 | { 27 | vec<4, float, aligned_lowp> result(uninitialize); 28 | result.data = glm_vec4_sqrt_lowp(v.data); 29 | return result; 30 | } 31 | }; 32 | }//namespace detail 33 | }//namespace glm 34 | 35 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 36 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/detail/func_packing_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_packing_simd.inl 3 | 4 | namespace glm{ 5 | namespace detail 6 | { 7 | 8 | }//namespace detail 9 | }//namespace glm 10 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/detail/func_trigonometric_simd.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/glm/detail/func_trigonometric_simd.inl -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/detail/func_vector_relational_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_vector_relational_simd.inl 3 | 4 | namespace glm{ 5 | namespace detail 6 | { 7 | 8 | }//namespace detail 9 | }//namespace glm 10 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/detail/precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/precision.hpp 3 | 4 | #pragma once 5 | 6 | #include "setup.hpp" 7 | 8 | namespace glm 9 | { 10 | enum precision 11 | { 12 | packed_highp, 13 | packed_mediump, 14 | packed_lowp, 15 | 16 | # if GLM_HAS_ALIGNED_TYPE 17 | aligned_highp, 18 | aligned_mediump, 19 | aligned_lowp, 20 | aligned = aligned_highp, 21 | # endif 22 | 23 | highp = packed_highp, 24 | mediump = packed_mediump, 25 | lowp = packed_lowp, 26 | packed = packed_highp, 27 | 28 | # if GLM_HAS_ALIGNED_TYPE && defined(GLM_FORCE_ALIGNED) 29 | defaultp = aligned_highp 30 | # else 31 | defaultp = highp 32 | # endif 33 | }; 34 | 35 | template struct vec; 36 | template struct mat; 37 | 38 | namespace detail 39 | { 40 | template 41 | struct is_aligned 42 | { 43 | static const bool value = false; 44 | }; 45 | 46 | # if GLM_HAS_ALIGNED_TYPE 47 | template<> 48 | struct is_aligned 49 | { 50 | static const bool value = true; 51 | }; 52 | 53 | template<> 54 | struct is_aligned 55 | { 56 | static const bool value = true; 57 | }; 58 | 59 | template<> 60 | struct is_aligned 61 | { 62 | static const bool value = true; 63 | }; 64 | # endif 65 | }//namespace detail 66 | }//namespace glm 67 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_half.hpp 3 | 4 | #pragma once 5 | 6 | #include "setup.hpp" 7 | 8 | namespace glm{ 9 | namespace detail 10 | { 11 | typedef short hdata; 12 | 13 | GLM_FUNC_DECL float toFloat32(hdata value); 14 | GLM_FUNC_DECL hdata toFloat16(float const & value); 15 | 16 | }//namespace detail 17 | }//namespace glm 18 | 19 | #include "type_half.inl" 20 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/detail/type_mat.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_mat.inl 3 | 4 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/detail/type_mat4x4_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_mat4x4_sse2.inl 3 | 4 | namespace glm 5 | { 6 | 7 | }//namespace glm 8 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/detail/type_vec.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_vec.inl 3 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/exponential.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/exponential.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/func_exponential.hpp" 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/geometric.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/geometric.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/func_geometric.hpp" 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtc/functions.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_functions 2 | /// @file glm/gtc/functions.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtc_quaternion (dependence) 6 | /// 7 | /// @defgroup gtc_functions GLM_GTC_functions 8 | /// @ingroup gtc 9 | /// 10 | /// @brief List of useful common functions. 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependencies 17 | #include "../detail/setup.hpp" 18 | #include "../detail/precision.hpp" 19 | #include "../detail/type_vec2.hpp" 20 | 21 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 22 | # pragma message("GLM: GLM_GTC_functions extension included") 23 | #endif 24 | 25 | namespace glm 26 | { 27 | /// @addtogroup gtc_functions 28 | /// @{ 29 | 30 | /// 1D gauss function 31 | /// 32 | /// @see gtc_epsilon 33 | template 34 | GLM_FUNC_DECL T gauss( 35 | T x, 36 | T ExpectedValue, 37 | T StandardDeviation); 38 | 39 | /// 2D gauss function 40 | /// 41 | /// @see gtc_epsilon 42 | template 43 | GLM_FUNC_DECL T gauss( 44 | vec<2, T, P> const& Coord, 45 | vec<2, T, P> const& ExpectedValue, 46 | vec<2, T, P> const& StandardDeviation); 47 | 48 | /// @} 49 | }//namespace glm 50 | 51 | #include "functions.inl" 52 | 53 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtc/functions.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_functions 2 | /// @file glm/gtc/functions.inl 3 | 4 | #include "../detail/func_exponential.hpp" 5 | 6 | namespace glm 7 | { 8 | template 9 | GLM_FUNC_QUALIFIER T gauss 10 | ( 11 | T x, 12 | T ExpectedValue, 13 | T StandardDeviation 14 | ) 15 | { 16 | return exp(-((x - ExpectedValue) * (x - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation)) / (StandardDeviation * sqrt(static_cast(6.28318530717958647692528676655900576))); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER T gauss 21 | ( 22 | vec<2, T, P> const& Coord, 23 | vec<2, T, P> const& ExpectedValue, 24 | vec<2, T, P> const& StandardDeviation 25 | ) 26 | { 27 | vec<2, T, P> const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation); 28 | return exp(-(Squared.x + Squared.y)); 29 | } 30 | }//namespace glm 31 | 32 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtc/matrix_access.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_matrix_access 2 | /// @file glm/gtc/matrix_access.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType row 8 | ( 9 | genType const & m, 10 | length_t index, 11 | typename genType::row_type const & x 12 | ) 13 | { 14 | assert(index >= 0 && index < m[0].length()); 15 | 16 | genType Result = m; 17 | for(length_t i = 0; i < m.length(); ++i) 18 | Result[i][index] = x[i]; 19 | return Result; 20 | } 21 | 22 | template 23 | GLM_FUNC_QUALIFIER typename genType::row_type row 24 | ( 25 | genType const & m, 26 | length_t index 27 | ) 28 | { 29 | assert(index >= 0 && index < m[0].length()); 30 | 31 | typename genType::row_type Result; 32 | for(length_t i = 0; i < m.length(); ++i) 33 | Result[i] = m[i][index]; 34 | return Result; 35 | } 36 | 37 | template 38 | GLM_FUNC_QUALIFIER genType column 39 | ( 40 | genType const & m, 41 | length_t index, 42 | typename genType::col_type const & x 43 | ) 44 | { 45 | assert(index >= 0 && index < m.length()); 46 | 47 | genType Result = m; 48 | Result[index] = x; 49 | return Result; 50 | } 51 | 52 | template 53 | GLM_FUNC_QUALIFIER typename genType::col_type column 54 | ( 55 | genType const & m, 56 | length_t index 57 | ) 58 | { 59 | assert(index >= 0 && index < m.length()); 60 | 61 | return m[index]; 62 | } 63 | }//namespace glm 64 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_swizzle 2 | /// @file glm/gtc/swizzle.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtc/vec1.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_vec1 2 | /// @file glm/gtc/vec1.inl 3 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/closest_point.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_closest_point 2 | /// @file glm/gtx/closest_point.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_closest_point GLM_GTX_closest_point 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Find the point on a straight line which is the closet of a point. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_closest_point is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_closest_point extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_closest_point 29 | /// @{ 30 | 31 | /// Find the point on a straight line which is the closet of a point. 32 | /// @see gtx_closest_point 33 | template 34 | GLM_FUNC_DECL vec<3, T, P> closestPointOnLine( 35 | vec<3, T, P> const & point, 36 | vec<3, T, P> const & a, 37 | vec<3, T, P> const & b); 38 | 39 | /// 2d lines work as well 40 | template 41 | GLM_FUNC_DECL vec<2, T, P> closestPointOnLine( 42 | vec<2, T, P> const & point, 43 | vec<2, T, P> const & a, 44 | vec<2, T, P> const & b); 45 | 46 | /// @} 47 | }// namespace glm 48 | 49 | #include "closest_point.inl" 50 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/closest_point.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_closest_point 2 | /// @file glm/gtx/closest_point.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER vec<3, T, P> closestPointOnLine 8 | ( 9 | vec<3, T, P> const & point, 10 | vec<3, T, P> const & a, 11 | vec<3, T, P> const & b 12 | ) 13 | { 14 | T LineLength = distance(a, b); 15 | vec<3, T, P> Vector = point - a; 16 | vec<3, T, P> LineDirection = (b - a) / LineLength; 17 | 18 | // Project Vector to LineDirection to get the distance of point from a 19 | T Distance = dot(Vector, LineDirection); 20 | 21 | if(Distance <= T(0)) return a; 22 | if(Distance >= LineLength) return b; 23 | return a + LineDirection * Distance; 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER vec<2, T, P> closestPointOnLine 28 | ( 29 | vec<2, T, P> const & point, 30 | vec<2, T, P> const & a, 31 | vec<2, T, P> const & b 32 | ) 33 | { 34 | T LineLength = distance(a, b); 35 | vec<2, T, P> Vector = point - a; 36 | vec<2, T, P> LineDirection = (b - a) / LineLength; 37 | 38 | // Project Vector to LineDirection to get the distance of point from a 39 | T Distance = dot(Vector, LineDirection); 40 | 41 | if(Distance <= T(0)) return a; 42 | if(Distance >= LineLength) return b; 43 | return a + LineDirection * Distance; 44 | } 45 | 46 | }//namespace glm 47 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/extend.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | /// @file glm/gtx/extend.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_extend GLM_GTX_extend 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Extend a position from a source to a position at a defined length. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_extend extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_extend 29 | /// @{ 30 | 31 | /// Extends of Length the Origin position using the (Source - Origin) direction. 32 | /// @see gtx_extend 33 | template 34 | GLM_FUNC_DECL genType extend( 35 | genType const & Origin, 36 | genType const & Source, 37 | typename genType::value_type const Length); 38 | 39 | /// @} 40 | }//namespace glm 41 | 42 | #include "extend.inl" 43 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/extend.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | /// @file glm/gtx/extend.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType extend 8 | ( 9 | genType const & Origin, 10 | genType const & Source, 11 | genType const & Distance 12 | ) 13 | { 14 | return Origin + (Source - Origin) * Distance; 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER vec<2, T, P> extend 19 | ( 20 | vec<2, T, P> const & Origin, 21 | vec<2, T, P> const & Source, 22 | T const & Distance 23 | ) 24 | { 25 | return Origin + (Source - Origin) * Distance; 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER vec<3, T, P> extend 30 | ( 31 | vec<3, T, P> const & Origin, 32 | vec<3, T, P> const & Source, 33 | T const & Distance 34 | ) 35 | { 36 | return Origin + (Source - Origin) * Distance; 37 | } 38 | 39 | template 40 | GLM_FUNC_QUALIFIER vec<4, T, P> extend 41 | ( 42 | vec<4, T, P> const & Origin, 43 | vec<4, T, P> const & Source, 44 | T const & Distance 45 | ) 46 | { 47 | return Origin + (Source - Origin) * Distance; 48 | } 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/exterior_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_exterior_product 2 | /// @file glm/gtx/exterior_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_exterior_product (dependence) 6 | /// 7 | /// @defgroup gtx_exterior_product GLM_GTX_exterior_product 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Allow to perform bit operations on integer values 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependencies 17 | #include "../detail/setup.hpp" 18 | #include "../detail/precision.hpp" 19 | 20 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 21 | # pragma message("GLM: GLM_GTX_exterior_product extension included") 22 | #endif 23 | 24 | namespace glm 25 | { 26 | /// @addtogroup gtx_exterior_product 27 | /// @{ 28 | 29 | /// Returns the cross product of x and y. 30 | /// 31 | /// @tparam valType Floating-point scalar types. 32 | /// 33 | /// @see Exterior product 34 | template 35 | GLM_FUNC_DECL T cross(vec<2, T, P> const& v, vec<2, T, P> const& u); 36 | 37 | /// @} 38 | } //namespace glm 39 | 40 | #include "exterior_product.inl" 41 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/exterior_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_geometric.inl 3 | 4 | #include 5 | 6 | namespace glm { 7 | namespace detail 8 | { 9 | template 10 | struct compute_cross_vec2 11 | { 12 | GLM_FUNC_QUALIFIER static T call(vec<2, T, P> const& v, vec<2, T, P> const& u) 13 | { 14 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs"); 15 | 16 | return v.x * u.y - u.x * v.y; 17 | } 18 | }; 19 | }//namespace detail 20 | 21 | template 22 | GLM_FUNC_QUALIFIER T cross(vec<2, T, P> const & x, vec<2, T, P> const & y) 23 | { 24 | return detail::compute_cross_vec2::value>::call(x, y); 25 | } 26 | }//namespace glm 27 | 28 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/float_notmalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_float_normalize 2 | /// @file glm/gtx/float_normalize.inl 3 | 4 | #include 5 | 6 | namespace glm 7 | { 8 | template class vecType> 9 | GLM_FUNC_QUALIFIER vecType floatNormalize(vecType const & v) 10 | { 11 | return vecType(v) / static_cast(std::numeric_limits::max()); 12 | } 13 | 14 | }//namespace glm 15 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/gradient_paint.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_gradient_paint 2 | /// @file glm/gtx/gradient_paint.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER T radialGradient 8 | ( 9 | vec<2, T, P> const & Center, 10 | T const & Radius, 11 | vec<2, T, P> const & Focal, 12 | vec<2, T, P> const & Position 13 | ) 14 | { 15 | vec<2, T, P> F = Focal - Center; 16 | vec<2, T, P> D = Position - Focal; 17 | T Radius2 = pow2(Radius); 18 | T Fx2 = pow2(F.x); 19 | T Fy2 = pow2(F.y); 20 | 21 | T Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x)); 22 | T Denominator = Radius2 - (Fx2 + Fy2); 23 | return Numerator / Denominator; 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER T linearGradient 28 | ( 29 | vec<2, T, P> const & Point0, 30 | vec<2, T, P> const & Point1, 31 | vec<2, T, P> const & Position 32 | ) 33 | { 34 | vec<2, T, P> Dist = Point1 - Point0; 35 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); 36 | } 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_handed_coordinate_space 2 | /// @file glm/gtx/handed_coordinate_space.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER bool rightHanded 8 | ( 9 | vec<3, T, P> const & tangent, 10 | vec<3, T, P> const & binormal, 11 | vec<3, T, P> const & normal 12 | ) 13 | { 14 | return dot(cross(normal, tangent), binormal) > T(0); 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER bool leftHanded 19 | ( 20 | vec<3, T, P> const & tangent, 21 | vec<3, T, P> const & binormal, 22 | vec<3, T, P> const & normal 23 | ) 24 | { 25 | return dot(cross(normal, tangent), binormal) < T(0); 26 | } 27 | }//namespace glm 28 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/intersect.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/glm/gtx/intersect.hpp -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/log_base.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | /// @file glm/gtx/log_base.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_log_base GLM_GTX_log_base 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Logarithm for any base. base can be a vector or a scalar. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_log_base is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_log_base extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_log_base 29 | /// @{ 30 | 31 | /// Logarithm for any base. 32 | /// From GLM_GTX_log_base. 33 | template 34 | GLM_FUNC_DECL genType log( 35 | genType const & x, 36 | genType const & base); 37 | 38 | /// Logarithm for any base. 39 | /// From GLM_GTX_log_base. 40 | template class vecType> 41 | GLM_FUNC_DECL vecType sign( 42 | vecType const& x, 43 | vecType const& base); 44 | 45 | /// @} 46 | }//namespace glm 47 | 48 | #include "log_base.inl" 49 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | /// @file glm/gtx/log_base.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType log(genType const & x, genType const & base) 8 | { 9 | assert(x != genType(0)); 10 | return glm::log(x) / glm::log(base); 11 | } 12 | 13 | template class vecType> 14 | GLM_FUNC_QUALIFIER vecType log(vecType const & x, vecType const & base) 15 | { 16 | return glm::log(x) / glm::log(base); 17 | } 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/matrix_cross_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_cross_product 2 | /// @file glm/gtx/matrix_cross_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Build cross product matrices 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | 19 | #ifndef GLM_ENABLE_EXPERIMENTAL 20 | # error "GLM: GLM_GTX_matrix_cross_product is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 21 | #endif 22 | 23 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_matrix_cross_product extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_matrix_cross_product 30 | /// @{ 31 | 32 | //! Build a cross product matrix. 33 | //! From GLM_GTX_matrix_cross_product extension. 34 | template 35 | GLM_FUNC_DECL mat<3, 3, T, P> matrixCross3( 36 | vec<3, T, P> const & x); 37 | 38 | //! Build a cross product matrix. 39 | //! From GLM_GTX_matrix_cross_product extension. 40 | template 41 | GLM_FUNC_DECL mat<4, 4, T, P> matrixCross4( 42 | vec<3, T, P> const & x); 43 | 44 | /// @} 45 | }//namespace glm 46 | 47 | #include "matrix_cross_product.inl" 48 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/matrix_cross_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_cross_product 2 | /// @file glm/gtx/matrix_cross_product.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER mat<3, 3, T, P> matrixCross3 8 | ( 9 | vec<3, T, P> const & x 10 | ) 11 | { 12 | mat<3, 3, T, P> Result(T(0)); 13 | Result[0][1] = x.z; 14 | Result[1][0] = -x.z; 15 | Result[0][2] = -x.y; 16 | Result[2][0] = x.y; 17 | Result[1][2] = x.x; 18 | Result[2][1] = -x.x; 19 | return Result; 20 | } 21 | 22 | template 23 | GLM_FUNC_QUALIFIER mat<4, 4, T, P> matrixCross4 24 | ( 25 | vec<3, T, P> const & x 26 | ) 27 | { 28 | mat<4, 4, T, P> Result(T(0)); 29 | Result[0][1] = x.z; 30 | Result[1][0] = -x.z; 31 | Result[0][2] = -x.y; 32 | Result[2][0] = x.y; 33 | Result[1][2] = x.x; 34 | Result[2][1] = -x.x; 35 | return Result; 36 | } 37 | 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/matrix_factorisation.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/glm/gtx/matrix_factorisation.inl -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/mixed_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | /// @file glm/gtx/mixed_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_mixed_product GLM_GTX_mixed_producte 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Mixed product of 3 vectors. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_mixed_product is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_mixed_product extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_mixed_product 29 | /// @{ 30 | 31 | /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) 32 | template 33 | GLM_FUNC_DECL T mixedProduct( 34 | vec<3, T, P> const & v1, 35 | vec<3, T, P> const & v2, 36 | vec<3, T, P> const & v3); 37 | 38 | /// @} 39 | }// namespace glm 40 | 41 | #include "mixed_product.inl" 42 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | /// @file glm/gtx/mixed_product.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER T mixedProduct 8 | ( 9 | vec<3, T, P> const & v1, 10 | vec<3, T, P> const & v2, 11 | vec<3, T, P> const & v3 12 | ) 13 | { 14 | return dot(cross(v1, v2), v3); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/normal.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | /// @file glm/gtx/normal.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_normal GLM_GTX_normal 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Compute the normal of a triangle. 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | 19 | #ifndef GLM_ENABLE_EXPERIMENTAL 20 | # error "GLM: GLM_GTX_normal is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 21 | #endif 22 | 23 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_normal extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_normal 30 | /// @{ 31 | 32 | //! Computes triangle normal from triangle points. 33 | //! From GLM_GTX_normal extension. 34 | template 35 | GLM_FUNC_DECL vec<3, T, P> triangleNormal( 36 | vec<3, T, P> const & p1, 37 | vec<3, T, P> const & p2, 38 | vec<3, T, P> const & p3); 39 | 40 | /// @} 41 | }//namespace glm 42 | 43 | #include "normal.inl" 44 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | /// @file glm/gtx/normal.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER vec<3, T, P> triangleNormal 8 | ( 9 | vec<3, T, P> const & p1, 10 | vec<3, T, P> const & p2, 11 | vec<3, T, P> const & p3 12 | ) 13 | { 14 | return normalize(cross(p1 - p2, p1 - p3)); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | /// @file glm/gtx/normalize_dot.inl 3 | 4 | namespace glm 5 | { 6 | template class vecType> 7 | GLM_FUNC_QUALIFIER T normalizeDot(vecType const & x, vecType const & y) 8 | { 9 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 10 | } 11 | 12 | template class vecType> 13 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vecType const & x, vecType const & y) 14 | { 15 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 16 | } 17 | }//namespace glm 18 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_number_precision 2 | /// @file glm/gtx/number_precision.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/optimum_pow.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | /// @file glm/gtx/optimum_pow.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Integer exponentiation of power functions. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_optimum_pow is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_optimum_pow extension included") 24 | #endif 25 | 26 | namespace glm{ 27 | namespace gtx 28 | { 29 | /// @addtogroup gtx_optimum_pow 30 | /// @{ 31 | 32 | /// Returns x raised to the power of 2. 33 | /// 34 | /// @see gtx_optimum_pow 35 | template 36 | GLM_FUNC_DECL genType pow2(genType const & x); 37 | 38 | /// Returns x raised to the power of 3. 39 | /// 40 | /// @see gtx_optimum_pow 41 | template 42 | GLM_FUNC_DECL genType pow3(genType const & x); 43 | 44 | /// Returns x raised to the power of 4. 45 | /// 46 | /// @see gtx_optimum_pow 47 | template 48 | GLM_FUNC_DECL genType pow4(genType const & x); 49 | 50 | /// @} 51 | }//namespace gtx 52 | }//namespace glm 53 | 54 | #include "optimum_pow.inl" 55 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | /// @file glm/gtx/optimum_pow.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType pow2(genType const & x) 8 | { 9 | return x * x; 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER genType pow3(genType const & x) 14 | { 15 | return x * x * x; 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER genType pow4(genType const & x) 20 | { 21 | return (x * x) * (x * x); 22 | } 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/orthonormalize.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | /// @file glm/gtx/orthonormalize.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Orthonormalize matrices. 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../vec3.hpp" 18 | #include "../mat3x3.hpp" 19 | #include "../geometric.hpp" 20 | 21 | #ifndef GLM_ENABLE_EXPERIMENTAL 22 | # error "GLM: GLM_GTX_orthonormalize is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 23 | #endif 24 | 25 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 26 | # pragma message("GLM: GLM_GTX_orthonormalize extension included") 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup gtx_orthonormalize 32 | /// @{ 33 | 34 | /// Returns the orthonormalized matrix of m. 35 | /// 36 | /// @see gtx_orthonormalize 37 | template 38 | GLM_FUNC_DECL mat<3, 3, T, P> orthonormalize(mat<3, 3, T, P> const & m); 39 | 40 | /// Orthonormalizes x according y. 41 | /// 42 | /// @see gtx_orthonormalize 43 | template 44 | GLM_FUNC_DECL vec<3, T, P> orthonormalize(vec<3, T, P> const & x, vec<3, T, P> const & y); 45 | 46 | /// @} 47 | }//namespace glm 48 | 49 | #include "orthonormalize.inl" 50 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | /// @file glm/gtx/orthonormalize.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER mat<3, 3, T, P> orthonormalize(mat<3, 3, T, P> const & m) 8 | { 9 | mat<3, 3, T, P> r = m; 10 | 11 | r[0] = normalize(r[0]); 12 | 13 | T d0 = dot(r[0], r[1]); 14 | r[1] -= r[0] * d0; 15 | r[1] = normalize(r[1]); 16 | 17 | T d1 = dot(r[1], r[2]); 18 | d0 = dot(r[0], r[2]); 19 | r[2] -= r[0] * d0 + r[1] * d1; 20 | r[2] = normalize(r[2]); 21 | 22 | return r; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER vec<3, T, P> orthonormalize(vec<3, T, P> const & x, vec<3, T, P> const & y) 27 | { 28 | return normalize(x - y * dot(y, x)); 29 | } 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/perpendicular.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | /// @file glm/gtx/perpendicular.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_projection (dependence) 6 | /// 7 | /// @defgroup gtx_perpendicular GLM_GTX_perpendicular 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Perpendicular of a vector from other one 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | #include "../gtx/projection.hpp" 19 | 20 | #ifndef GLM_ENABLE_EXPERIMENTAL 21 | # error "GLM: GLM_GTX_perpendicular is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 22 | #endif 23 | 24 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 25 | # pragma message("GLM: GLM_GTX_perpendicular extension included") 26 | #endif 27 | 28 | namespace glm 29 | { 30 | /// @addtogroup gtx_perpendicular 31 | /// @{ 32 | 33 | //! Projects x a perpendicular axis of Normal. 34 | //! From GLM_GTX_perpendicular extension. 35 | template 36 | GLM_FUNC_DECL vecType perp( 37 | vecType const & x, 38 | vecType const & Normal); 39 | 40 | /// @} 41 | }//namespace glm 42 | 43 | #include "perpendicular.inl" 44 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | /// @file glm/gtx/perpendicular.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER vecType perp 8 | ( 9 | vecType const & x, 10 | vecType const & Normal 11 | ) 12 | { 13 | return x - proj(x, Normal); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/polar_coordinates.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | /// @file glm/gtx/polar_coordinates.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Conversion from Euclidean space to polar space and revert. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_polar_coordinates is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_polar_coordinates extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_polar_coordinates 29 | /// @{ 30 | 31 | /// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. 32 | /// 33 | /// @see gtx_polar_coordinates 34 | template 35 | GLM_FUNC_DECL vec<3, T, P> polar( 36 | vec<3, T, P> const & euclidean); 37 | 38 | /// Convert Polar to Euclidean coordinates. 39 | /// 40 | /// @see gtx_polar_coordinates 41 | template 42 | GLM_FUNC_DECL vec<3, T, P> euclidean( 43 | vec<2, T, P> const & polar); 44 | 45 | /// @} 46 | }//namespace glm 47 | 48 | #include "polar_coordinates.inl" 49 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/polar_coordinates.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | /// @file glm/gtx/polar_coordinates.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER vec<3, T, P> polar 8 | ( 9 | vec<3, T, P> const & euclidean 10 | ) 11 | { 12 | T const Length(length(euclidean)); 13 | vec<3, T, P> const tmp(euclidean / Length); 14 | T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); 15 | 16 | return vec<3, T, P>( 17 | asin(tmp.y), // latitude 18 | atan(tmp.x, tmp.z), // longitude 19 | xz_dist); // xz distance 20 | } 21 | 22 | template 23 | GLM_FUNC_QUALIFIER vec<3, T, P> euclidean 24 | ( 25 | vec<2, T, P> const & polar 26 | ) 27 | { 28 | T const latitude(polar.x); 29 | T const longitude(polar.y); 30 | 31 | return vec<3, T, P>( 32 | cos(latitude) * sin(longitude), 33 | sin(latitude), 34 | cos(latitude) * cos(longitude)); 35 | } 36 | 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/projection.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | /// @file glm/gtx/projection.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_projection GLM_GTX_projection 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Projection of a vector to other one 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../geometric.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_projection is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_projection extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_projection 29 | /// @{ 30 | 31 | /// Projects x on Normal. 32 | /// 33 | /// @see gtx_projection 34 | template 35 | GLM_FUNC_DECL vecType proj(vecType const & x, vecType const & Normal); 36 | 37 | /// @} 38 | }//namespace glm 39 | 40 | #include "projection.inl" 41 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | /// @file glm/gtx/projection.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER vecType proj(vecType const & x, vecType const & Normal) 8 | { 9 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 10 | } 11 | }//namespace glm 12 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/raw_data.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | /// @file glm/gtx/raw_data.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_raw_data GLM_GTX_raw_data 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Projection of a vector to other one 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../detail/setup.hpp" 17 | #include "../detail/type_int.hpp" 18 | 19 | #ifndef GLM_ENABLE_EXPERIMENTAL 20 | # error "GLM: GLM_GTX_raw_data is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 21 | #endif 22 | 23 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_raw_data extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_raw_data 30 | /// @{ 31 | 32 | //! Type for byte numbers. 33 | //! From GLM_GTX_raw_data extension. 34 | typedef detail::uint8 byte; 35 | 36 | //! Type for word numbers. 37 | //! From GLM_GTX_raw_data extension. 38 | typedef detail::uint16 word; 39 | 40 | //! Type for dword numbers. 41 | //! From GLM_GTX_raw_data extension. 42 | typedef detail::uint32 dword; 43 | 44 | //! Type for qword numbers. 45 | //! From GLM_GTX_raw_data extension. 46 | typedef detail::uint64 qword; 47 | 48 | /// @} 49 | }// namespace glm 50 | 51 | #include "raw_data.inl" 52 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | /// @file glm/gtx/raw_data.inl 3 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/scalar_relational.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_scalar_relational 2 | /// @file glm/gtx/scalar_relational.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_scalar_relational GLM_GTX_scalar_relational 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Extend a position from a source to a position at a defined length. 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_extend extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_scalar_relational 29 | /// @{ 30 | 31 | 32 | 33 | /// @} 34 | }//namespace glm 35 | 36 | #include "scalar_relational.inl" 37 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/scalar_relational.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_scalar_relational 2 | /// @file glm/gtx/scalar_relational.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER bool lessThan 8 | ( 9 | T const & x, 10 | T const & y 11 | ) 12 | { 13 | return x < y; 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER bool lessThanEqual 18 | ( 19 | T const & x, 20 | T const & y 21 | ) 22 | { 23 | return x <= y; 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER bool greaterThan 28 | ( 29 | T const & x, 30 | T const & y 31 | ) 32 | { 33 | return x > y; 34 | } 35 | 36 | template 37 | GLM_FUNC_QUALIFIER bool greaterThanEqual 38 | ( 39 | T const & x, 40 | T const & y 41 | ) 42 | { 43 | return x >= y; 44 | } 45 | 46 | template 47 | GLM_FUNC_QUALIFIER bool equal 48 | ( 49 | T const & x, 50 | T const & y 51 | ) 52 | { 53 | return x == y; 54 | } 55 | 56 | template 57 | GLM_FUNC_QUALIFIER bool notEqual 58 | ( 59 | T const & x, 60 | T const & y 61 | ) 62 | { 63 | return x != y; 64 | } 65 | 66 | GLM_FUNC_QUALIFIER bool any 67 | ( 68 | bool const & x 69 | ) 70 | { 71 | return x; 72 | } 73 | 74 | GLM_FUNC_QUALIFIER bool all 75 | ( 76 | bool const & x 77 | ) 78 | { 79 | return x; 80 | } 81 | 82 | GLM_FUNC_QUALIFIER bool not_ 83 | ( 84 | bool const & x 85 | ) 86 | { 87 | return !x; 88 | } 89 | }//namespace glm 90 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_std_based_type 2 | /// @file glm/gtx/std_based_type.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_transform 2 | /// @file glm/gtx/transform.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER mat<4, 4, T, P> translate(vec<3, T, P> const & v) 8 | { 9 | return translate(mat<4, 4, T, P>(static_cast(1)), v); 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER mat<4, 4, T, P> rotate(T angle, vec<3, T, P> const & v) 14 | { 15 | return rotate(mat<4, 4, T, P>(static_cast(1)), angle, v); 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER mat<4, 4, T, P> scale(vec<3, T, P> const & v) 20 | { 21 | return scale(mat<4, 4, T, P>(static_cast(1)), v); 22 | } 23 | 24 | }//namespace glm 25 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/type_aligned.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_type_aligned 2 | /// @file glm/gtc/type_aligned.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/gtx/type_trait.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/glm/gtx/type_trait.inl -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/integer.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/integer.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/func_integer.hpp" 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/matrix.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/matrix.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/func_matrix.hpp" 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/packing.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/packing.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/func_packing.hpp" 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/simd/exponential.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/experimental.h 3 | 4 | #pragma once 5 | 6 | #include "platform.h" 7 | 8 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | GLM_FUNC_QUALIFIER glm_vec4 glm_vec1_sqrt_lowp(glm_vec4 x) 11 | { 12 | return _mm_mul_ss(_mm_rsqrt_ss(x), x); 13 | } 14 | 15 | GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_sqrt_lowp(glm_vec4 x) 16 | { 17 | return _mm_mul_ps(_mm_rsqrt_ps(x), x); 18 | } 19 | 20 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 21 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/simd/packing.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/packing.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/simd/trigonometric.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/trigonometric.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/simd/vector_relational.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/vector_relational.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/trigonometric.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/trigonometric.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/func_trigonometric.hpp" 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec2.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/type_vec2.hpp" 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec3.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/type_vec3.hpp" 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec4.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/type_vec4.hpp" 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/glm/vector_relational.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vector_relational.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/func_vector_relational.hpp" 9 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/imgui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2018 Omar Cornut 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /samples/WindowsVulkan/libs/assimp/assimp-vc140-mt.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/libs/assimp/assimp-vc140-mt.lib -------------------------------------------------------------------------------- /samples/WindowsVulkan/libs/assimp/assimp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/samples/WindowsVulkan/libs/assimp/assimp.lib -------------------------------------------------------------------------------- /tools/GenerateProjects.bat: -------------------------------------------------------------------------------- 1 | pushd 2 | cd .. 3 | tools\windows\premake5.exe vs2017 4 | tools\windows\premake5.exe vs2019 5 | popd 6 | PAUSE -------------------------------------------------------------------------------- /tools/GenerateProjects_all.bat: -------------------------------------------------------------------------------- 1 | cd .. 2 | tools\windows\premake5.exe --DX12 --Vulkan --Fibers vs2017 3 | tools\windows\premake5.exe --DX12 --Vulkan --Fibers vs2019 4 | PAUSE -------------------------------------------------------------------------------- /tools/GenerateProjects_cmake.bat: -------------------------------------------------------------------------------- 1 | cd .. 2 | cmake -H"." -B"build\cmake" -G "Visual Studio 15 2017 Win64" -DBUILD_VULKAN=1 -DBUILD_D3D12=1 3 | PAUSE -------------------------------------------------------------------------------- /tools/GenerateProjects_gpu.bat: -------------------------------------------------------------------------------- 1 | cd .. 2 | tools\windows\premake5.exe --DX12 --Vulkan vs2017 3 | tools\windows\premake5.exe --DX12 --Vulkan vs2019 4 | PAUSE -------------------------------------------------------------------------------- /tools/Linux/premake5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/tools/Linux/premake5 -------------------------------------------------------------------------------- /tools/MacOS/premake5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/tools/MacOS/premake5 -------------------------------------------------------------------------------- /tools/OptickConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | # Required so that on windows Release and RelWithDebInfo can be used instead of default fallback which is Debug 4 | # See https://gitlab.kitware.com/cmake/cmake/-/issues/20319 5 | set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL MinSizeRel RelWithDebInfo Release Debug) 6 | set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo Release MinSizeRel Debug) 7 | set(CMAKE_MAP_IMPORTED_CONFIG_RELEASE Release RelWithDebInfo MinSizeRel Debug) 8 | 9 | include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") 10 | -------------------------------------------------------------------------------- /tools/Publish.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | call Publish_Main.bat 4 | call Publish_UnrealEngine.bat 5.0 5 | -------------------------------------------------------------------------------- /tools/RemoveXML.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/tools/RemoveXML.exe -------------------------------------------------------------------------------- /tools/Step1_PrepareVersion.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | call PrepareVersionExt.cmd 4 | 5 | xcopy /Y .\Bin\Release\x64\*.* .\Publish\ 6 | 7 | xcopy /Y .\BrofilerCore\Brofiler.h .\Publish\Include\ 8 | 9 | xcopy /Y .\Bin\vs2010\x32\Debug\brofilercore.* .\Publish\Lib\vs2010\x86\debug\ 10 | xcopy /Y .\Bin\vs2010\x32\Release\brofilercore.* .\Publish\Lib\vs2010\x86\release\ 11 | xcopy /Y .\Bin\vs2010\x64\Debug\brofilercore.* .\Publish\Lib\vs2010\x64\debug\ 12 | xcopy /Y .\Bin\vs2010\x64\Release\brofilercore.* .\Publish\Lib\vs2010\x64\release\ 13 | 14 | xcopy /Y .\Bin\vs2012\Native\Debug\libBrofilerCore.* .\Publish\Lib\vs2012\orbis\debug\ 15 | xcopy /Y .\Bin\vs2012\Native\Release\libBrofilerCore.* .\Publish\Lib\vs2012\orbis\release\ 16 | xcopy /Y .\Bin\vs2012\x32\Debug\brofilercore.* .\Publish\Lib\vs2012\x86\debug\ 17 | xcopy /Y .\Bin\vs2012\x32\Release\brofilercore.* .\Publish\Lib\vs2012\x86\release\ 18 | xcopy /Y .\Bin\vs2012\x64\Debug\brofilercore.* .\Publish\Lib\vs2012\x64\debug\ 19 | xcopy /Y .\Bin\vs2012\x64\Release\brofilercore.* .\Publish\Lib\vs2012\x64\release\ 20 | 21 | xcopy /Y .\Bin\vs2015\Native\Debug\libBrofilerCore.* .\Publish\Lib\vs2015\orbis\debug\ 22 | xcopy /Y .\Bin\vs2015\Native\Release\libBrofilerCore.* .\Publish\Lib\vs2015\orbis\release\ 23 | xcopy /Y .\Bin\vs2015\x32\Debug\brofilercore.* .\Publish\Lib\vs2015\x86\debug\ 24 | xcopy /Y .\Bin\vs2015\x32\Release\brofilercore.* .\Publish\Lib\vs2015\x86\release\ 25 | xcopy /Y .\Bin\vs2015\x64\Debug\brofilercore.* .\Publish\Lib\vs2015\x64\debug\ 26 | xcopy /Y .\Bin\vs2015\x64\Release\brofilercore.* .\Publish\Lib\vs2015\x64\release\ 27 | 28 | 29 | -------------------------------------------------------------------------------- /tools/StripNdaCode.cmd: -------------------------------------------------------------------------------- 1 | rd /Q /S "./Bin" 2 | rd /Q /S "./ThirdParty/DevkitsInterop" 3 | rd /Q /S "./ThirdParty/TaskScheduler/Scheduler/Include/Platform/Orbis" 4 | rd /Q /S "./BrofilerCore/Platform/PS4" 5 | 6 | rd /Q /S "./Build" 7 | sunifdef.exe --replace --recurse --filter cs --discard drop --undef NDA_CODE_SECTION ./Brofiler 8 | sunifdef.exe --replace --recurse --filter cpp,h,inl --discard drop --undef MT_PLATFORM_DURANGO --undef MT_PLATFORM_ORBIS --undef _XBOX_ONE --undef __ORBIS__ ./ThirdParty/TaskScheduler 9 | sunifdef.exe --replace --recurse --filter cpp,h,inl --discard drop --undef MT_PLATFORM_DURANGO --undef MT_PLATFORM_ORBIS --undef _XBOX_ONE --undef __ORBIS__ ./BrofilerCore 10 | sunifdef.exe --replace --recurse --filter cpp,h,inl --discard drop --undef MT_PLATFORM_DURANGO --undef MT_PLATFORM_ORBIS --undef _XBOX_ONE --undef __ORBIS__ ./BrofilerTest 11 | sunifdef.exe --replace --recurse --filter cpp,h,inl --discard drop --undef MT_PLATFORM_DURANGO --undef MT_PLATFORM_ORBIS --undef _XBOX_ONE --undef __ORBIS__ ./BrofilerWindowsTest 12 | 13 | RemoveXML.exe ./Brofiler/Brofiler.csproj 14 | 15 | del Step2_Publish.cmd 16 | del PrepareVersionExt.cmd 17 | 18 | pushd 19 | cd "./Publish/Include/" 20 | del /F OrbisDbgHelp.h 21 | popd 22 | 23 | -------------------------------------------------------------------------------- /tools/Windows/premake5.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/tools/Windows/premake5.exe -------------------------------------------------------------------------------- /tools/sunifdef.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bombomby/optick/8abd28dee1a4034c973a3d32cd1777118e72df7e/tools/sunifdef.exe --------------------------------------------------------------------------------