swr: [rasterizer core] move MultisampleTrait static from header to cpp
authorTim Rowley <timothy.o.rowley@intel.com>
Tue, 10 May 2016 18:55:18 +0000 (12:55 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Thu, 19 May 2016 21:26:54 +0000 (16:26 -0500)
Move a MultisampleTrait static from header to cpp as clang seemed to get
confused with some specializations in the header vs some in cpp.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/format_types.h
src/gallium/drivers/swr/rasterizer/core/multisample.cpp
src/gallium/drivers/swr/rasterizer/core/multisample.h

index c68062609d828719b014cefbdf8b9d8d5a288586..afb63378c0dc9ce12289c8cfbb82c4ddeda840ae 100644 (file)
@@ -27,6 +27,8 @@
 ******************************************************************************/
 #pragma once
 
+#include "utils.h"
+
 //////////////////////////////////////////////////////////////////////////
 /// PackTraits - Helpers for packing / unpacking same pixel sizes
 //////////////////////////////////////////////////////////////////////////
index 643ba1338082766af039b36f270ba85ae9fa79d1..94992e3076563c4206ec337317ccf23c8ab154ef 100644 (file)
@@ -25,7 +25,8 @@
 ******************************************************************************/
 
 #include "multisample.h"
-
+const uint32_t MultisampleTraits<SWR_MULTISAMPLE_1X>::samplePosXi {0x80};
+const uint32_t MultisampleTraits<SWR_MULTISAMPLE_1X>::samplePosYi {0x80};
 const uint32_t MultisampleTraits<SWR_MULTISAMPLE_2X>::samplePosXi[2] {0xC0, 0x40};
 const uint32_t MultisampleTraits<SWR_MULTISAMPLE_2X>::samplePosYi[2] {0xC0, 0x40};
 const uint32_t MultisampleTraits<SWR_MULTISAMPLE_4X>::samplePosXi[4] {0x60, 0xE0, 0x20, 0xA0};
@@ -61,4 +62,4 @@ const float MultisampleTraits<SWR_MULTISAMPLE_8X, SWR_MSAA_CENTER_PATTERN>::samp
 const float MultisampleTraits<SWR_MULTISAMPLE_16X, SWR_MSAA_CENTER_PATTERN>::samplePosX[16]
 { 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f };
 const float MultisampleTraits<SWR_MULTISAMPLE_16X, SWR_MSAA_CENTER_PATTERN>::samplePosY[16]
-{ 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f };
\ No newline at end of file
+{ 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f };
index 7213a386da311f3becd94f92f2a0531f03746a3e..a52e8ac10653b3dc9143bafb860a60dd95d008a6 100644 (file)
@@ -120,8 +120,8 @@ struct MultisampleTraits<SWR_MULTISAMPLE_1X, SWR_MSAA_STANDARD_PATTERN>
 
     INLINE static simdscalari FullSampleMask(){return _simd_set1_epi32(0x1);};
 
-    static const uint32_t samplePosXi {0x80};
-    static const uint32_t samplePosYi {0x80};
+    static const uint32_t samplePosXi;
+    static const uint32_t samplePosYi;
     static const float samplePosX;
     static const float samplePosY;
     static const uint32_t numSamples = 1;