On Fri Apr 14 00:45:44 2023 +0000, Zebediah Figura wrote:
I've spent far too much time noticing other things that also aren't quite right, but here's another :-/ hlsl_type_is_resource() is always suspicious because the answer to "what about structs?" is "mu". In this case, if we have a struct that contains both resources and non-resources, we actually need to do both prepend_uniform_copy() and prepend_input_var_copy() on it. I'm not going to block this patch or even this hunk based on that, since it's not making anything worse (rather the opposite—I'd rather this just get in), but I would appreciate a fixme comment.
Yes, I think that the proper solution would be to implement a recursive version of prepend_uniform_copy() with similar structure as in commit b7885fe5b4709e5b7f2a258a418567124ae3c61a from !148, and always calling it.
For now, I added a patch for emitting a fixme for the missing uniform copies for objects within structs.