You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to port some C# code to work on the GPU with the hope of coming up with solutions to all the porting problems I'll encounter when I tackle the code I want to run on the GPU.
Some issues I've overcome easily, i.e. Enums (still, it would be awesome if it wasn't necessary to convert to ints). Others are a little harder, i.e. a way to handle strings (I have a plan in mind using an ArrayPool approach and storing the values in a unit array, wish shaders supported byte arrays).
The one I'm stuck on though is passing a struct to another, i.e.
CS8377 The type 'SecondaryStruct' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'ReadWriteBuffer<T>' ComputeShaderTest
Is there a way to work around this issue? i.e. somehow make Runner a global variable that I can access within SecondaryStruct?
By the way, an amazing library you and everyone who has contributed have put together here. Thanks for all the hard effort that you've put into it.
The text was updated successfully, but these errors were encountered:
I'm trying to port some C# code to work on the GPU with the hope of coming up with solutions to all the porting problems I'll encounter when I tackle the code I want to run on the GPU.
Some issues I've overcome easily, i.e. Enums (still, it would be awesome if it wasn't necessary to convert to ints). Others are a little harder, i.e. a way to handle strings (I have a plan in mind using an ArrayPool approach and storing the values in a unit array, wish shaders supported byte arrays).
The one I'm stuck on though is passing a struct to another, i.e.
I get a warning:
CS8377 The type 'SecondaryStruct' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'ReadWriteBuffer<T>' ComputeShaderTest
Is there a way to work around this issue? i.e. somehow make Runner a global variable that I can access within SecondaryStruct?
By the way, an amazing library you and everyone who has contributed have put together here. Thanks for all the hard effort that you've put into it.
The text was updated successfully, but these errors were encountered: