The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit f569f8f1 authored by Jakob Weiss's avatar Jakob Weiss
Browse files

Fixed Linux build

parent 5889d2b8
...@@ -206,8 +206,9 @@ if(NOT TBB_FOUND) ...@@ -206,8 +206,9 @@ if(NOT TBB_FOUND)
# Find each component # Find each component
foreach(_comp ${TBB_SEARCH_COMPOMPONENTS}) foreach(_comp ${TBB_SEARCH_COMPOMPONENTS})
if(";${TBB_FIND_COMPONENTS};tbb;" MATCHES ";${_comp};") #message(STATUS ${_comp} ${TBB_FIND_COMPONENTS})
#if(";${TBB_FIND_COMPONENTS};tbb;" MATCHES ";${_comp};")
message(STATUS "if " ${_comp})
# Search for the libraries # Search for the libraries
find_library(TBB_${_comp}_LIBRARY_RELEASE ${_comp} find_library(TBB_${_comp}_LIBRARY_RELEASE ${_comp}
HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR} HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}
...@@ -240,7 +241,7 @@ if(NOT TBB_FOUND) ...@@ -240,7 +241,7 @@ if(NOT TBB_FOUND)
mark_as_advanced(TBB_${_comp}_LIBRARY_DEBUG) mark_as_advanced(TBB_${_comp}_LIBRARY_DEBUG)
mark_as_advanced(TBB_${_comp}_LIBRARY) mark_as_advanced(TBB_${_comp}_LIBRARY)
endif() #endif()
endforeach() endforeach()
################################## ##################################
......
...@@ -251,8 +251,16 @@ ELSE(GLEW_FOUND) ...@@ -251,8 +251,16 @@ ELSE(GLEW_FOUND)
ENDIF(GLEW_FOUND) ENDIF(GLEW_FOUND)
# TBB # TBB
FIND_PACKAGE(TBB REQUIRED) find_package(TBB QUIET)
IF(TBB_FOUND) if(NOT TBB_FOUND)
find_package(TBB_ COMPONENTS tbb tbbmalloc)#cmake/FindTBB_.cmake)
endif(NOT TBB_FOUND)
if(NOT TBB_FOUND)
message(FATAL_ERROR "TBB not found!")
endif(NOT TBB_FOUND)
IF(TARGET TBB::tbb)
MESSAGE(STATUS "* Found TBB") MESSAGE(STATUS "* Found TBB")
#LIST(APPEND CampvisGlobalDefinitions ${TBB_DEFINITIONS}) #LIST(APPEND CampvisGlobalDefinitions ${TBB_DEFINITIONS})
#LIST(APPEND CampvisGlobalIncludeDirs ${TBB_INCLUDE_DIR}) #LIST(APPEND CampvisGlobalIncludeDirs ${TBB_INCLUDE_DIR})
...@@ -265,9 +273,11 @@ IF(TBB_FOUND) ...@@ -265,9 +273,11 @@ IF(TBB_FOUND)
#LIST(APPEND CampvisExternalLicenseFiles ${TBB_LICENSE_FILE}) #LIST(APPEND CampvisExternalLicenseFiles ${TBB_LICENSE_FILE})
# unfortunately, the new TBB API does no longer allow copying of mutexes, hence we need to set a fallback define # unfortunately, the new TBB API does no longer allow copying of mutexes, hence we need to set a fallback define
LIST(APPEND CampvisGlobalDefinitions "-DTBB_DEPRECATED_MUTEX_COPYING") LIST(APPEND CampvisGlobalDefinitions "-DTBB_DEPRECATED_MUTEX_COPYING")
ELSE(TBB_FOUND) elseif(TBB_LIBRARIES)
MESSAGE(FATAL_ERROR "TBB not found!") LIST(APPEND CampvisGlobalDefinitions ${TBB_DEFINITIONS})
ENDIF(TBB_FOUND) LIST(APPEND CampvisGlobalExternalLibs ${TBB_LIBRARIES})
LIST(APPEND CampvisGlobalDefinitions "-DTBB_DEPRECATED_MUTEX_COPYING")
ENDIF(TARGET TBB::tbb)
# Eigen # Eigen
IF(EXISTS "${CampvisHome}/ext/eigen/Eigen/Eigen") IF(EXISTS "${CampvisHome}/ext/eigen/Eigen/Eigen")
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "cgt/bounds.h" #include "cgt/bounds.h"
#include "core/coreapi.h" #include "core/coreapi.h"
#include "core/datastructures/scopedtypeddata.h" // not directly needed here but by many classes including AbstractData //NOTE: This one is at the end of this file :) #include "core/datastructures/scopedtypeddata.h" // not directly needed here but by many classes including AbstractData
namespace campvis { namespace campvis {
...@@ -67,7 +67,7 @@ namespace campvis { ...@@ -67,7 +67,7 @@ namespace campvis {
// using MutexType = std::shared_timed_mutex; // using MutexType = std::shared_timed_mutex;
// using LockType = std::shared_lock < MutexType>; // using LockType = std::shared_lock < MutexType>;
typedef tbb::queuing_rw_mutex MutexType; typedef tbb::queuing_rw_mutex MutexType;
typedef MutexType::scoped_lock LockType; typedef tbb::queuing_rw_mutex::scoped_lock LockType;
/** /**
* Constructor, simply calles ReferenceCounted ctor. * Constructor, simply calles ReferenceCounted ctor.
...@@ -117,4 +117,6 @@ namespace campvis { ...@@ -117,4 +117,6 @@ namespace campvis {
} }
#include "core/datastructures/scopedtypeddata.h" // not directly needed here but by many classes including AbstractData
#endif // ABSTRACTDATA_H__ #endif // ABSTRACTDATA_H__
...@@ -84,13 +84,15 @@ namespace campvis { ...@@ -84,13 +84,15 @@ namespace campvis {
if (renderData) { if (renderData) {
// check if we can get a GL representation of the desired texture // check if we can get a GL representation of the desired texture
ImageRepresentationGL* glRep; ImageRepresentationGL* glRep;
if (attachment == GL_DEPTH_ATTACHMENT) if (attachment == GL_DEPTH_ATTACHMENT) {
if(auto id = (*renderData)->getDepthTexture()) if(auto id = (*renderData)->getDepthTexture())
glRep = const_cast<ImageRepresentationGL*>(id->getRepresentation<ImageRepresentationGL>(false)); glRep = const_cast<ImageRepresentationGL*>(id->getRepresentation<ImageRepresentationGL>(false));
else }
else {
if(auto id =(*renderData)->getColorTexture(_fbo->getNumColorAttachments())) //_fbo->getNumColorAttachments() is the index of the texture that is to be created if(auto id =(*renderData)->getColorTexture(_fbo->getNumColorAttachments())) //_fbo->getNumColorAttachments() is the index of the texture that is to be created
glRep = const_cast<ImageRepresentationGL*>(id->getRepresentation<ImageRepresentationGL>(false)); glRep = const_cast<ImageRepresentationGL*>(id->getRepresentation<ImageRepresentationGL>(false));
}
// check if the texture is compatible with what we want, and in that case detach from the old RenderTargetData // check if the texture is compatible with what we want, and in that case detach from the old RenderTargetData
if (glRep) { if (glRep) {
tex = const_cast<cgt::Texture*>(glRep->getTexture()); tex = const_cast<cgt::Texture*>(glRep->getTexture());
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "cgt/logmanager.h" #include "cgt/logmanager.h"
#include <algorithm>
//using namespace std; //using namespace std;
using std::string; using std::string;
......
...@@ -240,7 +240,7 @@ void cgt::TextureManager::run() ...@@ -240,7 +240,7 @@ void cgt::TextureManager::run()
} }
} }
constexpr size_t cgt::TextureManager::textureByteSize(const cache_key_t & key) size_t cgt::TextureManager::textureByteSize(const cache_key_t & key)
{ {
return key.size_x * key.size_y * key.size_z * GLTextureFormatTraits::get(key.internalFormat).bpp(); return key.size_x * key.size_y * key.size_z * GLTextureFormatTraits::get(key.internalFormat).bpp();
} }
......
...@@ -88,7 +88,7 @@ namespace cgt { ...@@ -88,7 +88,7 @@ namespace cgt {
const int garbageLifetime = 10; const int garbageLifetime = 10;
/// Compute the memory size from the cache entry key /// Compute the memory size from the cache entry key
static constexpr size_t textureByteSize(const cache_key_t& key); static size_t textureByteSize(const cache_key_t& key);
/// Convert the texture type to a humanly readable string /// Convert the texture type to a humanly readable string
static std::string textureTypeToStr(GLenum tt); static std::string textureTypeToStr(GLenum tt);
......
...@@ -62,7 +62,7 @@ namespace campvis { ...@@ -62,7 +62,7 @@ namespace campvis {
void LocalAmbientOcclusionDecorator::renderProlog(const DataContainer& dataContainer, cgt::Shader* shader) { void LocalAmbientOcclusionDecorator::renderProlog(const DataContainer& dataContainer, cgt::Shader* shader) {
auto aotf = p_aoEmissiveTransferFunction.getTF(); auto aotf = p_aoEmissiveTransferFunction.getTF();
_aoTFUnit = std::make_unique<cgt::TextureUnit>(); _aoTFUnit = std::unique_ptr<cgt::TextureUnit>(new cgt::TextureUnit());
aotf->bind(shader, *_aoTFUnit, "_aoEmissiveTF", "_aoEmissiveTFParams"); aotf->bind(shader, *_aoTFUnit, "_aoEmissiveTF", "_aoEmissiveTFParams");
shader->setUniform("_aoSphereRadius", p_aoSphereRadius.getValue()); shader->setUniform("_aoSphereRadius", p_aoSphereRadius.getValue());
......
...@@ -34,7 +34,7 @@ namespace campvis { ...@@ -34,7 +34,7 @@ namespace campvis {
// explicitly instantiate templates to register the processors // explicitly instantiate templates to register the processors
template class SmartProcessorRegistrar<DataSeriesSplitter>; template class SmartProcessorRegistrar<DataSeriesSplitter>;
template class SmartProcessorRegistrar<LightSourceProvider>;
template class SmartProcessorRegistrar<MatrixProcessor>; template class SmartProcessorRegistrar<MatrixProcessor>;
template class SmartProcessorRegistrar<TrackballCameraProvider>; template class SmartProcessorRegistrar<TrackballCameraProvider>;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment