From 767e374dced69b45db0afb30ca2ccf0bbbeef672 Mon Sep 17 00:00:00 2001 From: jfons Date: Thu, 20 May 2021 12:49:33 +0200 Subject: Upgrade Embree to the latest official release. Since Embree v3.13.0 supports AARCH64, switch back to the official repo instead of using Embree-aarch64. `thirdparty/embree/patches/godot-changes.patch` should now contain an accurate diff of the changes done to the library. --- .../kernels/geometry/subdivpatch1_intersector.h | 237 --------------------- 1 file changed, 237 deletions(-) delete mode 100644 thirdparty/embree-aarch64/kernels/geometry/subdivpatch1_intersector.h (limited to 'thirdparty/embree-aarch64/kernels/geometry/subdivpatch1_intersector.h') diff --git a/thirdparty/embree-aarch64/kernels/geometry/subdivpatch1_intersector.h b/thirdparty/embree-aarch64/kernels/geometry/subdivpatch1_intersector.h deleted file mode 100644 index 74ec1de258..0000000000 --- a/thirdparty/embree-aarch64/kernels/geometry/subdivpatch1_intersector.h +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright 2009-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 - -#pragma once - -#include "subdivpatch1.h" -#include "grid_soa.h" -#include "grid_soa_intersector1.h" -#include "grid_soa_intersector_packet.h" -#include "../common/ray.h" - -namespace embree -{ - namespace isa - { - template - class SubdivPatch1Precalculations : public T - { - public: - __forceinline SubdivPatch1Precalculations (const Ray& ray, const void* ptr) - : T(ray,ptr) {} - }; - - template - class SubdivPatch1PrecalculationsK : public T - { - public: - __forceinline SubdivPatch1PrecalculationsK (const vbool& valid, RayK& ray) - : T(valid,ray) {} - }; - - class SubdivPatch1Intersector1 - { - public: - typedef GridSOA Primitive; - typedef SubdivPatch1Precalculations Precalculations; - - static __forceinline bool processLazyNode(Precalculations& pre, IntersectContext* context, const Primitive* prim, size_t& lazy_node) - { - lazy_node = prim->root(0); - pre.grid = (Primitive*)prim; - return false; - } - - /*! Intersect a ray with the primitive. */ - template - static __forceinline void intersect(const Accel::Intersectors* This, Precalculations& pre, RayHit& ray, IntersectContext* context, const Primitive* prim, size_t ty, const TravRay &tray, size_t& lazy_node) - { - if (likely(ty == 0)) GridSOAIntersector1::intersect(pre,ray,context,prim,lazy_node); - else processLazyNode(pre,context,prim,lazy_node); - } - - template - static __forceinline void intersect(const Accel::Intersectors* This, Precalculations& pre, RayHit& ray, IntersectContext* context, size_t ty0, const Primitive* prim, size_t ty, const TravRay &tray, size_t& lazy_node) { - intersect(This,pre,ray,context,prim,ty,tray,lazy_node); - } - - /*! Test if the ray is occluded by the primitive */ - template - static __forceinline bool occluded(const Accel::Intersectors* This, Precalculations& pre, Ray& ray, IntersectContext* context, const Primitive* prim, size_t ty, const TravRay &tray, size_t& lazy_node) - { - if (likely(ty == 0)) return GridSOAIntersector1::occluded(pre,ray,context,prim,lazy_node); - else return processLazyNode(pre,context,prim,lazy_node); - } - - template - static __forceinline bool occluded(const Accel::Intersectors* This, Precalculations& pre, Ray& ray, IntersectContext* context, size_t ty0, const Primitive* prim, size_t ty, const TravRay &tray, size_t& lazy_node) { - return occluded(This,pre,ray,context,prim,ty,tray,lazy_node); - } - - template - static __forceinline bool pointQuery(const Accel::Intersectors* This, PointQuery* query, PointQueryContext* context, const Primitive* prim, size_t ty, const TravPointQuery &tquery, size_t& lazy_node) - { - // TODO: PointQuery implement - assert(false && "not implemented"); - return false; - } - - template - static __forceinline bool pointQuery(const Accel::Intersectors* This, PointQuery* query, PointQueryContext* context, size_t ty0, const Primitive* prim, size_t ty, const TravPointQuery &tquery, size_t& lazy_node) { - return pointQuery(This,query,context,prim,ty,tquery,lazy_node); - } - }; - - class SubdivPatch1MBIntersector1 - { - public: - typedef SubdivPatch1 Primitive; - typedef GridSOAMBIntersector1::Precalculations Precalculations; - - static __forceinline bool processLazyNode(Precalculations& pre, Ray& ray, IntersectContext* context, const Primitive* prim_i, size_t& lazy_node) - { - Primitive* prim = (Primitive*) prim_i; - GridSOA* grid = nullptr; - grid = (GridSOA*) prim->root_ref.get(); - pre.itime = getTimeSegment(ray.time(), float(grid->time_steps-1), pre.ftime); - lazy_node = grid->root(pre.itime); - pre.grid = grid; - return false; - } - - /*! Intersect a ray with the primitive. */ - template - static __forceinline void intersect(const Accel::Intersectors* This, Precalculations& pre, RayHit& ray, IntersectContext* context, const Primitive* prim, size_t ty, const TravRay &tray, size_t& lazy_node) - { - if (likely(ty == 0)) GridSOAMBIntersector1::intersect(pre,ray,context,prim,lazy_node); - else processLazyNode(pre,ray,context,prim,lazy_node); - } - - template - static __forceinline void intersect(const Accel::Intersectors* This, Precalculations& pre, RayHit& ray, IntersectContext* context, size_t ty0, const Primitive* prim, size_t ty, const TravRay &tray, size_t& lazy_node) { - intersect(This,pre,ray,context,prim,ty,tray,lazy_node); - } - - /*! Test if the ray is occluded by the primitive */ - template - static __forceinline bool occluded(const Accel::Intersectors* This, Precalculations& pre, Ray& ray, IntersectContext* context, const Primitive* prim, size_t ty, const TravRay &tray, size_t& lazy_node) - { - if (likely(ty == 0)) return GridSOAMBIntersector1::occluded(pre,ray,context,prim,lazy_node); - else return processLazyNode(pre,ray,context,prim,lazy_node); - } - - template - static __forceinline bool occluded(const Accel::Intersectors* This, Precalculations& pre, Ray& ray, IntersectContext* context, size_t ty0, const Primitive* prim, size_t ty, const TravRay &tray, size_t& lazy_node) { - return occluded(This,pre,ray,context,prim,ty,tray,lazy_node); - } - - template - static __forceinline bool pointQuery(const Accel::Intersectors* This, PointQuery* query, PointQueryContext* context, const Primitive* prim, size_t ty, const TravPointQuery &tquery, size_t& lazy_node) - { - // TODO: PointQuery implement - assert(false && "not implemented"); - return false; - } - - template - static __forceinline bool pointQuery(const Accel::Intersectors* This, PointQuery* query, PointQueryContext* context, size_t ty0, const Primitive* prim, size_t ty, const TravPointQuery &tquery, size_t& lazy_node) { - return pointQuery(This,query,context,prim,ty,tquery,lazy_node); - } - }; - - template - struct SubdivPatch1IntersectorK - { - typedef GridSOA Primitive; - typedef SubdivPatch1PrecalculationsK::Precalculations> Precalculations; - - static __forceinline bool processLazyNode(Precalculations& pre, IntersectContext* context, const Primitive* prim, size_t& lazy_node) - { - lazy_node = prim->root(0); - pre.grid = (Primitive*)prim; - return false; - } - - template - static __forceinline void intersect(const vbool& valid, const Accel::Intersectors* This, Precalculations& pre, RayHitK& ray, IntersectContext* context, const Primitive* prim, size_t ty, const TravRayK &tray, size_t& lazy_node) - { - if (likely(ty == 0)) GridSOAIntersectorK::intersect(valid,pre,ray,context,prim,lazy_node); - else processLazyNode(pre,context,prim,lazy_node); - } - - template - static __forceinline vbool occluded(const vbool& valid, const Accel::Intersectors* This, Precalculations& pre, RayK& ray, IntersectContext* context, const Primitive* prim, size_t ty, const TravRayK &tray, size_t& lazy_node) - { - if (likely(ty == 0)) return GridSOAIntersectorK::occluded(valid,pre,ray,context,prim,lazy_node); - else return processLazyNode(pre,context,prim,lazy_node); - } - - template - static __forceinline void intersect(const Accel::Intersectors* This, Precalculations& pre, RayHitK& ray, size_t k, IntersectContext* context, const Primitive* prim, size_t ty, const TravRay &tray, size_t& lazy_node) - { - if (likely(ty == 0)) GridSOAIntersectorK::intersect(pre,ray,k,context,prim,lazy_node); - else processLazyNode(pre,context,prim,lazy_node); - } - - template - static __forceinline bool occluded(const Accel::Intersectors* This, Precalculations& pre, RayK& ray, size_t k, IntersectContext* context, const Primitive* prim, size_t ty, const TravRay &tray, size_t& lazy_node) - { - if (likely(ty == 0)) return GridSOAIntersectorK::occluded(pre,ray,k,context,prim,lazy_node); - else return processLazyNode(pre,context,prim,lazy_node); - } - }; - - typedef SubdivPatch1IntersectorK<4> SubdivPatch1Intersector4; - typedef SubdivPatch1IntersectorK<8> SubdivPatch1Intersector8; - typedef SubdivPatch1IntersectorK<16> SubdivPatch1Intersector16; - - template - struct SubdivPatch1MBIntersectorK - { - typedef SubdivPatch1 Primitive; - //typedef GridSOAMBIntersectorK::Precalculations Precalculations; - typedef SubdivPatch1PrecalculationsK::Precalculations> Precalculations; - - static __forceinline bool processLazyNode(Precalculations& pre, IntersectContext* context, const Primitive* prim_i, size_t& lazy_node) - { - Primitive* prim = (Primitive*) prim_i; - GridSOA* grid = (GridSOA*) prim->root_ref.get(); - lazy_node = grid->troot; - pre.grid = grid; - return false; - } - - template - static __forceinline void intersect(const vbool& valid, const Accel::Intersectors* This, Precalculations& pre, RayHitK& ray, IntersectContext* context, const Primitive* prim, size_t ty, const TravRayK &tray, size_t& lazy_node) - { - if (likely(ty == 0)) GridSOAMBIntersectorK::intersect(valid,pre,ray,context,prim,lazy_node); - else processLazyNode(pre,context,prim,lazy_node); - } - - template - static __forceinline vbool occluded(const vbool& valid, const Accel::Intersectors* This, Precalculations& pre, RayK& ray, IntersectContext* context, const Primitive* prim, size_t ty, const TravRayK &tray, size_t& lazy_node) - { - if (likely(ty == 0)) return GridSOAMBIntersectorK::occluded(valid,pre,ray,context,prim,lazy_node); - else return processLazyNode(pre,context,prim,lazy_node); - } - - template - static __forceinline void intersect(const Accel::Intersectors* This, Precalculations& pre, RayHitK& ray, size_t k, IntersectContext* context, const Primitive* prim, size_t ty, const TravRay &tray, size_t& lazy_node) - { - if (likely(ty == 0)) GridSOAMBIntersectorK::intersect(pre,ray,k,context,prim,lazy_node); - else processLazyNode(pre,context,prim,lazy_node); - } - - template - static __forceinline bool occluded(const Accel::Intersectors* This, Precalculations& pre, RayK& ray, size_t k, IntersectContext* context, const Primitive* prim, size_t ty, const TravRay &tray, size_t& lazy_node) - { - if (likely(ty == 0)) return GridSOAMBIntersectorK::occluded(pre,ray,k,context,prim,lazy_node); - else return processLazyNode(pre,context,prim,lazy_node); - } - }; - - typedef SubdivPatch1MBIntersectorK<4> SubdivPatch1MBIntersector4; - typedef SubdivPatch1MBIntersectorK<8> SubdivPatch1MBIntersector8; - typedef SubdivPatch1MBIntersectorK<16> SubdivPatch1MBIntersector16; - } -} -- cgit v1.2.3