On Fri Jun 2 09:52:49 2023 +0000, Nikolay Sivov wrote:
Another option is to retain original 1D dim value and carry it all the way to lower_tex_proj(), but it will produce awkward combination of dim and coordinates types that is resolved too late and for each binary format, when writing declarations.
After some thought, I think that what we are missing is a pass that lowers 1D combined samples to 2D. But **only** combined samples. So we end up with something like:
```c // Only 1D combined samples (with load->sampler == NULL) get converted into 2D. hlsl_transform_ir(ctx, lower_1d_combined_samples_to_2d, body, NULL); // ... if (profile->major_version >= 4) { hlsl_transform_ir(ctx, lower_tex_proj, body, NULL); } // ... if (profile->major_version >= 4) { hlsl_transform_ir(ctx, lower_combined_samples, body, NULL); // From !209 } // ... ```
If we do this, you wouldn't have to worry about 1D HLSL_RESOURCE_SAMPLE_PROJ here.