From 63d7ed835ada99f13441c5008ef32bdd6868c069 Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Tue, 10 May 2016 12:55:18 -0600 Subject: [PATCH] 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 --- 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 c68062609d8..afb63378c0d 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 643ba133808..94992e30765 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::samplePosXi {0x80}; +const uint32_t MultisampleTraits::samplePosYi {0x80}; const uint32_t MultisampleTraits::samplePosXi[2] {0xC0, 0x40}; const uint32_t MultisampleTraits::samplePosYi[2] {0xC0, 0x40}; const uint32_t MultisampleTraits::samplePosXi[4] {0x60, 0xE0, 0x20, 0xA0}; @@ -61,4 +62,4 @@ const float MultisampleTraits::samp const float MultisampleTraits::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::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 7213a386da3..a52e8ac1065 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 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; -- 2.30.2