Fix promotion of floats to doubles

Use the f variants of the math functions if the input parameter is a
float, saves converting from float to double and running the double
variant of the math function for gaining no precision at all

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3969>
This commit is contained in:
Albert Astals Cid
2020-02-26 23:05:51 +01:00
committed by Albert Astals Cid
parent 94cb129d51
commit 06c5875fd6
12 changed files with 34 additions and 34 deletions

View File

@@ -539,7 +539,7 @@ _mesa_get_min_invocations_per_fragment(struct gl_context *ctx,
SYSTEM_BIT_SAMPLE_POS)))
return MAX2(_mesa_geometric_samples(ctx->DrawBuffer), 1);
else if (ctx->Multisample.SampleShading)
return MAX2(ceil(ctx->Multisample.MinSampleShadingValue *
return MAX2(ceilf(ctx->Multisample.MinSampleShadingValue *
_mesa_geometric_samples(ctx->DrawBuffer)), 1);
else
return 1;