Update addrlib with latest Mesa source.
Change-Id: Idd8cdaac9ad370397d62f6a32687ca7bc7d7462b
这个提交包含在:
@@ -799,7 +799,8 @@ ADDR_E_RETURNCODE Gfx9Lib::HwlComputeCmaskAddrFromCoord(
|
||||
UINT_32 sliceSizeInBlock = (output.height / output.metaBlkHeight) * pitchInBlock;
|
||||
UINT_32 blockIndex = zb * sliceSizeInBlock + yb * pitchInBlock + xb;
|
||||
|
||||
UINT_64 address = pMetaEq->solve(pIn->x, pIn->y, pIn->slice, 0, blockIndex);
|
||||
UINT_32 coords[] = { pIn->x, pIn->y, pIn->slice, 0, blockIndex };
|
||||
UINT_64 address = pMetaEq->solve(coords);
|
||||
|
||||
pOut->addr = address >> 1;
|
||||
pOut->bitPosition = static_cast<UINT_32>((address & 1) << 2);
|
||||
@@ -874,7 +875,8 @@ ADDR_E_RETURNCODE Gfx9Lib::HwlComputeHtileAddrFromCoord(
|
||||
UINT_32 sliceSizeInBlock = (output.height / output.metaBlkHeight) * pitchInBlock;
|
||||
UINT_32 blockIndex = zb * sliceSizeInBlock + yb * pitchInBlock + xb;
|
||||
|
||||
UINT_64 address = pMetaEq->solve(pIn->x, pIn->y, pIn->slice, 0, blockIndex);
|
||||
UINT_32 coords[] = { pIn->x, pIn->y, pIn->slice, 0, blockIndex };
|
||||
UINT_64 address = pMetaEq->solve(coords);
|
||||
|
||||
pOut->addr = address >> 1;
|
||||
|
||||
@@ -950,12 +952,12 @@ ADDR_E_RETURNCODE Gfx9Lib::HwlComputeHtileCoordFromAddr(
|
||||
UINT_32 pitchInBlock = output.pitch / output.metaBlkWidth;
|
||||
UINT_32 sliceSizeInBlock = (output.height / output.metaBlkHeight) * pitchInBlock;
|
||||
|
||||
UINT_32 x, y, z, s, m;
|
||||
pMetaEq->solveAddr(nibbleAddress, sliceSizeInBlock, x, y, z, s, m);
|
||||
UINT_32 coords[NUM_DIMS];
|
||||
pMetaEq->solveAddr(nibbleAddress, sliceSizeInBlock, coords);
|
||||
|
||||
pOut->slice = m / sliceSizeInBlock;
|
||||
pOut->y = ((m % sliceSizeInBlock) / pitchInBlock) * output.metaBlkHeight + y;
|
||||
pOut->x = (m % pitchInBlock) * output.metaBlkWidth + x;
|
||||
pOut->slice = coords[DIM_M] / sliceSizeInBlock;
|
||||
pOut->y = ((coords[DIM_M] % sliceSizeInBlock) / pitchInBlock) * output.metaBlkHeight + coords[DIM_Y];
|
||||
pOut->x = (coords[DIM_M] % pitchInBlock) * output.metaBlkWidth + coords[DIM_X];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1029,7 +1031,8 @@ ADDR_E_RETURNCODE Gfx9Lib::HwlComputeDccAddrFromCoord(
|
||||
UINT_32 sliceSizeInBlock = (output.height / output.metaBlkHeight) * pitchInBlock;
|
||||
UINT_32 blockIndex = zb * sliceSizeInBlock + yb * pitchInBlock + xb;
|
||||
|
||||
UINT_64 address = pMetaEq->solve(pIn->x, pIn->y, pIn->slice, pIn->sample, blockIndex);
|
||||
UINT_32 coords[] = { pIn->x, pIn->y, pIn->slice, pIn->sample, blockIndex };
|
||||
UINT_64 address = pMetaEq->solve(coords);
|
||||
|
||||
pOut->addr = address >> 1;
|
||||
|
||||
@@ -1343,8 +1346,8 @@ VOID Gfx9Lib::GetRbEquation(
|
||||
{
|
||||
// RB's are distributed on 16x16, except when we have 1 rb per se, in which case its 32x32
|
||||
UINT_32 rbRegion = (numRbPerSeLog2 == 0) ? 5 : 4;
|
||||
Coordinate cx('x', rbRegion);
|
||||
Coordinate cy('y', rbRegion);
|
||||
Coordinate cx(DIM_X, rbRegion);
|
||||
Coordinate cy(DIM_Y, rbRegion);
|
||||
|
||||
UINT_32 start = 0;
|
||||
UINT_32 numRbTotalLog2 = numRbPerSeLog2 + numSeLog2;
|
||||
@@ -1409,10 +1412,10 @@ VOID Gfx9Lib::GetDataEquation(
|
||||
UINT_32 numSamplesLog2) ///< [in] data surface sample count
|
||||
const
|
||||
{
|
||||
Coordinate cx('x', 0);
|
||||
Coordinate cy('y', 0);
|
||||
Coordinate cz('z', 0);
|
||||
Coordinate cs('s', 0);
|
||||
Coordinate cx(DIM_X, 0);
|
||||
Coordinate cy(DIM_Y, 0);
|
||||
Coordinate cz(DIM_Z, 0);
|
||||
Coordinate cs(DIM_S, 0);
|
||||
|
||||
// Clear the equation
|
||||
pDataEq->resize(0);
|
||||
@@ -1422,7 +1425,7 @@ VOID Gfx9Lib::GetDataEquation(
|
||||
{
|
||||
if (IsLinear(swizzleMode))
|
||||
{
|
||||
Coordinate cm('m', 0);
|
||||
Coordinate cm(DIM_M, 0);
|
||||
|
||||
pDataEq->resize(49);
|
||||
|
||||
@@ -1548,7 +1551,7 @@ VOID Gfx9Lib::GetDataEquation(
|
||||
// Fill in sample bits
|
||||
for (i = 0; i < numSamplesLog2; i++)
|
||||
{
|
||||
cs.set('s', i);
|
||||
cs.set(DIM_S, i);
|
||||
(*pDataEq)[tileSplitStart + i].add(cs);
|
||||
}
|
||||
// Fill in x/y bits above sample split
|
||||
@@ -1575,7 +1578,7 @@ VOID Gfx9Lib::GetDataEquation(
|
||||
|
||||
for (UINT_32 s = 0; s < numSamplesLog2; s++)
|
||||
{
|
||||
cs.set('s', s);
|
||||
cs.set(DIM_S, s);
|
||||
(*pDataEq)[sampleStart + s].add(cs);
|
||||
}
|
||||
|
||||
@@ -1627,7 +1630,7 @@ VOID Gfx9Lib::GetPipeEquation(
|
||||
|
||||
if (dataSurfaceType != Gfx9DataColor)
|
||||
{
|
||||
Coordinate tileMin('x', 3);
|
||||
Coordinate tileMin(DIM_X, 3);
|
||||
|
||||
while (dataEq[pipeInterleaveLog2 + pipeStart][0] < tileMin)
|
||||
{
|
||||
@@ -1687,7 +1690,7 @@ VOID Gfx9Lib::GetPipeEquation(
|
||||
xorMask2.resize(numPipeLog2);
|
||||
for (UINT_32 pipeIdx = 0; pipeIdx < numPipeLog2; pipeIdx++)
|
||||
{
|
||||
co.set('z', numPipeLog2 - 1 - pipeIdx);
|
||||
co.set(DIM_Z, numPipeLog2 - 1 - pipeIdx);
|
||||
xorMask2[pipeIdx].add(co);
|
||||
}
|
||||
|
||||
@@ -1847,9 +1850,9 @@ VOID Gfx9Lib::GenMetaEquation(
|
||||
|
||||
if (IsThick(resourceType, swizzleMode))
|
||||
{
|
||||
Coordinate cx('x', 0);
|
||||
Coordinate cy('y', 0);
|
||||
Coordinate cz('z', 0);
|
||||
Coordinate cx(DIM_X, 0);
|
||||
Coordinate cy(DIM_Y, 0);
|
||||
Coordinate cz(DIM_Z, 0);
|
||||
|
||||
if (maxMip > 0)
|
||||
{
|
||||
@@ -1862,8 +1865,8 @@ VOID Gfx9Lib::GenMetaEquation(
|
||||
}
|
||||
else
|
||||
{
|
||||
Coordinate cx('x', 0);
|
||||
Coordinate cy('y', 0);
|
||||
Coordinate cx(DIM_X, 0);
|
||||
Coordinate cy(DIM_Y, 0);
|
||||
Coordinate cs;
|
||||
|
||||
if (maxMip > 0)
|
||||
@@ -1881,7 +1884,7 @@ VOID Gfx9Lib::GenMetaEquation(
|
||||
//------------------------------------------------------------------------------------------------------------------------
|
||||
for (UINT_32 s = 0; s < compFragLog2; s++)
|
||||
{
|
||||
cs.set('s', s);
|
||||
cs.set(DIM_S, s);
|
||||
(*pMetaEq)[s].add(cs);
|
||||
}
|
||||
}
|
||||
@@ -1892,35 +1895,35 @@ VOID Gfx9Lib::GenMetaEquation(
|
||||
|
||||
Coordinate co;
|
||||
// filter out everything under the compressed block size
|
||||
co.set('x', compBlkWidthLog2);
|
||||
pMetaEq->Filter('<', co, 0, 'x');
|
||||
co.set('y', compBlkHeightLog2);
|
||||
pMetaEq->Filter('<', co, 0, 'y');
|
||||
co.set('z', compBlkDepthLog2);
|
||||
pMetaEq->Filter('<', co, 0, 'z');
|
||||
co.set(DIM_X, compBlkWidthLog2);
|
||||
pMetaEq->Filter('<', co, 0, DIM_X);
|
||||
co.set(DIM_Y, compBlkHeightLog2);
|
||||
pMetaEq->Filter('<', co, 0, DIM_Y);
|
||||
co.set(DIM_Z, compBlkDepthLog2);
|
||||
pMetaEq->Filter('<', co, 0, DIM_Z);
|
||||
|
||||
// For non-color, filter out sample bits
|
||||
if (dataSurfaceType != Gfx9DataColor)
|
||||
{
|
||||
co.set('x', 0);
|
||||
pMetaEq->Filter('<', co, 0, 's');
|
||||
co.set(DIM_X, 0);
|
||||
pMetaEq->Filter('<', co, 0, DIM_S);
|
||||
}
|
||||
|
||||
// filter out everything above the metablock size
|
||||
co.set('x', metaBlkWidthLog2 - 1);
|
||||
pMetaEq->Filter('>', co, 0, 'x');
|
||||
co.set('y', metaBlkHeightLog2 - 1);
|
||||
pMetaEq->Filter('>', co, 0, 'y');
|
||||
co.set('z', metaBlkDepthLog2 - 1);
|
||||
pMetaEq->Filter('>', co, 0, 'z');
|
||||
co.set(DIM_X, metaBlkWidthLog2 - 1);
|
||||
pMetaEq->Filter('>', co, 0, DIM_X);
|
||||
co.set(DIM_Y, metaBlkHeightLog2 - 1);
|
||||
pMetaEq->Filter('>', co, 0, DIM_Y);
|
||||
co.set(DIM_Z, metaBlkDepthLog2 - 1);
|
||||
pMetaEq->Filter('>', co, 0, DIM_Z);
|
||||
|
||||
// filter out everything above the metablock size for the channel bits
|
||||
co.set('x', metaBlkWidthLog2 - 1);
|
||||
pipeEquation.Filter('>', co, 0, 'x');
|
||||
co.set('y', metaBlkHeightLog2 - 1);
|
||||
pipeEquation.Filter('>', co, 0, 'y');
|
||||
co.set('z', metaBlkDepthLog2 - 1);
|
||||
pipeEquation.Filter('>', co, 0, 'z');
|
||||
co.set(DIM_X, metaBlkWidthLog2 - 1);
|
||||
pipeEquation.Filter('>', co, 0, DIM_X);
|
||||
co.set(DIM_Y, metaBlkHeightLog2 - 1);
|
||||
pipeEquation.Filter('>', co, 0, DIM_Y);
|
||||
co.set(DIM_Z, metaBlkDepthLog2 - 1);
|
||||
pipeEquation.Filter('>', co, 0, DIM_Z);
|
||||
|
||||
// Make sure we still have the same number of channel bits
|
||||
if (pipeEquation.getsize() != numPipeTotalLog2)
|
||||
@@ -1963,7 +1966,7 @@ VOID Gfx9Lib::GenMetaEquation(
|
||||
|
||||
if (m_settings.applyAliasFix)
|
||||
{
|
||||
co.set('z', -1);
|
||||
co.set(DIM_Z, -1);
|
||||
}
|
||||
|
||||
// Loop through each rb id bit; if it is equal to any of the filtered channel bits, clear it
|
||||
@@ -1978,7 +1981,7 @@ VOID Gfx9Lib::GenMetaEquation(
|
||||
CoordTerm filteredPipeEq;
|
||||
filteredPipeEq = pipeEquation[j];
|
||||
|
||||
filteredPipeEq.Filter('>', co, 0, 'z');
|
||||
filteredPipeEq.Filter('>', co, 0, DIM_Z);
|
||||
|
||||
isRbEquationInPipeEquation = (rbEquation[i] == filteredPipeEq);
|
||||
}
|
||||
@@ -2081,7 +2084,7 @@ VOID Gfx9Lib::GenMetaEquation(
|
||||
// Concatenate the macro address above the current address
|
||||
for (UINT_32 i = metaSize, j = 0; i < 49; i++, j++)
|
||||
{
|
||||
co.set('m', j);
|
||||
co.set(DIM_M, j);
|
||||
(*pMetaEq)[i].add(co);
|
||||
}
|
||||
|
||||
@@ -2136,7 +2139,7 @@ VOID Gfx9Lib::GenMetaEquation(
|
||||
//------------------------------------------------------------------------------------------
|
||||
for (UINT_32 i = 0; i < uncompFragLog2; i++)
|
||||
{
|
||||
co.set('s', compFragLog2 + i);
|
||||
co.set(DIM_S, compFragLog2 + i);
|
||||
(*pMetaEq)[pipeInterleaveLog2 + 1 + numPipeTotalLog2 + rbBitsLeft + i].add(co);
|
||||
}
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户