On Tue Apr 18 12:21:16 2023 +0000, Henri Verbeet wrote:
+ if (!strcmp(attr->name, "unroll")) + { + if (attr->args_count) + { + hlsl_error(ctx, loc,
VKD3D_SHADER_ERROR_HLSL_NOT_IMPLEMENTED, "Unroll attribute with iteration count.");
}
else
{
FIXME("Loop unrolling is not implemented.\n");
}
}
vkd3d-shader/hlsl has been fairly decent about using the proper channels to report compilation issues; why are we introducing a FIXME here instead of using e.g. hlsl_warning()?
My interpretation is that `hlsl_warning()` is for what the shader writer should change, while `FIXME()` is for what we should change. In this case, it is us who have to fix our code. I wouldn't use `hlsl_fixme()` either, because that kind of means "We have to fix our code, but since we don't want to give the client invalid code we also pretend there was a compilation error". Here we're not miscompiling, assuming that the fact that loops are unrolled or not is an implementation detail, so to me `FIXME()` really feels the best alternative.