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

Moving to OSPRay 1.7.x #589

Merged
merged 2 commits into from
Oct 18, 2018
Merged

Moving to OSPRay 1.7.x #589

merged 2 commits into from
Oct 18, 2018

Conversation

hernando
Copy link
Contributor

Dropped support for previous OSPRay versions

@hernando
Copy link
Contributor Author

In order to pass CI here we need to update the nix branch, let me know if you're OK with doing it now.

Copy link
Contributor

@tribal-tec tribal-tec left a 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)
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@@ -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
Copy link
Contributor

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

OSP_TEXTURE_SHARED_BUFFER);
OSPTexture ospTexture = ospNewTexture("texture2d");

osp::vec2i size{int(texture->getWidth()), int(texture->getHeight())};
Copy link
Contributor

Choose a reason for hiding this comment

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

const?

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;
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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"; }
Copy link
Contributor

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?

@karjonas
Copy link
Contributor

LGTM. Did you also try optix? You need to enable it with BRAYNS_OPTIX_ENABLED and OptiX_INSTALL_DIR flags.

@hernando hernando force-pushed the ospray_1.7 branch 3 times, most recently from 8cbc202 to 06f5630 Compare October 18, 2018 14:22
Juan Hernando Vieites added 2 commits October 18, 2018 16:26
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.
@hernando hernando merged commit 640f484 into master Oct 18, 2018
@hernando hernando deleted the ospray_1.7 branch October 18, 2018 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants