Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4584>
if (ctx->Texture.CurrentUnit < ARRAY_SIZE(ctx->Texture.FixedFuncUnit)) {
unsigned index = ctx->Texture.CurrentUnit;
*p = ((char *)&ctx->Texture.FixedFuncUnit[index] + d->offset);
+ return d;
}
- return d;
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(pname=%s,unit=%d)", func,
+ _mesa_enum_to_string(pname),
+ ctx->Texture.CurrentUnit);
+ return &error_value;
case LOC_CUSTOM:
find_custom_value(ctx, d, v);
*p = v;