Skip to content

32-bit builds are broken since version 4.3.0 #548

Description

@danfe

Since version 4.3.0 the build fails on 32-bit architectures (as seen on i686) like this:

[...]/embree-4.4.0/tutorials/forest/forest_device.ispc:131:3:
    Error: Unable to find any matching overload for call to function
    "rtcSetDeviceMemoryMonitorFunction".
    Passed types: (uniform struct RTCDeviceTy * uniform, unmasked uniform
    bool(void * uniform ptr, uniform int64 bytes, uniform bool post), void
    * uniform)

  rtcSetDeviceMemoryMonitorFunction(g_device, monitorMemoryFunction, NULL);
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Commit 09cd83e had introduced a discrepancy between two functions: bool monitorMemoryFunction(void* userPtr, ssize_t bytes, bool post) and unmasked uniform bool monitorMemoryFunction(void* uniform ptr, uniform int64 bytes, uniform bool post) in tutorials/forest/forest_device.*. Apparently, the problem is that ssize_t being platform-dependent and usually matching machine word width, while the second function hardcodes int64. I believe it was chosen because there is no ISPC ssize_t type, but perhaps using signed type for byte count is wrong in the first place?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions