Module: Mesa
Branch: master
Commit: 63d7ed835ada99f13441c5008ef32bdd6868c069
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=63d7ed835ada99f13441c5008ef32bdd6868c069

Author: Tim Rowley <timothy.o.row...@intel.com>
Date:   Tue May 10 12:55:18 2016 -0600

swr: [rasterizer core] move MultisampleTrait static from header to cpp

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.chern...@intel.com>

---

 src/gallium/drivers/swr/rasterizer/core/format_types.h  | 2 ++
 src/gallium/drivers/swr/rasterizer/core/multisample.cpp | 5 +++--
 src/gallium/drivers/swr/rasterizer/core/multisample.h   | 4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/swr/rasterizer/core/format_types.h 
b/src/gallium/drivers/swr/rasterizer/core/format_types.h
index c680626..afb6337 100644
--- a/src/gallium/drivers/swr/rasterizer/core/format_types.h
+++ b/src/gallium/drivers/swr/rasterizer/core/format_types.h
@@ -27,6 +27,8 @@
 ******************************************************************************/
 #pragma once
 
+#include "utils.h"
+
 //////////////////////////////////////////////////////////////////////////
 /// PackTraits - Helpers for packing / unpacking same pixel sizes
 //////////////////////////////////////////////////////////////////////////
diff --git a/src/gallium/drivers/swr/rasterizer/core/multisample.cpp 
b/src/gallium/drivers/swr/rasterizer/core/multisample.cpp
index 643ba13..94992e3 100644
--- a/src/gallium/drivers/swr/rasterizer/core/multisample.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/multisample.cpp
@@ -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 };
diff --git a/src/gallium/drivers/swr/rasterizer/core/multisample.h 
b/src/gallium/drivers/swr/rasterizer/core/multisample.h
index 7213a38..a52e8ac 100644
--- a/src/gallium/drivers/swr/rasterizer/core/multisample.h
+++ b/src/gallium/drivers/swr/rasterizer/core/multisample.h
@@ -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;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to