mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 02:00:21 +01:00
swr/rast: add flat shading
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
parent
9d01f4d631
commit
ae436203d9
1 changed files with 13 additions and 0 deletions
|
|
@ -305,6 +305,19 @@ static SIMDINLINE simdscalar InterpolateComponentFlat(const float* pInterpBuffer
|
|||
return vA;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Interpolates a single component (flat shade).
|
||||
/// @param pInterpBuffer - pointer to attribute barycentric coeffs
|
||||
template <UINT Attrib, UINT Comp, UINT numComponents = 4>
|
||||
static SIMDINLINE simdscalari InterpolateComponentFlatInt(const uint32_t* pInterpBuffer)
|
||||
{
|
||||
const uint32_t interpA = pInterpBuffer[Attrib * 3 * numComponents + 0 + Comp];
|
||||
|
||||
simdscalari vA = _simd_set1_epi32(interpA);
|
||||
|
||||
return vA;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Interpolates a single component.
|
||||
/// @param vI - barycentric I
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue