Open expenses opened 1 year ago
Thank you for reporting this. We will address this either as part of a small maintenance update or the next version.
Finding a platform-independent solution for the export declaration is definitely possible but your other changes leave me a little curious.
I do not see an obvious requirement for the usage of uint8_t
pointers instead of void
pointers and unsigned char
strings instead of const char
ones that is linux specific. Would you mind elaborating on these changes?
@FlorianHerickAMD
Without that I get these errors:
3d.rpsl.g.c:588:10: error: conflicting types for ‘___rpsl_node_call’; have ‘uint32_t(uint32_t, uint32_t, uint8_t **, uint32_t, uint32_t)’ {aka ‘unsigned int(unsigned int, unsigned int, unsigned char **, unsigned int, unsigned int)’}
588 | uint32_t ___rpsl_node_call(uint32_t, uint32_t, uint8_t**, uint32_t, uint32_t);
| ^~~~~~~~~~~~~~~~~
In file included from <command-line>:
./RenderPipelineShaders/src/runtime/common/rps_rpsl_host_dll.c:100:10: note: previous definition of ‘___rpsl_node_call’ with type ‘uint32_t(uint32_t, uint32_t, void **, uint32_t, uint32_t)’ {aka ‘unsigned int(unsigned int, unsigned int, void **, unsigned int, unsigned int)’}
100 | uint32_t ___rpsl_node_call(
| ^~~~~~~~~~~~~~~~~
3d.rpsl.g.c:590:6: error: conflicting types for ‘___rpsl_describe_handle’; have ‘void(uint8_t *, uint32_t, uint32_t *, uint32_t)’ {aka ‘void(unsigned char *, unsigned int, unsigned int *, unsigned int)’}
590 | void ___rpsl_describe_handle(uint8_t*, uint32_t, uint32_t*, uint32_t);
The output C file from rps-hlslc
contains different functions declarations from what's in RenderPipelineShaders/src/runtime/common/rps_rpsl_host_dll.c
:
/* Function Declarations */
static struct texture _BA__PD_make_default_texture_view_from_desc_AE__AE_YA_PD_AUtexture_AE__AE_IUResourceDesc_AE__AE__AE_Z(uint32_t, struct ResourceDesc*) __ATTRIBUTELIST__((nothrow)) __asm__ ("?make_default_texture_view_from_desc@@YA?AUtexture@@IUResourceDesc@@@Z");
uint32_t _BA__PD_bloom_mips_for_dimensions_AE__AE_YAIII_AE_Z(uint32_t, uint32_t) __ATTRIBUTELIST__((always_inline, nothrow)) __asm__ ("?bloom_mips_for_dimensions@@YAIII@Z");
void _BA__PD_compute_bloom_from_hdr_AE__AE_YAXUtexture_AE__AE_UFilterConstants_AE__AE__AE_Z(struct texture*, struct FilterConstants*) __ATTRIBUTELIST__((always_inline, nothrow)) __asm__ ("?compute_bloom_from_hdr@@YAXUtexture@@UFilterConstants@@@Z");
void rpsl_M_3d_Fn_hello_rpsl(struct texture*, struct FilterConstants*) __ATTRIBUTELIST__((nothrow));
void ___rpsl_abort(uint32_t);
uint32_t ___rpsl_node_call(uint32_t, uint32_t, uint8_t**, uint32_t, uint32_t);
void ___rpsl_block_marker(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
void ___rpsl_describe_handle(uint8_t*, uint32_t, uint32_t*, uint32_t);
uint32_t ___rpsl_create_resource(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
void ___rpsl_name_resource(uint32_t, uint8_t*, uint32_t);
uint32_t ___rpsl_dxop_binary_i32(uint32_t, uint32_t, uint32_t);
void rpsl_M_3d_Fn_hello_rpsl_wrapper(uint32_t, uint8_t**, uint32_t) __ATTRIBUTELIST__((noinline, nothrow));
Could you share with us your specific OS information, e.g. the output of cat /etc/os-release
and the rpsl file used as source for the compiler? We are currently diagnosing an issue with the compiler that may be the cause of this.
I had to make the below changes to
rps_rpsl_host_dll.c
to get dynamic libraries to work on Linux. Not sure how portable these changes are back to windows but I'm sure it's possible to work out something more platform-independent.