]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix compilation of dpsoftrast.c in MSVC - it doesn't seem to like initializers on...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 31 Jan 2011 00:57:09 +0000 (00:57 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 31 Jan 2011 00:57:09 +0000 (00:57 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10785 d7cf8633-e32d-0410-b094-e92efae38249

darkplaces-wgl.vcproj
dpsoftrast.c

index 73dbd5a1885471aa181f057b81b967964f52d2c4..f36e472dc5858409a485fe768f4d47fdf91fb017 100644 (file)
                                                CompileAs="2"\r
                                        />\r
                                </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Debug|x64"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
                                <FileConfiguration\r
                                        Name="Release|Win32"\r
                                        >\r
                                                CompileAs="2"\r
                                        />\r
                                </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|x64"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               CompileAs="2"\r
+                                       />\r
+                               </FileConfiguration>\r
                        </File>\r
                        <File\r
                                RelativePath=".\dpvsimpledecode.c"\r
index 3ff7095899a26d444c5a10a6a06cf824d86398f3..a6ef6f07aa8d40519fbd853abea4cc6f1ff45c19 100644 (file)
@@ -3585,9 +3585,12 @@ void DPSOFTRAST_Draw_ProcessTriangles(int firstvertex, int numtriangles, const i
 #define SKIPBACKFACE \
                if(cullface != GL_NONE) \
                { \
-                       __m128 triangleedge[2] = { _mm_sub_ps(screen[0], screen[1]), _mm_sub_ps(screen[2], screen[1]) }; \
+                       __m128 triangleedge[2]; \
+                       __m128 trianglenormal; \
+                       triangleedge[0] = _mm_sub_ps(screen[0], screen[1]); \
+                       triangleedge[1] = _mm_sub_ps(screen[2], screen[1]); \
                        /* store normal in 2, 0, 1 order instead of 0, 1, 2 as it requires fewer shuffles and leaves z component accessible as scalar */ \
-                       __m128 trianglenormal = _mm_sub_ss(_mm_mul_ss(triangleedge[0], _mm_shuffle_ps(triangleedge[1], triangleedge[1], _MM_SHUFFLE(3, 0, 2, 1))), \
+                       trianglenormal = _mm_sub_ss(_mm_mul_ss(triangleedge[0], _mm_shuffle_ps(triangleedge[1], triangleedge[1], _MM_SHUFFLE(3, 0, 2, 1))), \
                                                                                        _mm_mul_ss(_mm_shuffle_ps(triangleedge[0], triangleedge[0], _MM_SHUFFLE(3, 0, 2, 1)), triangleedge[1])); \
                        /* apply current cullface mode (this culls many triangles) */ \
                        switch(cullface) \