From 8e111ccb4ef4d2582d68432a5da4faa3388f938f Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Sun, 14 Aug 2022 19:53:31 -0300 Subject: [PATCH 1/7] Add necessary code to get Qt 5.15 + Vulkan working Signed-off-by: Matias N. Goldberg --- ...RenderEngineVulkanExternalDeviceStructs.hh | 61 +++++++++ ogre2/src/Ogre2RenderEngine.cc | 116 +++++++++++++++++- 2 files changed, 174 insertions(+), 3 deletions(-) create mode 100644 include/gz/rendering/RenderEngineVulkanExternalDeviceStructs.hh diff --git a/include/gz/rendering/RenderEngineVulkanExternalDeviceStructs.hh b/include/gz/rendering/RenderEngineVulkanExternalDeviceStructs.hh new file mode 100644 index 000000000..070b5a6ac --- /dev/null +++ b/include/gz/rendering/RenderEngineVulkanExternalDeviceStructs.hh @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2022 Open Source Robotics Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +#ifndef GZ_RENDERING_RENDERENGINE_VULKANEXTERNALDEVICESTRUCTS_HH_ +#define GZ_RENDERING_RENDERENGINE_VULKANEXTERNALDEVICESTRUCTS_HH_ + +#ifndef __APPLE__ + +# include +# include "gz/rendering/Export.hh" +# include "gz/rendering/config.hh" + +# include "vulkan/vulkan_core.h" + +namespace gz +{ + namespace rendering + { + inline namespace GZ_RENDERING_VERSION_NAMESPACE { + /// \brief Structure to encapsulate data needed by OgreNext to init Vulkan + /// from Qt. + /// Mirrors Ogre::VulkanExternalInstance without depending on OgreNext + /// directly. + struct GZ_RENDERING_VISIBLE GzVulkanExternalInstance + { + VkInstance instance; + std::vector instanceLayers; + std::vector instanceExtensions; + }; + + /// \brief Structure to encapsulate data needed by OgreNext to init Vulkan + /// from Qt. + /// Mirrors Ogre::VulkanExternalDevice without depending on OgreNext + /// directly. + struct GZ_RENDERING_VISIBLE GzVulkanExternalDevice + { + VkPhysicalDevice physicalDevice; + VkDevice device; + std::vector deviceExtensions; + VkQueue graphicsQueue; + VkQueue presentQueue; + }; + } + } +} + +#endif +#endif diff --git a/ogre2/src/Ogre2RenderEngine.cc b/ogre2/src/Ogre2RenderEngine.cc index da0f33478..da3ee83d0 100644 --- a/ogre2/src/Ogre2RenderEngine.cc +++ b/ogre2/src/Ogre2RenderEngine.cc @@ -38,10 +38,23 @@ #include "Ogre2GzHlmsTerraPrivate.hh" #include "Ogre2GzHlmsUnlitPrivate.hh" +#ifdef OGRE_BUILD_RENDERSYSTEM_VULKAN +// Deal with old vulkan headers causing build errors +# ifndef VK_NV_device_generated_commands +# define VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV 0x00020000 +# endif +# ifndef VK_NV_ray_tracing +# define VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR 0x00200000 +# endif +// Needed headers to receive an external Vulkan device from Qt +// and inject it into OgreNext +# include "OGRE/RenderSystems/Vulkan/OgreVulkanDevice.h" +# include "gz/rendering/RenderEngineVulkanExternalDeviceStructs.hh" +#endif +#include "Ogre2GzHlmsSphericalClipMinDistance.hh" #include "Terra/Hlms/OgreHlmsTerra.h" #include "Terra/Hlms/PbsListener/OgreHlmsPbsTerraShadows.h" #include "Terra/TerraWorkspaceListener.h" -#include "Ogre2GzHlmsSphericalClipMinDistance.hh" #if HAVE_GLX # include @@ -82,6 +95,24 @@ class GZ_RENDERING_OGRE2_HIDDEN /// \brief Custom Terra modifications public: Ogre::Ogre2GzHlmsTerra *gzHlmsTerra{nullptr}; + +#ifdef OGRE_BUILD_RENDERSYSTEM_VULKAN + /// \brief Needed to receive an external Vulkan device from Qt + /// and inject it into OgreNext. + /// + /// TODO(anyone): This struct doesn't need to live forever. + /// It only needs to live until Root::loadPlugin( "RenderSystem_Vulkan" ) + /// is called. + public: Ogre::VulkanExternalInstance vkExternalInstance{}; + + /// \brief Needed to receive an external Vulkan device from Qt + /// and inject it into OgreNext. + /// + /// TODO(anyone): This struct doesn't need to live forever. + /// It only needs to live until the first Root::createRenderWindow + /// is called. + public: Ogre::VulkanExternalDevice vkExternalDevice{}; +#endif }; using namespace gz; @@ -336,13 +367,63 @@ bool Ogre2RenderEngine::LoadImpl( this->dataPtr->graphicsAPI = GraphicsAPI::METAL; } +#ifdef OGRE_BUILD_RENDERSYSTEM_VULKAN + this->dataPtr->vkExternalInstance.instance = nullptr; + this->dataPtr->vkExternalDevice.physicalDevice = nullptr; + this->dataPtr->vkExternalDevice.device = nullptr; + this->dataPtr->vkExternalDevice.graphicsQueue = nullptr; + this->dataPtr->vkExternalDevice.presentQueue = nullptr; +#endif + it = _params.find("vulkan"); if (it != _params.end()) { bool useVulkan; std::istringstream(it->second) >> useVulkan; if(useVulkan) - this->dataPtr->graphicsAPI = GraphicsAPI::VULKAN; + { + this->dataPtr->graphicsAPI = GraphicsAPI::VULKAN; + +#ifdef OGRE_BUILD_RENDERSYSTEM_VULKAN + it = _params.find("external_instance"); + if (it != _params.end()) + { + auto *gzExternalInstance = + reinterpret_cast( + Ogre::StringConverter::parseUnsignedLong(it->second)); + + this->dataPtr->vkExternalInstance.instance = + gzExternalInstance->instance; + // This works as long as std::vector memory is actually contiguous + this->dataPtr->vkExternalInstance.instanceLayers.appendPOD( + &*gzExternalInstance->instanceLayers.begin(), + &*gzExternalInstance->instanceLayers.end()); + this->dataPtr->vkExternalInstance.instanceExtensions.appendPOD( + &*gzExternalInstance->instanceExtensions.begin(), + &*gzExternalInstance->instanceExtensions.end()); + } + + it = _params.find("external_device"); + if (it != _params.end()) + { + auto *gzExternalDevice = + reinterpret_cast( + Ogre::StringConverter::parseUnsignedLong(it->second)); + + this->dataPtr->vkExternalDevice.physicalDevice = + gzExternalDevice->physicalDevice; + this->dataPtr->vkExternalDevice.device = gzExternalDevice->device; + this->dataPtr->vkExternalDevice.graphicsQueue = + gzExternalDevice->graphicsQueue; + this->dataPtr->vkExternalDevice.presentQueue = + gzExternalDevice->presentQueue; + // This works as long as std::vector memory is actually contiguous + this->dataPtr->vkExternalDevice.deviceExtensions.appendPOD( + &*gzExternalDevice->deviceExtensions.begin(), + &*gzExternalDevice->deviceExtensions.end()); + } +#endif + } } try @@ -415,6 +496,12 @@ void Ogre2RenderEngine::CreateLogger() ////////////////////////////////////////////////// void Ogre2RenderEngine::CreateContext() { +#ifdef OGRE_BUILD_RENDERSYSTEM_VULKAN + if (this->dataPtr->vkExternalInstance.instance) + { + return; + } +#endif #if !defined(__APPLE__) && !defined(_WIN32) if (this->Headless()) { @@ -568,6 +655,8 @@ void Ogre2RenderEngine::LoadPlugins() plugins.push_back({ p, false }); } + Ogre::NameValuePairList pluginParams; + for (std::vector::iterator piter = plugins.begin(); piter != plugins.end(); ++piter) { @@ -591,8 +680,18 @@ void Ogre2RenderEngine::LoadPlugins() // load the plugin try { + pluginParams.clear(); + +#ifdef OGRE_BUILD_RENDERSYSTEM_VULKAN + if (this->dataPtr->vkExternalInstance.instance && + filename.find("RenderSystem_Vulkan") != std::string::npos) + { + pluginParams["external_instance"] = std::to_string( + reinterpret_cast(&this->dataPtr->vkExternalInstance)); + } +#endif // Load the plugin into OGRE - this->ogreRoot->loadPlugin(filename, piter->bOptional, nullptr); + this->ogreRoot->loadPlugin(filename, piter->bOptional, &pluginParams); } catch(Ogre::Exception &) { @@ -1073,6 +1172,17 @@ std::string Ogre2RenderEngine::CreateRenderWindow(const std::string &_handle, // Ogre 2 PBS expects gamma correction params["gamma"] = "Yes"; +#ifdef OGRE_BUILD_RENDERSYSTEM_VULKAN + if (this->dataPtr->vkExternalDevice.device) + { + params.insert({ "windowType", "null" }); + params.insert({ "surface_less", "Yes" }); + params.insert( + { "external_device", std::to_string(reinterpret_cast( + &this->dataPtr->vkExternalDevice)) }); + } +#endif + if (this->useCurrentGLContext) { params["externalGLControl"] = "true"; From e92b9697a2ff715bb1fc6dc46a404ea4652dc039 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Sun, 18 Sep 2022 20:30:06 -0300 Subject: [PATCH 2/7] Add Camera::PrepareForExternalSampling Needed by Vulkan QML integration Signed-off-by: Matias N. Goldberg --- include/gz/rendering/Camera.hh | 6 +++++ include/gz/rendering/base/BaseCamera.hh | 11 ++++++++ .../include/gz/rendering/ogre2/Ogre2Camera.hh | 3 +++ .../gz/rendering/ogre2/Ogre2RenderTarget.hh | 3 +++ ogre2/src/Ogre2Camera.cc | 8 ++++++ ogre2/src/Ogre2RenderTarget.cc | 26 +++++++++++++++++++ 6 files changed, 57 insertions(+) diff --git a/include/gz/rendering/Camera.hh b/include/gz/rendering/Camera.hh index 3f5883f64..9ff8298b3 100644 --- a/include/gz/rendering/Camera.hh +++ b/include/gz/rendering/Camera.hh @@ -332,6 +332,12 @@ namespace gz /// \param[out] _textureIdPtr the address of a void* pointer. public: virtual void RenderTextureMetalId(void *_textureIdPtr) const = 0; + /// \brief Right now this is Vulkan-only. This function needs to be + /// called after rendering, and before handling the texture pointer + /// (i.e. by calling RenderTextureMetalId()) so that external APIs + /// (e.g. Qt) can sample the texture. + public: virtual void PrepareForExternalSampling() = 0; + /// \brief Add a render pass to the camera /// \param[in] _pass New render pass to add public: virtual void AddRenderPass(const RenderPassPtr &_pass) = 0; diff --git a/include/gz/rendering/base/BaseCamera.hh b/include/gz/rendering/base/BaseCamera.hh index d475802fe..8b73a4816 100644 --- a/include/gz/rendering/base/BaseCamera.hh +++ b/include/gz/rendering/base/BaseCamera.hh @@ -186,6 +186,9 @@ namespace gz public: virtual void RenderTextureMetalId(void *_textureIdPtr) const override; + // Documentation inherited. + public: virtual void PrepareForExternalSampling() override; + // Documentation inherited. public: virtual void AddRenderPass(const RenderPassPtr &_pass) override; @@ -843,6 +846,14 @@ namespace gz << " engine" << std::endl; } + ////////////////////////////////////////////////// + template + void BaseCamera::PrepareForExternalSampling() + { + gzerr << "PrepareForExternalSampling is not supported by current render" + << " engine" << std::endl; + } + ////////////////////////////////////////////////// template void BaseCamera::AddRenderPass(const RenderPassPtr &_pass) diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2Camera.hh b/ogre2/include/gz/rendering/ogre2/Ogre2Camera.hh index 8aef67a3b..f2516ec6e 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2Camera.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2Camera.hh @@ -126,6 +126,9 @@ namespace gz public: virtual void RenderTextureMetalId(void *_textureIdPtr) const override; + // Documentation inherited. + public: virtual void PrepareForExternalSampling() override; + // Documentation inherited. public: void SetShadowsDirty() override; diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2RenderTarget.hh b/ogre2/include/gz/rendering/ogre2/Ogre2RenderTarget.hh index 739d1af0b..1d6283823 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2RenderTarget.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2RenderTarget.hh @@ -139,6 +139,9 @@ namespace gz // Documentation inherited public: void MetalIdImpl(void *_textureIdPtr) const; + /// \brief See Camera::PrepareForExternalSampling + public: void PrepareForExternalSampling(); + /// \brief Destroy the render texture protected: void DestroyTargetImpl(); diff --git a/ogre2/src/Ogre2Camera.cc b/ogre2/src/Ogre2Camera.cc index a16261724..c8614ebdc 100644 --- a/ogre2/src/Ogre2Camera.cc +++ b/ogre2/src/Ogre2Camera.cc @@ -230,6 +230,14 @@ void Ogre2Camera::RenderTextureMetalId(void *_textureIdPtr) const rt->MetalId(_textureIdPtr); } +////////////////////////////////////////////////// +void Ogre2Camera::PrepareForExternalSampling() +{ + if (!this->renderTexture) + return; + this->renderTexture->PrepareForExternalSampling(); +} + ////////////////////////////////////////////////// void Ogre2Camera::SetShadowsDirty() { diff --git a/ogre2/src/Ogre2RenderTarget.cc b/ogre2/src/Ogre2RenderTarget.cc index b32e16497..42fc89115 100644 --- a/ogre2/src/Ogre2RenderTarget.cc +++ b/ogre2/src/Ogre2RenderTarget.cc @@ -559,6 +559,32 @@ void Ogre2RenderTarget::MetalIdImpl(void *_textureIdPtr) const getCustomAttribute("msFinalTextureBuffer", _textureIdPtr); } +////////////////////////////////////////////////// +void Ogre2RenderTarget::PrepareForExternalSampling() +{ + if (!this->dataPtr->ogreTexture[0]) + return; + + Ogre::Root *ogreRoot = Ogre2RenderEngine::Instance()->OgreRoot(); + Ogre::RenderSystem *renderSystem = ogreRoot->getRenderSystem(); + Ogre::BarrierSolver &solver = renderSystem->getBarrierSolver(); + Ogre::ResourceTransitionArray resourceTransitions; + + resourceTransitions.clear(); + solver.resolveTransition(resourceTransitions, this->dataPtr->ogreTexture[1], + Ogre::ResourceLayout::Texture, + Ogre::ResourceAccess::Read, 1u << Ogre::PixelShader); + renderSystem->executeResourceTransition(resourceTransitions); + + // If we queued all cameras and transitioned them in + // Ogre2Scene::FlushGpuCommandsOnly & Ogre2Scene::EndFrame we might + // achieve optimal performance; however that could be negligible + // and is not worth the extra code complexity. + // + // Just flush now to actually perform the resource transition. + renderSystem->flushCommands(); +} + ////////////////////////////////////////////////// uint8_t Ogre2RenderTarget::TargetFSAA() const { From 15137d2a647d75ff79f1c01661a70758b1317771 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Sun, 18 Sep 2022 21:19:26 -0300 Subject: [PATCH 3/7] Add _reinterpretable parameter to Camera::SetImageFormat Needed by QML Vulkan integration. Signed-off-by: Matias N. Goldberg --- include/gz/rendering/Camera.hh | 4 +++- include/gz/rendering/RenderTarget.hh | 10 +++++++++- include/gz/rendering/base/BaseCamera.hh | 9 ++++++--- include/gz/rendering/base/BaseRenderTarget.hh | 19 +++++++++++++++++-- ogre2/src/Ogre2RenderTarget.cc | 9 ++++++++- 5 files changed, 43 insertions(+), 8 deletions(-) diff --git a/include/gz/rendering/Camera.hh b/include/gz/rendering/Camera.hh index 9ff8298b3..daad1e161 100644 --- a/include/gz/rendering/Camera.hh +++ b/include/gz/rendering/Camera.hh @@ -79,7 +79,9 @@ namespace gz /// \brief Set the image pixel format /// \param[in] _format New image pixel format - public: virtual void SetImageFormat(PixelFormat _format) = 0; + /// \param[in] _reinterpretable See RenderTarget::SetFormat + public: virtual void SetImageFormat(PixelFormat _format, + bool _reinterpretable = false) = 0; /// \brief Get the total image memory size in bytes /// \return The image memory size in bytes diff --git a/include/gz/rendering/RenderTarget.hh b/include/gz/rendering/RenderTarget.hh index 06087a70b..ff5d5f8c2 100644 --- a/include/gz/rendering/RenderTarget.hh +++ b/include/gz/rendering/RenderTarget.hh @@ -62,7 +62,15 @@ namespace gz /// \brief Set the render target image format /// \param[in] _format New target format - public: virtual void SetFormat(PixelFormat _format) = 0; + /// \param[in] _reinterpretable whether the RenderTarget will be + /// reinterpreted to another format (e.g. + /// from RGBA8_UNORM to/from RGBA8_UNORM_SRGB) + public: virtual void SetFormat(PixelFormat _format, + bool _reinterpretable = false) = 0; + + /// \brief See SetFormat() + /// \return True if format is reinterpretable + public: virtual bool Reinterpretable() const = 0; /// \brief Write rendered image to given Image. The RenderTarget will /// convert the underlying image to the specified format listed in the diff --git a/include/gz/rendering/base/BaseCamera.hh b/include/gz/rendering/base/BaseCamera.hh index 8b73a4816..e07e3f622 100644 --- a/include/gz/rendering/base/BaseCamera.hh +++ b/include/gz/rendering/base/BaseCamera.hh @@ -61,7 +61,9 @@ namespace gz public: virtual unsigned int ImageMemorySize() const override; - public: virtual void SetImageFormat(PixelFormat _format) override; + public: virtual void SetImageFormat(PixelFormat _format, + bool _reinterpretable = false) + override; public: virtual math::Angle HFOV() const override; @@ -335,9 +337,10 @@ namespace gz ////////////////////////////////////////////////// template - void BaseCamera::SetImageFormat(PixelFormat _format) + void BaseCamera::SetImageFormat(PixelFormat _format, + bool _reinterpretable) { - this->RenderTarget()->SetFormat(_format); + this->RenderTarget()->SetFormat(_format, _reinterpretable); } ////////////////////////////////////////////////// diff --git a/include/gz/rendering/base/BaseRenderTarget.hh b/include/gz/rendering/base/BaseRenderTarget.hh index 0d473a301..b449a608d 100644 --- a/include/gz/rendering/base/BaseRenderTarget.hh +++ b/include/gz/rendering/base/BaseRenderTarget.hh @@ -56,7 +56,11 @@ namespace gz public: virtual PixelFormat Format() const override; - public: virtual void SetFormat(PixelFormat _format) override; + public: virtual void SetFormat(PixelFormat _format, + bool _reinterpretable = false) override; + + // Documentation inherited + public: virtual bool Reinterpretable() const override; // Documentation inherited public: virtual math::Color BackgroundColor() const override; @@ -81,6 +85,8 @@ namespace gz protected: PixelFormat format = PF_UNKNOWN; + protected: bool reinterpretable = false; + protected: bool targetDirty = true; /// \brief Flag to indicate if render pass need to be rebuilt @@ -218,12 +224,21 @@ namespace gz ////////////////////////////////////////////////// template - void BaseRenderTarget::SetFormat(PixelFormat _format) + void BaseRenderTarget::SetFormat(PixelFormat _format, + bool _reinterpretable) { this->format = PixelUtil::Sanitize(_format); + this->reinterpretable = _reinterpretable; this->targetDirty = true; } + ////////////////////////////////////////////////// + template + bool BaseRenderTarget::Reinterpretable() const + { + return this->reinterpretable; + } + ////////////////////////////////////////////////// template math::Color BaseRenderTarget::BackgroundColor() const diff --git a/ogre2/src/Ogre2RenderTarget.cc b/ogre2/src/Ogre2RenderTarget.cc index 42fc89115..d292b98fa 100644 --- a/ogre2/src/Ogre2RenderTarget.cc +++ b/ogre2/src/Ogre2RenderTarget.cc @@ -518,13 +518,20 @@ void Ogre2RenderTarget::BuildTargetImpl() Ogre::TextureGpuManager *textureMgr = ogreRoot->getRenderSystem()->getTextureGpuManager(); + uint32_t textureFlags = Ogre::TextureFlags::RenderToTexture; + + if (this->reinterpretable) + { + textureFlags |= Ogre::TextureFlags::Reinterpretable; + } + for (size_t i = 0u; i < 2u; ++i) { this->dataPtr->ogreTexture[i] = textureMgr->createTexture( this->name + std::to_string(i), Ogre::GpuPageOutStrategy::Discard, - Ogre::TextureFlags::RenderToTexture, + textureFlags, Ogre::TextureTypes::Type2D); this->dataPtr->ogreTexture[i]->setResolution(this->width, this->height); From 9b299b11029efe45951aa0c4acdb1627f085f7f0 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Sun, 25 Sep 2022 14:18:13 -0300 Subject: [PATCH 4/7] Fix include error when OGRE2 is named OGRE-Next Signed-off-by: Matias N. Goldberg --- ogre2/src/Ogre2RenderEngine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogre2/src/Ogre2RenderEngine.cc b/ogre2/src/Ogre2RenderEngine.cc index da3ee83d0..384882d6f 100644 --- a/ogre2/src/Ogre2RenderEngine.cc +++ b/ogre2/src/Ogre2RenderEngine.cc @@ -48,7 +48,7 @@ # endif // Needed headers to receive an external Vulkan device from Qt // and inject it into OgreNext -# include "OGRE/RenderSystems/Vulkan/OgreVulkanDevice.h" +# include "RenderSystems/Vulkan/OgreVulkanDevice.h" # include "gz/rendering/RenderEngineVulkanExternalDeviceStructs.hh" #endif #include "Ogre2GzHlmsSphericalClipMinDistance.hh" From 84c03e250cd86e983af620b0f0ed111e6d556562 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Sat, 8 Oct 2022 13:23:02 -0300 Subject: [PATCH 5/7] Cosmetic changes Signed-off-by: Matias N. Goldberg --- .../rendering/RenderEngineVulkanExternalDeviceStructs.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/gz/rendering/RenderEngineVulkanExternalDeviceStructs.hh b/include/gz/rendering/RenderEngineVulkanExternalDeviceStructs.hh index 070b5a6ac..0f1b54626 100644 --- a/include/gz/rendering/RenderEngineVulkanExternalDeviceStructs.hh +++ b/include/gz/rendering/RenderEngineVulkanExternalDeviceStructs.hh @@ -19,11 +19,11 @@ #ifndef __APPLE__ -# include -# include "gz/rendering/Export.hh" -# include "gz/rendering/config.hh" +#include +#include "gz/rendering/Export.hh" +#include "gz/rendering/config.hh" -# include "vulkan/vulkan_core.h" +#include "vulkan/vulkan_core.h" namespace gz { From 4c3fc86998fefa20827007a02df52924e026b1b1 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Mon, 10 Oct 2022 20:56:59 -0300 Subject: [PATCH 6/7] Add libvulkan-dev to jammy CI Signed-off-by: Matias N. Goldberg --- .github/ci/packages-jammy.apt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ci/packages-jammy.apt b/.github/ci/packages-jammy.apt index 8ba3b675d..298fb8b61 100644 --- a/.github/ci/packages-jammy.apt +++ b/.github/ci/packages-jammy.apt @@ -1,2 +1,3 @@ libogre-next-dev libogre-next-2.3-dev +libvulkan-dev From 56391563feab42b2b88c245eadfc4c45cd33f621 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Thu, 13 Oct 2022 19:53:26 -0300 Subject: [PATCH 7/7] Fix build error in jammy CI Signed-off-by: Matias N. Goldberg --- ogre2/src/Ogre2RenderEngine.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/ogre2/src/Ogre2RenderEngine.cc b/ogre2/src/Ogre2RenderEngine.cc index 384882d6f..a0cc20a0f 100644 --- a/ogre2/src/Ogre2RenderEngine.cc +++ b/ogre2/src/Ogre2RenderEngine.cc @@ -39,6 +39,7 @@ #include "Ogre2GzHlmsUnlitPrivate.hh" #ifdef OGRE_BUILD_RENDERSYSTEM_VULKAN +# include "vulkan/vulkan_core.h" // Deal with old vulkan headers causing build errors # ifndef VK_NV_device_generated_commands # define VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV 0x00020000