Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl_codegen.c:
{ var = entry_func->parameters.vars[i];
if (var->data_type->class == HLSL_CLASS_OBJECT || (var->storage_modifiers & HLSL_STORAGE_UNIFORM))
if (hlsl_type_is_resource(var->data_type) || (var->storage_modifiers & HLSL_STORAGE_UNIFORM))
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.