mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-23 11:40:39 +02:00
swr: [rasterizer] Misc fixes identified by static code analysis
No perf loss detected Acked-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
6c01478213
commit
f89f6d562a
4 changed files with 21 additions and 6 deletions
|
|
@ -793,8 +793,14 @@ static void GeometryShaderStage(
|
|||
uint8_t* pCutBase = pCutBufferBase + instance * cutInstanceStride;
|
||||
|
||||
DWORD numAttribs;
|
||||
_BitScanReverse(&numAttribs, state.feAttribMask);
|
||||
numAttribs++;
|
||||
if (_BitScanReverse(&numAttribs, state.feAttribMask))
|
||||
{
|
||||
numAttribs++;
|
||||
}
|
||||
else
|
||||
{
|
||||
numAttribs = 0;
|
||||
}
|
||||
|
||||
for (uint32_t stream = 0; stream < MAX_SO_STREAMS; ++stream)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1167,8 +1167,14 @@ struct PA_FACTORY
|
|||
{
|
||||
memset(&indexStore, 0, sizeof(indexStore));
|
||||
DWORD numAttribs;
|
||||
_BitScanReverse(&numAttribs, state.feAttribMask);
|
||||
numAttribs++;
|
||||
if (_BitScanReverse(&numAttribs, state.feAttribMask))
|
||||
{
|
||||
numAttribs++;
|
||||
}
|
||||
else
|
||||
{
|
||||
numAttribs = 0;
|
||||
}
|
||||
new (&this->paCut) PA_STATE_CUT(pDC, (uint8_t*)&this->vertexStore[0], MAX_NUM_VERTS_PER_PRIM * KNOB_SIMD_WIDTH,
|
||||
&this->indexStore[0], numVerts, numAttribs, state.topology, false);
|
||||
cutPA = true;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,10 @@ void CalculateProcessorTopology(CPUNumaNodes& out_nodes, uint32_t& out_numThread
|
|||
|
||||
#if defined(_WIN32)
|
||||
|
||||
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX buffer[KNOB_MAX_NUM_THREADS];
|
||||
static std::mutex m;
|
||||
std::lock_guard<std::mutex> l(m);
|
||||
|
||||
static SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX buffer[KNOB_MAX_NUM_THREADS];
|
||||
DWORD bufSize = sizeof(buffer);
|
||||
|
||||
BOOL ret = GetLogicalProcessorInformationEx(RelationProcessorCore, buffer, &bufSize);
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ class HotTileMgr
|
|||
public:
|
||||
HotTileMgr()
|
||||
{
|
||||
memset(&mHotTiles[0][0], 0, sizeof(mHotTiles));
|
||||
memset(mHotTiles, 0, sizeof(mHotTiles));
|
||||
|
||||
// cache hottile size
|
||||
for (uint32_t i = SWR_ATTACHMENT_COLOR0; i <= SWR_ATTACHMENT_COLOR7; ++i)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue