You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
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.
(cherry picked from commit 767e374dce)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright 2009-2020 Intel Corporation
|
||||
// Copyright 2009-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
@@ -19,7 +19,9 @@ typedef int ssize_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
// -- GODOT start --
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
// -- GODOT end --
|
||||
# define RTC_ALIGN(...) __declspec(align(__VA_ARGS__))
|
||||
#else
|
||||
# define RTC_ALIGN(...) __attribute__((aligned(__VA_ARGS__)))
|
||||
@@ -35,7 +37,7 @@ typedef int ssize_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#if defined(_WIN32)
|
||||
# define RTC_FORCEINLINE __forceinline
|
||||
#else
|
||||
# define RTC_FORCEINLINE inline __attribute__((always_inline))
|
||||
@@ -224,13 +226,13 @@ RTC_FORCEINLINE void rtcInitIntersectContext(struct RTCIntersectContext* context
|
||||
}
|
||||
|
||||
/* Point query structure for closest point query */
|
||||
struct RTC_ALIGN(16) RTCPointQuery
|
||||
struct RTC_ALIGN(16) RTCPointQuery
|
||||
{
|
||||
float x; // x coordinate of the query point
|
||||
float y; // y coordinate of the query point
|
||||
float z; // z coordinate of the query point
|
||||
float time; // time of the point query
|
||||
float radius; // radius of the point query
|
||||
float radius; // radius of the point query
|
||||
};
|
||||
|
||||
/* Structure of a packet of 4 query points */
|
||||
@@ -250,7 +252,7 @@ struct RTC_ALIGN(32) RTCPointQuery8
|
||||
float y[8]; // y coordinate of the query point
|
||||
float z[8]; // z coordinate of the query point
|
||||
float time[8]; // time of the point query
|
||||
float radius[8]; // radius ofr the point query
|
||||
float radius[8]; // radius ofr the point query
|
||||
};
|
||||
|
||||
/* Structure of a packet of 16 query points */
|
||||
@@ -269,11 +271,11 @@ struct RTC_ALIGN(16) RTCPointQueryContext
|
||||
{
|
||||
// accumulated 4x4 column major matrices from world space to instance space.
|
||||
// undefined if size == 0.
|
||||
float world2inst[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
|
||||
float world2inst[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
|
||||
|
||||
// accumulated 4x4 column major matrices from instance space to world space.
|
||||
// undefined if size == 0.
|
||||
float inst2world[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
|
||||
float inst2world[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
|
||||
|
||||
// instance ids.
|
||||
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT];
|
||||
@@ -301,13 +303,13 @@ struct RTC_ALIGN(16) RTCPointQueryFunctionArguments
|
||||
void* userPtr;
|
||||
|
||||
// primitive and geometry ID of primitive
|
||||
unsigned int primID;
|
||||
unsigned int geomID;
|
||||
unsigned int primID;
|
||||
unsigned int geomID;
|
||||
|
||||
// the context with transformation and instance ID stack
|
||||
struct RTCPointQueryContext* context;
|
||||
|
||||
// If the current instance transform M (= context->world2inst[context->instStackSize])
|
||||
// If the current instance transform M (= context->world2inst[context->instStackSize])
|
||||
// is a similarity matrix, i.e there is a constant factor similarityScale such that,
|
||||
// for all x,y: dist(Mx, My) = similarityScale * dist(x, y),
|
||||
// The similarity scale is 0, if the current instance transform is not a
|
||||
@@ -322,5 +324,5 @@ struct RTC_ALIGN(16) RTCPointQueryFunctionArguments
|
||||
};
|
||||
|
||||
typedef bool (*RTCPointQueryFunction)(struct RTCPointQueryFunctionArguments* args);
|
||||
|
||||
|
||||
RTC_NAMESPACE_END
|
||||
|
||||
Reference in New Issue
Block a user