-
Notifications
You must be signed in to change notification settings - Fork 47
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
Moving to OSPRay 1.7.x #589
Conversation
In order to pass CI here we need to update the nix branch, let me know if you're OK with doing it now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change needed for the optix module?
CMakeLists.txt
Outdated
common_find_package(ospray 1.5 SYSTEM) | ||
set(_ospray_unsupported_version 1.6) | ||
common_find_package(ospray 1.7 SYSTEM) | ||
set(_ospray_unsupported_version 1.8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't make sense as we don't know yet if it might work with 1.8 or not. Just remove the usage of that _ospray_unsupported_version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove it, but experience says that it won't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added once 1.6 came out and we sticked to 1.5. This became wrong after 1.7 came out, so the check itself is not safe anyways. What would be more correct is to maybe have a EXACT
version requirement for find_package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed
RUN mkdir -p ${DIST_PATH} \ | ||
&& wget https://github.com/embree/embree/releases/download/v${EMBREE_VERSION}/${EMBREE_FILE} \ | ||
&& tar zxvf ${EMBREE_FILE} -C ${DIST_PATH} --strip-components=1 \ | ||
&& rm -rf ${DIST_PATH}/bin ${DIST_PATH}/doc | ||
|
||
# Install OSPRay | ||
# https://github.com/ospray/ospray/releases | ||
ARG OSPRAY_VERSION=1.5.0-patch | ||
ARG OSPRAY_BRANCH=release-1.7.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not using the tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because v1.7.0 won't work and they haven't created the v1.7.1 tag yet.
engines/ospray/OSPRayMaterial.cpp
Outdated
@@ -43,7 +45,8 @@ static TextureTypeMaterialAttribute textureTypeMaterialAttribute[8] = { | |||
{TT_REFRACTION, "map_refraction"}}; | |||
|
|||
OSPRayMaterial::OSPRayMaterial() | |||
: _ospMaterial(ospNewMaterial(nullptr, "ExtendedOBJMaterial")) | |||
// No renderer specific materials for the moment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same status as before, so no reason for that comment
engines/ospray/OSPRayMaterial.cpp
Outdated
OSP_TEXTURE_SHARED_BUFFER); | ||
OSPTexture ospTexture = ospNewTexture("texture2d"); | ||
|
||
osp::vec2i size{int(texture->getWidth()), int(texture->getHeight())}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const?
engines/ospray/OSPRayMaterial.cpp
Outdated
ospSet2i(ospTexture, "size", size.x, size.y); | ||
const auto texelBytes = ospray::sizeOf(type); | ||
const auto totalTexels = size.x * size.y; | ||
const auto totalBytes = totalTexels * texelBytes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a function to Texture2D to get sizeInBytes()? We should even reuse that for the scene size statistics, but your choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add the function, but I'm unsure about the future of this code anyway. As far as I know the 2D texture was only used for simulation and we are going to change that anyway, aren't we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2D texture are valid for every material. OBJ meshes for instance have materials with textures. In fact, we were not using textures for simulation so far, but we might.
@@ -28,7 +28,7 @@ namespace ospray | |||
{ | |||
struct ExtendedSpheres : public ospray::Geometry | |||
{ | |||
std::string toString() const final { return "hbp::ExtendedSpheres"; } | |||
std::string toString() const final { return "ospray::ExtendedSpheres"; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more like brayns/bbp namespace?
LGTM. Did you also try optix? You need to enable it with BRAYNS_OPTIX_ENABLED and OptiX_INSTALL_DIR flags. |
8cbc202
to
06f5630
Compare
Dropped support for previous OSPRay versions
Added ospShutdown and removed loadModule("exit") hack. Killed MPI code. It seemd dead and it required a hack in the optix Renderer constructor that was making Optix device useless due to the creation of a temporary Renderer (to create materials). Simplified scene hierarchy in optix model.
Dropped support for previous OSPRay versions