In my host I prepare a buffer with different kind of informations (different types of structures). And so, in my kernel I would like to get this information :
I have try this :
__constant char* buffer = ....
BSDFParam_area_light bsdf = *((BSDFParam_area_light*)buffer);
But I got an error message : "error: invalid type conversion"
Do you have a solution ?
What is the definition of structure you are using?I doubt it is just a char* inside the structure.
I feel you can convert the buffer variable into some element of the structure but not to an instance of the structure itself.