On Thu Feb 15 23:19:36 2024 +0000, Francisco Casas wrote:
I'd just leave them empty/unspecified, or in this case I guess set
them to zero. The current implementation sets them to zero, I don't think that the extra `0, 0,` on the table rows matter much.
Alternatively we could move them to the end of the enum.
If we move them, HLSL_SAMPLER_DIM_LAST_SAMPLER may lost its meaning.
Or even think about removing them from it entirely; they pretty much
don't act like normal HLSL_TYPE_TEXTURE in any way I think? Yep, the sampler types are a little coupled with the texture types. We could split the enum or add "sampler_dim_generic" and "sampler_dim_cmp" flags to hlsl_type. Either way, the change seems big, I wouldn't want them to get in the way of this MR :(
I just had an idea: what about introducing: `HLSL_SAMPLER_DIM_FIRST_TEXTURE` and use it instead of `-2`.