.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "rtcGetDeviceError" "3" "" "" "Embree Ray Tracing Kernels 4" .hy .SS NAME .IP .nf \f[C] rtcGetDeviceError - returns the error code of the device \f[R] .fi .SS SYNOPSIS .IP .nf \f[C] #include RTCError rtcGetDeviceError(RTCDevice device); \f[R] .fi .SS DESCRIPTION .PP Each thread has its own error code per device. If an error occurs when calling an API function, this error code is set to the occurred error if it stores no previous error. The \f[C]rtcGetDeviceError\f[R] function reads and returns the currently stored error and clears the error code. This assures that the returned error code is always the first error occurred since the last invocation of \f[C]rtcGetDeviceError\f[R]. .PP Possible error codes returned by \f[C]rtcGetDeviceError\f[R] are: .IP \[bu] 2 \f[C]RTC_ERROR_NONE\f[R]: No error occurred. .IP \[bu] 2 \f[C]RTC_ERROR_UNKNOWN\f[R]: An unknown error has occurred. .IP \[bu] 2 \f[C]RTC_ERROR_INVALID_ARGUMENT\f[R]: An invalid argument was specified. .IP \[bu] 2 \f[C]RTC_ERROR_INVALID_OPERATION\f[R]: The operation is not allowed for the specified object. .IP \[bu] 2 \f[C]RTC_ERROR_OUT_OF_MEMORY\f[R]: There is not enough memory left to complete the operation. .IP \[bu] 2 \f[C]RTC_ERROR_UNSUPPORTED_CPU\f[R]: The CPU is not supported as it does not support the lowest ISA Embree is compiled for. .IP \[bu] 2 \f[C]RTC_ERROR_CANCELLED\f[R]: The operation got canceled by a memory monitor callback or progress monitor callback function. .IP \[bu] 2 \f[C]RTC_ERROR_LEVEL_ZERO_RAYTRACING_SUPPORT_MISSING\f[R]: This error can occur when creating an Embree device with SYCL support using \f[C]rtcNewSYCLDevice\f[R] fails. This error probably means that the GPU driver is to old or not installed properly. Install a new GPU driver and on Linux make sure that the package \f[C]intel-level-zero-gpu-raytracing\f[R] is installed. For general driver installation information for Linux refer to . .PP When the device construction fails, \f[C]rtcNewDevice\f[R] returns \f[C]NULL\f[R] as device. To detect the error code of a such a failed device construction, pass \f[C]NULL\f[R] as device to the \f[C]rtcGetDeviceError\f[R] function. For all other invocations of \f[C]rtcGetDeviceError\f[R], a proper device pointer must be specified. .PP The API function \f[C]rtcGetDeviceLastErrorMessage\f[R] can be used to get more details about the last \f[C]RTCError\f[R] a \f[C]RTCDevice\f[R] encountered. .PP For convenient reporting of a \f[C]RTCError\f[R], the API function \f[C]rtcGetErrorString\f[R] can be used, which returns a string representation of a given \f[C]RTCError\f[R]. .SS EXIT STATUS .PP Returns the error code for the device. .SS SEE ALSO .PP [rtcSetDeviceErrorFunction], [rtcGetDeviceLastErrorMessage], [rtcGetErrorString]