[Mesa-dev] [PATCH 3/4] MSVC2013: Work around internal compiler error

Ian Romanick idr at freedesktop.org
Tue Jan 7 14:05:26 PST 2014


On 01/07/2014 12:31 PM, Thomas Sondergaard wrote:
> This small rearrangement avoids MSVC 2013 ICE. Also, this should be a better
> memory access order.

Can you explain this better?  As far as I can tell, this just changes
the order the indices are visited (and has a spurious, incorrect
whitespace change).  This shouldn't affect the correctness of the code
at all.

> ---
>  src/gallium/drivers/softpipe/sp_quad_blend.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/gallium/drivers/softpipe/sp_quad_blend.c b/src/gallium/drivers/softpipe/sp_quad_blend.c
> index 48d1a2e..174e60c 100644
> --- a/src/gallium/drivers/softpipe/sp_quad_blend.c
> +++ b/src/gallium/drivers/softpipe/sp_quad_blend.c
> @@ -860,9 +860,9 @@ clamp_colors(float (*quadColor)[4])
>  {
>     unsigned i, j;
>  
> -   for (j = 0; j < TGSI_QUAD_SIZE; j++) {
> -      for (i = 0; i < 4; i++) {
> -         quadColor[i][j] = CLAMP(quadColor[i][j], 0.0F, 1.0F);
> +   for (i = 0; i < 4; i++) {
> +      for (j = 0; j < TGSI_QUAD_SIZE; j++) {
> +          quadColor[i][j] = CLAMP(quadColor[i][j], 0.0F, 1.0F);
>        }
>     }
>  }
> 



More information about the mesa-dev mailing list