Skip to content

Commit 75acaaf

Browse files
committed
add missing device properties to helide
1 parent 96f6fea commit 75acaaf

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

src/devices/helide/HelideDevice.cpp

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99
#include "array/ObjectArray.h"
1010
#include "frame/Frame.h"
1111
#include "scene/volume/spatial_field/SpatialField.h"
12+
// std
13+
#include <limits>
1214

1315
#include "anari_library_helide_queries.h"
1416

1517
namespace helide {
1618

17-
///////////////////////////////////////////////////////////////////////////////
18-
// HelideDevice definitions ///////////////////////////////////////////////////
19-
///////////////////////////////////////////////////////////////////////////////
20-
2119
// Data Arrays ////////////////////////////////////////////////////////////////
2220

2321
void *HelideDevice::mapArray(ANARIArray a)
@@ -294,6 +292,30 @@ int HelideDevice::deviceGetProperty(
294292
if (prop == "extension" && type == ANARI_STRING_LIST) {
295293
helium::writeToVoidP(mem, query_extensions());
296294
return 1;
295+
} else if (prop == "version" && type == ANARI_INT32) {
296+
int version = ANARI_SDK_VERSION_MAJOR * 1000
297+
+ ANARI_SDK_VERSION_MINOR * 100
298+
+ ANARI_SDK_VERSION_PATCH;
299+
helium::writeToVoidP(mem, version);
300+
return 1;
301+
} else if (prop == "version.major" && type == ANARI_INT32) {
302+
helium::writeToVoidP(mem, int(ANARI_SDK_VERSION_MAJOR));
303+
return 1;
304+
} else if (prop == "version.minor" && type == ANARI_INT32) {
305+
helium::writeToVoidP(mem, int(ANARI_SDK_VERSION_MINOR));
306+
return 1;
307+
} else if (prop == "version.patch" && type == ANARI_INT32) {
308+
helium::writeToVoidP(mem, int(ANARI_SDK_VERSION_PATCH));
309+
return 1;
310+
} else if (prop == "anariVersion.major" && type == ANARI_INT32) {
311+
helium::writeToVoidP(mem, 1);
312+
return 1;
313+
} else if (prop == "anariVersion.minor" && type == ANARI_INT32) {
314+
helium::writeToVoidP(mem, 1);
315+
return 1;
316+
} else if (prop == "geometryMaxIndex" && type == ANARI_UINT64) {
317+
helium::writeToVoidP(mem, uint64_t(std::numeric_limits<uint32_t>::max()));
318+
return 1;
297319
} else if (prop == "helide" && type == ANARI_BOOL) {
298320
helium::writeToVoidP(mem, true);
299321
return 1;

0 commit comments

Comments
 (0)