swr: [rasterizer] warning cleanup
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
@@ -59,13 +59,6 @@
|
||||
|
||||
#else
|
||||
|
||||
#if SWR_ENABLE_ASSERTS
|
||||
#if defined(assert)
|
||||
#undef assert
|
||||
#endif
|
||||
#define assert(exp) SWR_ASSERT(exp)
|
||||
#endif
|
||||
|
||||
bool SwrAssert(
|
||||
bool chkDebugger,
|
||||
bool& enabled,
|
||||
@@ -87,6 +80,12 @@ bool SwrAssert(
|
||||
|
||||
#if SWR_ENABLE_ASSERTS
|
||||
#define SWR_ASSERT(e, ...) _SWR_ASSERT(true, e, ##__VA_ARGS__)
|
||||
|
||||
#if defined(assert)
|
||||
#undef assert
|
||||
#endif
|
||||
#define assert(exp) SWR_ASSERT(exp)
|
||||
|
||||
#endif
|
||||
|
||||
#if SWR_ENABLE_REL_ASSERTS
|
||||
@@ -97,11 +96,11 @@ bool SwrAssert(
|
||||
#endif // SWR_ENABLE_ASSERTS || SWR_ENABLE_REL_ASSERTS
|
||||
|
||||
#if !SWR_ENABLE_ASSERTS
|
||||
#define SWR_ASSERT(e, ...)
|
||||
#define SWR_ASSERT(e, ...) (void)(0)
|
||||
#endif
|
||||
|
||||
#if !SWR_ENABLE_REL_ASSERTS
|
||||
#define SWR_REL_ASSERT(e, ...)
|
||||
#define SWR_REL_ASSERT(e, ...) (void)(0)
|
||||
#endif
|
||||
|
||||
#define SWR_NOT_IMPL SWR_ASSERT(0, "%s not implemented", __FUNCTION__)
|
||||
|
||||
@@ -37,30 +37,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
const __m128 vTileOffsetsX = {0.5, KNOB_TILE_X_DIM - 0.5, 0.5, KNOB_TILE_X_DIM - 0.5};
|
||||
const __m128 vTileOffsetsY = {0.5, 0.5, KNOB_TILE_Y_DIM - 0.5, KNOB_TILE_Y_DIM - 0.5};
|
||||
|
||||
/// @todo move to common lib
|
||||
#define MASKTOVEC(i3,i2,i1,i0) {-i0,-i1,-i2,-i3}
|
||||
static const __m128 gMaskToVec[] = {
|
||||
MASKTOVEC(0,0,0,0),
|
||||
MASKTOVEC(0,0,0,1),
|
||||
MASKTOVEC(0,0,1,0),
|
||||
MASKTOVEC(0,0,1,1),
|
||||
MASKTOVEC(0,1,0,0),
|
||||
MASKTOVEC(0,1,0,1),
|
||||
MASKTOVEC(0,1,1,0),
|
||||
MASKTOVEC(0,1,1,1),
|
||||
MASKTOVEC(1,0,0,0),
|
||||
MASKTOVEC(1,0,0,1),
|
||||
MASKTOVEC(1,0,1,0),
|
||||
MASKTOVEC(1,0,1,1),
|
||||
MASKTOVEC(1,1,0,0),
|
||||
MASKTOVEC(1,1,0,1),
|
||||
MASKTOVEC(1,1,1,0),
|
||||
MASKTOVEC(1,1,1,1),
|
||||
};
|
||||
|
||||
typedef void(*PFN_CLEAR_TILES)(DRAW_CONTEXT*, SWR_RENDERTARGET_ATTACHMENT rt, uint32_t, DWORD[4]);
|
||||
static PFN_CLEAR_TILES sClearTilesTable[NUM_SWR_FORMATS];
|
||||
|
||||
|
||||
@@ -620,7 +620,6 @@ template<> struct TypeTraits<SWR_TYPE_FLOAT, 16> : PackTraits<16>
|
||||
|
||||
static const uint32_t HALF_EXP_BITS = 5;
|
||||
static const uint32_t HALF_MANTISSA_BITS = 10;
|
||||
static const uint32_t HALF_MANTISSA_MASK = (1U << HALF_MANTISSA_BITS) - 1;
|
||||
static const uint32_t HALF_EXP_MASK = ((1U << HALF_EXP_BITS) - 1) << HALF_MANTISSA_BITS;
|
||||
|
||||
// minimum exponent required, exponents below this are flushed to 0.
|
||||
|
||||
@@ -1125,10 +1125,7 @@ static void TessellationStages(
|
||||
{
|
||||
simdvector prim[3]; // Only deal with triangles, lines, or points
|
||||
RDTSC_START(FEPAAssemble);
|
||||
#if SWR_ENABLE_ASSERTS
|
||||
bool assemble =
|
||||
#endif
|
||||
tessPa.Assemble(VERTEX_POSITION_SLOT, prim);
|
||||
bool assemble = tessPa.Assemble(VERTEX_POSITION_SLOT, prim);
|
||||
RDTSC_STOP(FEPAAssemble, 1, 0);
|
||||
SWR_ASSERT(assemble);
|
||||
|
||||
@@ -1848,7 +1845,6 @@ void BinTriangles(
|
||||
}
|
||||
}
|
||||
}
|
||||
nextPrimitive:
|
||||
triMask &= ~(1 << triIndex);
|
||||
}
|
||||
|
||||
|
||||
@@ -1009,7 +1009,7 @@ struct PA_TESS : PA_STATE
|
||||
simdvector& GetSimdVector(uint32_t index, uint32_t slot)
|
||||
{
|
||||
SWR_ASSERT(0, "%s NOT IMPLEMENTED", __FUNCTION__);
|
||||
static simdvector junk = { 0 };
|
||||
static simdvector junk;
|
||||
return junk;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,25 +45,6 @@ void StepRasterTileY(uint32_t MaxRT, RenderOutputBuffers &buffers, RenderOutputB
|
||||
uint32_t colorRowStep, uint32_t depthRowStep, uint32_t stencilRowStep);
|
||||
|
||||
#define MASKTOVEC(i3,i2,i1,i0) {-i0,-i1,-i2,-i3}
|
||||
const __m128 gMaskToVec[] = {
|
||||
MASKTOVEC(0,0,0,0),
|
||||
MASKTOVEC(0,0,0,1),
|
||||
MASKTOVEC(0,0,1,0),
|
||||
MASKTOVEC(0,0,1,1),
|
||||
MASKTOVEC(0,1,0,0),
|
||||
MASKTOVEC(0,1,0,1),
|
||||
MASKTOVEC(0,1,1,0),
|
||||
MASKTOVEC(0,1,1,1),
|
||||
MASKTOVEC(1,0,0,0),
|
||||
MASKTOVEC(1,0,0,1),
|
||||
MASKTOVEC(1,0,1,0),
|
||||
MASKTOVEC(1,0,1,1),
|
||||
MASKTOVEC(1,1,0,0),
|
||||
MASKTOVEC(1,1,0,1),
|
||||
MASKTOVEC(1,1,1,0),
|
||||
MASKTOVEC(1,1,1,1),
|
||||
};
|
||||
|
||||
const __m256d gMaskToVecpd[] =
|
||||
{
|
||||
MASKTOVEC(0, 0, 0, 0),
|
||||
@@ -1172,16 +1153,20 @@ void StepRasterTileY(uint32_t NumRT, RenderOutputBuffers &buffers, RenderOutputB
|
||||
// initialize rasterizer function table
|
||||
PFN_WORK_FUNC gRasterizerTable[2][SWR_MULTISAMPLE_TYPE_MAX] =
|
||||
{
|
||||
RasterizeTriangle<false, SWR_MULTISAMPLE_1X>,
|
||||
RasterizeTriangle<false, SWR_MULTISAMPLE_2X>,
|
||||
RasterizeTriangle<false, SWR_MULTISAMPLE_4X>,
|
||||
RasterizeTriangle<false, SWR_MULTISAMPLE_8X>,
|
||||
RasterizeTriangle<false, SWR_MULTISAMPLE_16X>,
|
||||
RasterizeTriangle<true, SWR_MULTISAMPLE_1X>,
|
||||
RasterizeTriangle<true, SWR_MULTISAMPLE_2X>,
|
||||
RasterizeTriangle<true, SWR_MULTISAMPLE_4X>,
|
||||
RasterizeTriangle<true, SWR_MULTISAMPLE_8X>,
|
||||
RasterizeTriangle<true, SWR_MULTISAMPLE_16X>
|
||||
{
|
||||
RasterizeTriangle<false, SWR_MULTISAMPLE_1X>,
|
||||
RasterizeTriangle<false, SWR_MULTISAMPLE_2X>,
|
||||
RasterizeTriangle<false, SWR_MULTISAMPLE_4X>,
|
||||
RasterizeTriangle<false, SWR_MULTISAMPLE_8X>,
|
||||
RasterizeTriangle<false, SWR_MULTISAMPLE_16X>
|
||||
},
|
||||
{
|
||||
RasterizeTriangle<true, SWR_MULTISAMPLE_1X>,
|
||||
RasterizeTriangle<true, SWR_MULTISAMPLE_2X>,
|
||||
RasterizeTriangle<true, SWR_MULTISAMPLE_4X>,
|
||||
RasterizeTriangle<true, SWR_MULTISAMPLE_8X>,
|
||||
RasterizeTriangle<true, SWR_MULTISAMPLE_16X>
|
||||
}
|
||||
};
|
||||
|
||||
void RasterizeLine(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile, void *pData)
|
||||
|
||||
@@ -90,8 +90,8 @@ public:
|
||||
return (numEnqueued == mNumEntries);
|
||||
}
|
||||
|
||||
INLINE volatile uint64_t GetTail() { return mRingTail; }
|
||||
INLINE volatile uint64_t GetHead() { return mRingHead; }
|
||||
INLINE uint64_t GetTail() volatile { return mRingTail; }
|
||||
INLINE uint64_t GetHead() volatile { return mRingHead; }
|
||||
|
||||
protected:
|
||||
T* mpRingBuffer;
|
||||
|
||||
@@ -533,8 +533,6 @@ void FetchJit::CreateGatherOddFormats(SWR_FORMAT format, Value* pBase, Value* of
|
||||
// only works if pixel size is <= 32bits
|
||||
SWR_ASSERT(info.bpp <= 32);
|
||||
|
||||
uint32_t numComps = info.numComps;
|
||||
|
||||
Value* gather = VUNDEF_I();
|
||||
|
||||
// assign defaults
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
/// float
|
||||
/// @param val - 16-bit float
|
||||
/// @todo Maybe move this outside of this file into a header?
|
||||
static float ConvertSmallFloatTo32(UINT val)
|
||||
static INLINE float ConvertSmallFloatTo32(UINT val)
|
||||
{
|
||||
UINT result;
|
||||
if ((val & 0x7fff) == 0)
|
||||
|
||||
Reference in New Issue
Block a user