From: Brian Paul Date: Wed, 20 Mar 2013 16:56:24 +0000 (-0600) Subject: softpipe: silence some MSVC float/double warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e3200d4636d61c936bdacf6752b82dd39c96dcb;p=mesa.git softpipe: silence some MSVC float/double warnings --- diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c index 8cb4fc16133..3dad131d881 100644 --- a/src/gallium/drivers/softpipe/sp_setup.c +++ b/src/gallium/drivers/softpipe/sp_setup.c @@ -578,15 +578,15 @@ setup_fragcoord_coeff(struct setup_context *setup, uint slot) const struct tgsi_shader_info *fsInfo = &setup->softpipe->fs_variant->info; /*X*/ - setup->coef[slot].a0[0] = fsInfo->pixel_center_integer ? 0.0 : 0.5; - setup->coef[slot].dadx[0] = 1.0; - setup->coef[slot].dady[0] = 0.0; + setup->coef[slot].a0[0] = fsInfo->pixel_center_integer ? 0.0f : 0.5f; + setup->coef[slot].dadx[0] = 1.0f; + setup->coef[slot].dady[0] = 0.0f; /*Y*/ setup->coef[slot].a0[1] = (fsInfo->origin_lower_left ? setup->softpipe->framebuffer.height-1 : 0) - + (fsInfo->pixel_center_integer ? 0.0 : 0.5); - setup->coef[slot].dadx[1] = 0.0; - setup->coef[slot].dady[1] = fsInfo->origin_lower_left ? -1.0 : 1.0; + + (fsInfo->pixel_center_integer ? 0.0f : 0.5f); + setup->coef[slot].dadx[1] = 0.0f; + setup->coef[slot].dady[1] = fsInfo->origin_lower_left ? -1.0f : 1.0f; /*Z*/ setup->coef[slot].a0[2] = setup->posCoef.a0[2]; setup->coef[slot].dadx[2] = setup->posCoef.dadx[2];