mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
swr: [rasterizer common] Add InterpolateComponentFlat utility
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
parent
ab04221bf1
commit
ade5351900
1 changed files with 13 additions and 0 deletions
|
|
@ -1122,6 +1122,19 @@ static INLINE simdscalar InterpolateComponent(simdscalar vI, simdscalar vJ, cons
|
||||||
return vplaneps(vA, vB, vC, vI, vJ);
|
return vplaneps(vA, vB, vC, vI, vJ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief Interpolates a single component (flat shade).
|
||||||
|
/// @param pInterpBuffer - pointer to attribute barycentric coeffs
|
||||||
|
template<UINT Attrib, UINT Comp, UINT numComponents = 4>
|
||||||
|
static INLINE simdscalar InterpolateComponentFlat(const float *pInterpBuffer)
|
||||||
|
{
|
||||||
|
const float *pInterpA = &pInterpBuffer[Attrib * 3 * numComponents + 0 + Comp];
|
||||||
|
|
||||||
|
simdscalar vA = _simd_broadcast_ss(pInterpA);
|
||||||
|
|
||||||
|
return vA;
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Interpolates a single component.
|
/// @brief Interpolates a single component.
|
||||||
/// @param vI - barycentric I
|
/// @param vI - barycentric I
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue