Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package vsgXchange for openSUSE:Factory 
checked in at 2023-08-02 16:49:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vsgXchange (Old)
 and      /work/SRC/openSUSE:Factory/.vsgXchange.new.22712 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "vsgXchange"

Wed Aug  2 16:49:07 2023 rev:2 rq:1101654 version:1.0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/vsgXchange/vsgXchange.changes    2023-07-04 
15:23:23.790572180 +0200
+++ /work/SRC/openSUSE:Factory/.vsgXchange.new.22712/vsgXchange.changes 
2023-08-02 16:50:46.365618519 +0200
@@ -1,0 +2,7 @@
+Tue Aug  1 07:14:53 UTC 2023 - Ralf Habacker <[email protected]>
+
+- Update to version 1.0.4
+  * See https://github.com/vsg-dev/vsgXchange/releases/tag/v1.0.4 for
+    release info
+
+-------------------------------------------------------------------

Old:
----
  vsgXchange-1.0.3.tar.xz

New:
----
  vsgXchange-1.0.4.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ vsgXchange.spec ++++++
--- /var/tmp/diff_new_pack.lmYfAo/_old  2023-08-02 16:50:46.937621975 +0200
+++ /var/tmp/diff_new_pack.lmYfAo/_new  2023-08-02 16:50:46.945622023 +0200
@@ -19,7 +19,7 @@
 %define _vsg_so_nr 1
 
 Name:           vsgXchange
-Version:        1.0.3
+Version:        1.0.4
 Release:        0
 Summary:        3D graphics toolkit
 License:        MIT

++++++ _service ++++++
--- /var/tmp/diff_new_pack.lmYfAo/_old  2023-08-02 16:50:46.985622265 +0200
+++ /var/tmp/diff_new_pack.lmYfAo/_new  2023-08-02 16:50:46.989622289 +0200
@@ -2,7 +2,7 @@
 <service name="tar_scm" mode="disabled">
     <param name="scm">git</param>
     <param name="url">https://github.com/vsg-dev/vsgXchange</param>
-    <param name="revision">v1.0.3</param>
+    <param name="revision">v1.0.4</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="versionrewrite-pattern">v(.*)</param>
   </service>

++++++ vsgXchange-1.0.3.tar.xz -> vsgXchange-1.0.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vsgXchange-1.0.3/.gitignore 
new/vsgXchange-1.0.4/.gitignore
--- old/vsgXchange-1.0.3/.gitignore     1970-01-01 01:00:00.000000000 +0100
+++ new/vsgXchange-1.0.4/.gitignore     2023-07-26 18:49:37.000000000 +0200
@@ -0,0 +1,80 @@
+
+cmake_uninstall.cmake
+
+lib/
+bin/
+
+# Autogenerated files
+include/vsgXchange/Version.h
+
+*.pc
+*.conf
+*.backup
+CMakeCache.txt
+CMakeFiles
+CMakeScripts
+Makefile
+cmake_install.cmake
+install_manifest.txt
+CMakeDoxyfile.in
+CMakeDoxygenDefaults.cmake
+Doxyfile.docs
+vsgXchangeConfig.cmake
+vsgXchangeConfigVersion.cmake
+Doxyfile.docs-vsgXchange
+
+
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
+
+# Visual Studio files
+*.sln
+*.vcxproj
+*.vcxproj.filters
+*.vcxproj.user
+.vs/
+x64/
+src/vsg/vsg.dir/
+*.pdb
+*.tlog
+*.log
+
+# Xcode
+DerivedData/
+*.build
+*.xcodeproj
+
+# Gradle
+.gradle/
+.idea/
+.externalNativeBuild/
+*.iml
+build/
+local.properties
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vsgXchange-1.0.3/CMakeLists.txt 
new/vsgXchange-1.0.4/CMakeLists.txt
--- old/vsgXchange-1.0.3/CMakeLists.txt 2023-05-25 15:56:33.000000000 +0200
+++ new/vsgXchange-1.0.4/CMakeLists.txt 2023-07-26 18:49:37.000000000 +0200
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 3.7)
 
 project(vsgXchange
-    VERSION 1.0.3
+    VERSION 1.0.4
     DESCRIPTION "VulkanSceneGraph 3rd party data integration library"
     LANGUAGES CXX C
 )
@@ -20,7 +20,7 @@
     set(ENV{VULKAN_SDK} ${VULKAN_SDK})
 endif()
 
-set(VSG_MIN_VERSION 1.0.3)
+set(VSG_MIN_VERSION 1.0.8)
 find_package(vsg ${VSG_MIN_VERSION})
 
 vsg_setup_dir_vars()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vsgXchange-1.0.3/src/assimp/assimp.cpp 
new/vsgXchange-1.0.4/src/assimp/assimp.cpp
--- old/vsgXchange-1.0.3/src/assimp/assimp.cpp  2023-05-25 15:56:33.000000000 
+0200
+++ new/vsgXchange-1.0.4/src/assimp/assimp.cpp  2023-07-26 18:49:37.000000000 
+0200
@@ -140,6 +140,8 @@
     using CameraMap = std::map<std::string, vsg::ref_ptr<vsg::Camera>>;
     using LightMap = std::map<std::string, vsg::ref_ptr<vsg::Light>>;
 
+    vsg::Path filename;
+
     vsg::ref_ptr<const vsg::Options> options;
     const aiScene* scene = nullptr;
     CameraMap cameraMap;
@@ -249,25 +251,47 @@
     {
         SamplerData samplerImage;
 
-        if (texPath.data[0] == '*')
+        if (auto texture = scene->GetEmbeddedTexture(texPath.C_Str()))
         {
-            const auto texIndex = std::atoi(texPath.C_Str() + 1);
-            const auto texture = scene->mTextures[texIndex];
-            if (texture->mWidth > 0 && texture->mHeight == 0)
+            // check embedded texture has no width so must be invalid
+            if (texture->mWidth == 0) return {};
+
+            if (texture->mHeight == 0)
             {
+                vsg::debug("filename = ", filename, " : Embedded compressed 
format texture->achFormatHint = ", texture->achFormatHint);
+
+                // texture is a compressed format, defer to the VSG's 
vsg::read() to convert the block of data to vsg::Data image.
                 auto imageOptions = vsg::Options::create(*options);
                 imageOptions->extensionHint = vsg::Path(".") + 
texture->achFormatHint;
-                if (samplerImage.data = 
vsg::read_cast<vsg::Data>(reinterpret_cast<const uint8_t*>(texture->pcData), 
texture->mWidth, imageOptions); !samplerImage.data.valid())
-                    return {};
+                samplerImage.data = 
vsg::read_cast<vsg::Data>(reinterpret_cast<const uint8_t*>(texture->pcData), 
texture->mWidth, imageOptions);
+
+                // if no data assigned return null
+                if (!samplerImage.data) return {};
+            }
+            else
+            {
+                vsg::debug("filename = ", filename, " : Embedded raw format 
texture->achFormatHint = ", texture->achFormatHint);
+
+                // Vulkan doesn't support this format we have to reorder it to 
RGBA
+                auto image = vsg::ubvec4Array2D::create(texture->mWidth, 
texture->mHeight, vsg::Data::Properties{VK_FORMAT_R8G8B8A8_UNORM});
+                auto src = texture->pcData;
+                for(auto& dest_c : *image)
+                {
+                    auto& src_c = *(src++);
+                    dest_c.r = src_c.r;
+                    dest_c.g = src_c.g;
+                    dest_c.b = src_c.b;
+                    dest_c.a = src_c.a;
+                }
+                samplerImage.data = image;
             }
         }
         else
         {
-            auto filename = vsg::findFile(texPath.C_Str(), options);
-
-            if (samplerImage.data = vsg::read_cast<vsg::Data>(filename, 
options); !samplerImage.data.valid())
+            auto textureFilename = vsg::findFile(texPath.C_Str(), options);
+            if (samplerImage.data = vsg::read_cast<vsg::Data>(textureFilename, 
options); !samplerImage.data.valid())
             {
-                vsg::warn("Failed to load texture: ", filename, " texPath = ", 
texPath.C_Str());
+                vsg::warn("Failed to load texture: ", textureFilename, " 
texPath = ", texPath.C_Str());
                 return {};
             }
         }
@@ -460,14 +484,14 @@
 
     if (sharedObjects)
     {
-        sharedObjects->share(convertedMaterial.descriptors);
-    }
-
-    auto descriptorSetLayout = 
vsg::DescriptorSetLayout::create(convertedMaterial.descriptorBindings);
-    convertedMaterial.descriptorSet = 
vsg::DescriptorSet::create(descriptorSetLayout, convertedMaterial.descriptors);
-    if (sharedObjects)
-    {
-        sharedObjects->share(convertedMaterial.descriptorSet);
+        for(auto& ds : convertedMaterial.descriptorSets)
+        {
+            if (ds)
+            {
+                sharedObjects->share(ds->descriptors);
+                sharedObjects->share(ds);
+            }
+        }
     }
 }
 
@@ -524,7 +548,7 @@
     }
 
     std::string name = mesh->mName.C_Str();
-    auto& material = *convertedMaterials[mesh->mMaterialIndex];
+    auto material = convertedMaterials[mesh->mMaterialIndex];
 
     // count the number of indices of each type
     uint32_t numTriangleIndices = 0;
@@ -582,8 +606,8 @@
         return;
     }
 
-    auto config = 
vsg::GraphicsPipelineConfigurator::create(material.shaderSet);
-    config->shaderHints->defines = material.defines;
+    auto config = 
vsg::GraphicsPipelineConfigurator::create(material->shaderSet);
+    config->descriptorConfigurator = material;
 
     config->inputAssemblyState->topology = topology;
     auto indices = createIndices(mesh, numIndicesPerFace, numIndices);
@@ -641,7 +665,7 @@
     vid->instanceCount = 1;
     if (!name.empty()) vid->setValue("name", name);
 
-    if (material.blending)
+    if (material->blending)
     {
         config->colorBlendState->attachments = 
vsg::ColorBlendState::ColorBlendAttachments{
             {true, VK_BLEND_FACTOR_SRC_ALPHA, 
VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, VK_BLEND_OP_ADD, 
VK_BLEND_FACTOR_SRC_ALPHA, VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, 
VK_BLEND_OP_SUBTRACT, VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | 
VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT}};
@@ -649,61 +673,24 @@
         if (sharedObjects) sharedObjects->share(config->colorBlendState);
     }
 
-    if (material.two_sided)
+    if (material->two_sided)
     {
         config->rasterizationState->cullMode = VK_CULL_MODE_NONE;
     }
 
-    // pass DescriptorSetLaout to config
-    if (material.descriptorSet)
-    {
-        config->descriptorSetLayout = material.descriptorSet->setLayout;
-        config->descriptorBindings = material.descriptorBindings;
-    }
-
-    // set up ViewDependentState
-    if (useViewDependentState)
-    {
-        vsg::ref_ptr<vsg::ViewDescriptorSetLayout> vdsl;
-        if (sharedObjects)
-            vdsl = 
sharedObjects->shared_default<vsg::ViewDescriptorSetLayout>();
-        else
-            vdsl = vsg::ViewDescriptorSetLayout::create();
-        config->additionalDescriptorSetLayout = vdsl;
-    }
-
     if (sharedObjects)
         sharedObjects->share(config, [](auto gpc) { gpc->init(); });
     else
         config->init();
 
-    if (sharedObjects) sharedObjects->share(config->bindGraphicsPipeline);
-
     // create StateGroup as the root of the scene/command graph to hold the 
GraphicsProgram, and binding of Descriptors to decorate the whole graph
     auto stateGroup = vsg::StateGroup::create();
-    stateGroup->add(config->bindGraphicsPipeline);
-
-    if (material.descriptorSet)
-    {
-        auto bindDescriptorSet = 
vsg::BindDescriptorSet::create(VK_PIPELINE_BIND_POINT_GRAPHICS, config->layout, 
0, material.descriptorSet);
-        if (sharedObjects) sharedObjects->share(bindDescriptorSet);
-
-        stateGroup->add(bindDescriptorSet);
-    }
-
-    if (useViewDependentState)
-    {
-        auto bindViewDescriptorSets = 
vsg::BindViewDescriptorSets::create(VK_PIPELINE_BIND_POINT_GRAPHICS, 
config->layout, 1);
-        if (sharedObjects) sharedObjects->share(bindViewDescriptorSets);
-        stateGroup->add(bindViewDescriptorSets);
-    }
 
-    // assign any custom ArrayState that may be required.
-    stateGroup->prototypeArrayState = 
config->shaderSet->getSuitableArrayState(config->shaderHints->defines);
+    config->copyTo(stateGroup, sharedObjects);
 
     stateGroup->addChild(vid);
 
-    if (material.blending)
+    if (material->blending)
     {
         vsg::ComputeBounds computeBounds;
         vid->accept(computeBounds);
@@ -1018,6 +1005,7 @@
             opt->paths.insert(opt->paths.begin(), 
vsg::filePath(filenameToUse));
 
             SceneConverter converter;
+            converter.filename = filename;
             return converter.visit(scene, opt, ext);
         }
         else

Reply via email to