Bug 260031

Summary: graphics/embree: Enable ISPC, add option for BACKFACE_CULLING
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Individual Port(s)Assignee: Alexey Dokuchaev <danfe>
Status: Closed FIXED    
Severity: Affects Only Me CC: FreeBSD, yuri
Priority: --- Flags: bugzilla: maintainer-feedback? (danfe)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 214612    
Attachments:
Description Flags
patch none

Description Yuri Victorovich freebsd_committer 2021-11-24 18:35:28 UTC
Created attachment 229709 [details]
patch

Hi Alexey,


The attached patch performs these 2 actions:
1. sets ISPC to ON (which is also a default value for it)
2. adds the BACKFACE_CULLING option with OFF as default (which is also a default value for it)

Both options are restored to their default values.

This is needed for OSPray, an important raytracing library. which explicitly requires these two Embree options to be at their default values in order to build.


Thank you,
Yuri
Comment 1 Alexey Dokuchaev freebsd_committer 2021-11-25 02:28:08 UTC
(In reply to Yuri Victorovich from comment #0)
> 1. sets ISPC to ON (which is also a default value for it)
I'm generally not against it, you had actually asked for this in bug #214577 back in 2017 and so I did, but later something got broken and was never fixed until rene@ disabled this option in 2019.  Last time I've checked it's okay now and doesn't break the build.

> 2. adds the BACKFACE_CULLING option with OFF as default (which is also a
> default value for it)
Shane asked me to enable EMBREE_BACKFACE_CULLING and EMBREE_RAY_MASK in bug #244190 because Blender expects ray mask to be enabled and while it doesn't currently expect backface culling to be on, it is a common feature used in 3D graphics.

Shane, can you clarify on whether we can disable BACKFACE_CULLING like Yuri's asking, or doing so would break other programs?
Comment 2 Yuri Victorovich freebsd_committer 2021-12-08 19:28:19 UTC
(In reply to Alexey Dokuchaev from comment #1)

It looks like a timeout for your question to Shane.
Comment 3 commit-hook freebsd_committer 2021-12-09 03:58:17 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8b60d24e9b0a874e659430b636c30be008f3dfa0

commit 8b60d24e9b0a874e659430b636c30be008f3dfa0
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2021-12-09 03:56:02 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2021-12-09 03:56:02 +0000

    graphics/embree: change default selection of the port's options (+)

    OSPray, an allegedly important raytracing library, explicitly requires
    Embree to be built with ISPC support and back-face culling disabled.

    This might or might not affect other 3D applications and, particularly,
    Blender, but could not reach Shane for his opinion in due time.

    Requested by:   yuri
    PR:             260031

 graphics/embree/Makefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Comment 4 Alexey Dokuchaev freebsd_committer 2021-12-09 04:04:46 UTC
(In reply to Yuri Victorovich from comment #2)
> It looks like a timeout for your question to Shane.
Apparently so.  Then I guess we have no reasons not to do as you ask. :-)
Comment 5 Yuri Victorovich freebsd_committer 2021-12-09 04:17:09 UTC
Thank you, Alexey.