Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl_codegen.c:
+ /* Find the corresponding sampler array (or single sample component) in the path. */ + sampler_array_type = sample->resource.var->data_type; + for (i = 0; i <= sample->resource.path_len; ++i) + { + if (hlsl_type_is_resource(sampler_array_type)) + { + path_len_to_sampler_array = i; + break; + } + assert(i < sample->resource.path_len); + sampler_array_type = hlsl_get_element_type_from_path_index(ctx, sampler_array_type, sample->resource.path[i].node); + } + assert(hlsl_type_get_regset(sampler_array_type) == HLSL_REGSET_SAMPLERS); + + hlsl_copy_deref(ctx, &deref_to_sampler_array, &sample->resource); + hlsl_strip_deref_suffix(ctx, &deref_to_sampler_array, path_len_to_sampler_array); This seems very complicated, especially this deref manipulation.
I'm rather tempted to propose that we just leave off handling anything but top-level sm1 variables for an hlsl_fixme(). For that matter, do we even have anything that actually needs this combined-sampler logic? -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/209#note_33307