rtcGetDeviceProperty(3)

πŸ’… rtcGetDeviceProperty β€” bestie edition ✨

okay so you're in the rtcGetDeviceProperty(3) page from the Embree Ray Tracing Kernels 4 manual, and honestly? this one is a lil vibe check for your device 🫢


🌸 NAME 🌸

rtcGetDeviceProperty β€” queries properties of the device

like, you got questions about your device object, and this function is the one with answers πŸ’–


✨ SYNOPSIS ✨

#include <embree4/rtcore.h>

ssize_t rtcGetDeviceProperty(
  RTCDevice device,
  enum RTCDeviceProperty prop
);

πŸŽ€ DESCRIPTION πŸŽ€

so basically, rtcGetDeviceProperty lets you query properties (that's the prop argument, bestie) of a device object (that's the device argument). the thing it hands back is an integer of type ssize_t. no cap. πŸ’…

here's the full menu of properties you can ask about β€” every single one, i'm not skipping a thing:

  • RTC_DEVICE_PROPERTY_VERSION β€” queries the combined version number (MAJOR.MINOR.PATCH) with two decimal digits per component. like, for Embree 2.8.3 the integer 208003 is returned. math is math πŸ’€
  • RTC_DEVICE_PROPERTY_VERSION_MAJOR β€” queries the major version number of Embree.
  • RTC_DEVICE_PROPERTY_VERSION_MINOR β€” queries the minor version number of Embree.
  • RTC_DEVICE_PROPERTY_VERSION_PATCH β€” queries the patch version number of Embree.
  • RTC_DEVICE_PROPERTY_NATIVE_RAY4_SUPPORTED β€” queries whether the rtcIntersect4 and rtcOccluded4 functions preserve packet size and ray order when invoking callback functions. this is only the case if Embree is compiled with EMBREE_RAY_PACKETS and SSE2 (or SSE4.2) enabled, and if the machine it's running on supports SSE2 (or SSE4.2). very specific, very demure ✨
  • RTC_DEVICE_PROPERTY_NATIVE_RAY8_SUPPORTED β€” queries whether the rtcIntersect8 and rtcOccluded8 functions preserve packet size and ray order when invoking callback functions. this is only the case if Embree is compiled with EMBREE_RAY_PACKETS and AVX (or AVX2) enabled, and if the machine it's running on supports AVX (or AVX2).
  • RTC_DEVICE_PROPERTY_NATIVE_RAY16_SUPPORTED β€” queries whether the rtcIntersect16 and rtcOccluded16 functions preserve packet size and ray order when invoking callback functions. this is only the case if Embree is compiled with EMBREE_RAY_PACKETS and AVX512 enabled, and if the machine it's running on supports AVX512.
  • RTC_DEVICE_PROPERTY_RAY_MASK_SUPPORTED β€” queries whether ray masks are supported. this is only the case if Embree is compiled with EMBREE_RAY_MASK enabled.
  • RTC_DEVICE_PROPERTY_BACKFACE_CULLING_ENABLED β€” queries whether back face culling is enabled. this is only the case if Embree is compiled with EMBREE_BACKFACE_CULLING enabled.
  • RTC_DEVICE_PROPERTY_BACKFACE_CULLING_CURVES_ENABLED β€” queries whether back face culling for curves is enabled. this is only the case if Embree is compiled with EMBREE_BACKFACE_CULLING_CURVES enabled.
  • RTC_DEVICE_PROPERTY_BACKFACE_CULLING_SPHERES_ENABLED β€” queries whether back face culling for spheres is enabled. this is only the case if Embree is compiled with EMBREE_BACKFACE_CULLING_SPHERES enabled.
  • RTC_DEVICE_PROPERTY_COMPACT_POLYS_ENABLED β€” queries whether compact polys is enabled. this is only the case if Embree is compiled with EMBREE_COMPACT_POLYS enabled.
  • RTC_DEVICE_PROPERTY_FILTER_FUNCTION_SUPPORTED β€” queries whether filter functions are supported, which is the case if Embree is compiled with EMBREE_FILTER_FUNCTION enabled.
  • RTC_DEVICE_PROPERTY_IGNORE_INVALID_RAYS_ENABLED β€” queries whether invalid rays are ignored, which is the case if Embree is compiled with EMBREE_IGNORE_INVALID_RAYS enabled.
  • RTC_DEVICE_PROPERTY_TRIANGLE_GEOMETRY_SUPPORTED β€” queries whether triangles are supported, which is the case if Embree is compiled with EMBREE_GEOMETRY_TRIANGLE enabled. triangle girlies rise πŸ”Ί
  • RTC_DEVICE_PROPERTY_QUAD_GEOMETRY_SUPPORTED β€” queries whether quads are supported, which is the case if Embree is compiled with EMBREE_GEOMETRY_QUAD enabled.
  • RTC_DEVICE_PROPERTY_SUBDIVISION_GEOMETRY_SUPPORTED β€” queries whether subdivision meshes are supported, which is the case if Embree is compiled with EMBREE_GEOMETRY_SUBDIVISION enabled.
  • RTC_DEVICE_PROPERTY_CURVE_GEOMETRY_SUPPORTED β€” queries whether curves are supported, which is the case if Embree is compiled with EMBREE_GEOMETRY_CURVE enabled.
  • RTC_DEVICE_PROPERTY_POINT_GEOMETRY_SUPPORTED β€” queries whether points are supported, which is the case if Embree is compiled with EMBREE_GEOMETRY_POINT enabled.
  • RTC_DEVICE_PROPERTY_USER_GEOMETRY_SUPPORTED β€” queries whether user geometries are supported, which is the case if Embree is compiled with EMBREE_GEOMETRY_USER enabled.
  • RTC_DEVICE_PROPERTY_TASKING_SYSTEM β€” queries the tasking system Embree is compiled with. possible return values are:
    1. internal tasking system
    2. Intel Threading Building Blocks (TBB)
    3. Parallel Patterns Library (PPL)

(in the original these are numbered 0., 1., 2. β€” so 0 = internal, 1 = TBB, 2 = PPL, iykyk πŸ‘‘)

  • RTC_DEVICE_PROPERTY_JOIN_COMMIT_SUPPORTED β€” queries whether rtcJoinCommitScene is supported. this is not the case when Embree is compiled with PPL or older versions of TBB. so like, read that carefully bestie.
  • RTC_DEVICE_PROPERTY_PARALLEL_COMMIT_SUPPORTED β€” queries whether rtcCommitScene can get invoked from multiple TBB worker threads concurrently. this feature is only supported starting with TBB 2019 Update 9. periodt.

πŸ¦‹ EXIT STATUS πŸ¦‹

on success, it returns the value of the queried property. for properties that return a boolean value, the return value 0 denotes false and 1 denotes true β€” classic binary behavior, we love to see it ✨

on failure, zero is returned and an error code is set that can be queried using rtcGetDeviceError. so if you get a 0 and you were expecting something else… yeah, go check that error code, bestie 😭


🌈 that's the whole page 🌈

okay that's genuinely it, no cap. this whole thing is from the Embree Ray Tracing Kernels 4 manual β€” the source/version line is Embree Ray Tracing Kernels 4 β€” and the footer says rtcGetDeviceProperty(3), no date on this one. so go query your properties, stay iconic, and remember: if it returns 0 on failure, that's not a personality trait, that's a bug you need to fix πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from