Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vsg] New port (VulkanSceneGraph) #31300

Merged
merged 5 commits into from
May 9, 2023
Merged

[vsg] New port (VulkanSceneGraph) #31300

merged 5 commits into from
May 9, 2023

Conversation

cbrl
Copy link
Contributor

@cbrl cbrl commented May 7, 2023

  • Changes comply with the maintainer guide
  • The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines.
  • Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all find_package calls are REQUIRED, are satisfied by vcpkg.json's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx
  • The versioning scheme in vcpkg.json matches what upstream says.
  • The license declaration in vcpkg.json matches what upstream says.
  • The installed as the "copyright" file matches what upstream says.
  • The source code of the component installed comes from an authoritative source.
  • The generated "usage text" is accurate. See adding-usage for context.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is in the new port's versions file.
  • Only one version is added to each modified port's versions file.

@cbrl
Copy link
Contributor Author

cbrl commented May 7, 2023

The pipeline isn't particularly useful since it skips the vulkan dependency. I have tested that the port compiles with the following triplets using VS 2022 for Windows and GCC 11 and GCC 13 for Linux:

  • x64-windows
  • x64-windows-static
  • x64-windows-static-md
  • x64-linux
  • x64-linux-dynamic

I do not have the ability to test this on ARM or macOS, however.

@FrankXie05 FrankXie05 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label May 8, 2023
@FrankXie05
Copy link
Contributor

Related issue: #28529

@FrankXie05
Copy link
Contributor

The usage has been tested successfully locally.

vsg provides CMake targets:

    # this is heuristically generated, and may not be correct
   find_package(vsg CONFIG REQUIRED)
   target_link_libraries(main PRIVATE vsg::vsg)

FrankXie05
FrankXie05 previously approved these changes May 8, 2023
@FrankXie05 FrankXie05 added the info:reviewed Pull Request changes follow basic guidelines label May 8, 2023
ports/vsg/portfile.cmake Outdated Show resolved Hide resolved

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE #parallel build interferes with cloning glslang in vsg's CMake script
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stumbled over this comment and checked upstream.
https://github.com/vsg-dev/VulkanSceneGraph/blob/f02eba66c8f37e689912363ebd7b9bb79453a8fd/CMakeLists.txt#L40-L63

I think this needs work if you don't want to turn off VSG_SUPPORTS_ShaderCompiler.

  • git clone depends on availability of the git tool and bypasses asset caching.
  • The clone repo is another fork of what vcpkg offers with port glslang.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's a bit of a problematic aspect of the project. It would be preferable not to disable the shader compiler, but the project vendors its own fork of glslang that might be troublesome to untangle. I will attempt to make it use the vcpkg-provided dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it was relatively simple. There were only a few minor changes needed to get vsg to compile with the version of glslang provided by vcpkg. I don't observe any compile issues with the latest commit on any of the triplets I mentioned previously.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VulkanSceneGraph project lead here, as a heads up we are experimenting with moving the glslang dependency out from being a insource build to a standard 3rd party dependency. There's a whole tangled web of issue with linking to glslang previously forcing us to resort to the insource build, but slowly it looks like it's distribution is become more standardized so fingers crossed we'll be able to make glslang an external dependency.

I've written up this work on the VSG discussion forum: vsg-dev/VulkanSceneGraph#1199

The work can be found in the external_glslang branch: https://github.com/vsg-dev/VulkanSceneGraph/tree/external_glslang

Once we've seen a bit more cross platform testing I'll merged the external_glslang branch with VSG master and tag a developer release 1.1.5, then eventually we'll get to a 1.2.0 stable release in the next couple of months.

@vicroms vicroms merged commit d595260 into microsoft:master May 9, 2023
@cbrl cbrl deleted the vsg branch May 20, 2023 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants