Closed veselypeta closed 1 year ago
I think something like this would be more flexible:
type: typedef
desc: "file descriptor type:"
name: $x_file_descriptor_t
value:
- if: "defined(_WIN32)"
value: HANDLE
- elif: "defined(OTHER_PLATFORM)"
value: other_platform_t
- else:
value: int
For now Bindless Images won't use platform dependant type HANDLE
and just type is as void *
to avoid conditional compilation for windows
Currently in UR we have do not have a mechanism to define types diferently for different platforms i.e. Windows/Linux. This is something that would be helpful in implementing for example a file descriptor type which differs across platforms and would be important to implement bindless images experimental features. See discussion here We can do something similar with macros currently using a
condition: "defined(_WIN32)"
field in theyaml
syntax which will include an additional gaurd for the definition, however the is nothing for other yaml types. The most obvious place would be to add this totypedef
which would allow us to define types differently for different platforms - a potential way this could look would be: