Merge branch 'master' into jgrpp
# Conflicts: # src/3rdparty/squirrel/include/squirrel.h # src/blitter/32bpp_sse_func.hpp # src/bridge_map.h # src/clear_map.h # src/company_manager_face.h # src/console_func.h # src/core/bitmath_func.hpp # src/core/endian_func.hpp # src/core/random_func.hpp # src/depot_map.h # src/elrail_func.h # src/fontcache.h # src/industry_map.h # src/map_func.h # src/newgrf_spritegroup.h # src/object_map.h # src/rail.h # src/rail_map.h # src/road_func.h # src/road_map.h # src/saveload/saveload.h # src/saveload/saveload_error.hpp # src/settings_gui.cpp # src/sl/oldloader.h # src/sprite.h # src/spritecache.h # src/station_func.h # src/station_map.h # src/story_base.h # src/strings_func.h # src/tile_cmd.h # src/tile_map.h # src/tile_type.h # src/town.h # src/town_map.h # src/tree_map.h # src/tunnel_map.h # src/tunnelbridge_map.h # src/vehicle_func.h # src/viewport_func.h # src/void_map.h # src/water.h # src/water_map.h # src/widget_type.h
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#ifdef WITH_SSE
|
||||
|
||||
GNU_TARGET(SSE_TARGET)
|
||||
static inline void InsertFirstUint32(const uint32 value, __m128i &into)
|
||||
inline void InsertFirstUint32(const uint32_t value, __m128i &into)
|
||||
{
|
||||
#if (SSE_VERSION >= 4)
|
||||
into = _mm_insert_epi32(into, value, 0);
|
||||
@@ -24,7 +24,7 @@ static inline void InsertFirstUint32(const uint32 value, __m128i &into)
|
||||
}
|
||||
|
||||
GNU_TARGET(SSE_TARGET)
|
||||
static inline void InsertSecondUint32(const uint32 value, __m128i &into)
|
||||
inline void InsertSecondUint32(const uint32_t value, __m128i &into)
|
||||
{
|
||||
#if (SSE_VERSION >= 4)
|
||||
into = _mm_insert_epi32(into, value, 1);
|
||||
@@ -35,7 +35,7 @@ static inline void InsertSecondUint32(const uint32 value, __m128i &into)
|
||||
}
|
||||
|
||||
GNU_TARGET(SSE_TARGET)
|
||||
static inline void LoadUint64(const uint64 value, __m128i &into)
|
||||
inline void LoadUint64(const uint64_t value, __m128i &into)
|
||||
{
|
||||
#ifdef POINTER_IS_64BIT
|
||||
into = _mm_cvtsi64_si128(value);
|
||||
@@ -50,7 +50,7 @@ static inline void LoadUint64(const uint64 value, __m128i &into)
|
||||
}
|
||||
|
||||
GNU_TARGET(SSE_TARGET)
|
||||
static inline __m128i PackUnsaturated(__m128i from, const __m128i &mask)
|
||||
inline __m128i PackUnsaturated(__m128i from, const __m128i &mask)
|
||||
{
|
||||
#if (SSE_VERSION == 2)
|
||||
from = _mm_and_si128(from, mask); // PAND, wipe high bytes to keep low bytes when packing
|
||||
@@ -61,7 +61,7 @@ static inline __m128i PackUnsaturated(__m128i from, const __m128i &mask)
|
||||
}
|
||||
|
||||
GNU_TARGET(SSE_TARGET)
|
||||
static inline __m128i DistributeAlpha(const __m128i from, const __m128i &mask)
|
||||
inline __m128i DistributeAlpha(const __m128i from, const __m128i &mask)
|
||||
{
|
||||
#if (SSE_VERSION == 2)
|
||||
__m128i alphaAB = _mm_shufflelo_epi16(from, 0x3F); // PSHUFLW, put alpha1 in front of each rgb1
|
||||
@@ -73,7 +73,7 @@ static inline __m128i DistributeAlpha(const __m128i from, const __m128i &mask)
|
||||
}
|
||||
|
||||
GNU_TARGET(SSE_TARGET)
|
||||
static inline __m128i AlphaBlendTwoPixels(__m128i src, __m128i dst, const __m128i &distribution_mask, const __m128i &pack_mask, const __m128i &alpha_mask)
|
||||
inline __m128i AlphaBlendTwoPixels(__m128i src, __m128i dst, const __m128i &distribution_mask, const __m128i &pack_mask, const __m128i &alpha_mask)
|
||||
{
|
||||
__m128i srcAB = _mm_unpacklo_epi8(src, _mm_setzero_si128()); // PUNPCKLBW, expand each uint8 into uint16
|
||||
__m128i dstAB = _mm_unpacklo_epi8(dst, _mm_setzero_si128());
|
||||
@@ -97,7 +97,7 @@ static inline __m128i AlphaBlendTwoPixels(__m128i src, __m128i dst, const __m128
|
||||
* rgb = rgb * ((256/4) * 4 - (alpha/4)) / ((256/4) * 4)
|
||||
*/
|
||||
GNU_TARGET(SSE_TARGET)
|
||||
static inline __m128i DarkenTwoPixels(__m128i src, __m128i dst, const __m128i &distribution_mask, const __m128i &tr_nom_base)
|
||||
inline __m128i DarkenTwoPixels(__m128i src, __m128i dst, const __m128i &distribution_mask, const __m128i &tr_nom_base)
|
||||
{
|
||||
__m128i srcAB = _mm_unpacklo_epi8(src, _mm_setzero_si128());
|
||||
__m128i dstAB = _mm_unpacklo_epi8(dst, _mm_setzero_si128());
|
||||
@@ -145,7 +145,7 @@ IGNORE_UNINITIALIZED_WARNING_STOP
|
||||
/** ReallyAdjustBrightness() is not called that often.
|
||||
* Inlining this function implies a far jump, which has a huge latency.
|
||||
*/
|
||||
static inline Colour AdjustBrightneSSE(Colour colour, uint8 brightness)
|
||||
inline Colour AdjustBrightneSSE(Colour colour, uint8_t brightness)
|
||||
{
|
||||
/* Shortcut for normal brightness. */
|
||||
if (likely(brightness == Blitter_32bppBase::DEFAULT_BRIGHTNESS)) return colour;
|
||||
@@ -154,7 +154,7 @@ static inline Colour AdjustBrightneSSE(Colour colour, uint8 brightness)
|
||||
}
|
||||
|
||||
GNU_TARGET(SSE_TARGET)
|
||||
static inline __m128i AdjustBrightnessOfTwoPixels(__m128i from, uint32 brightness)
|
||||
inline __m128i AdjustBrightnessOfTwoPixels([[maybe_unused]] __m128i from, [[maybe_unused]] uint32_t brightness)
|
||||
{
|
||||
#if (SSE_VERSION < 3)
|
||||
NOT_REACHED();
|
||||
|
Reference in New Issue
Block a user