mirror of https://github.com/intel/gmmlib.git
More safety before access by ptr and simplify for loop
This commit is contained in:
parent
a999c848a4
commit
d106ea085c
|
@ -235,6 +235,7 @@ TEST_F(CTestAuxTable, TestAuxTableContent)
|
||||||
Walker *ywalker = new Walker(surf->getGfxAddress(GMM_PLANE_Y),
|
Walker *ywalker = new Walker(surf->getGfxAddress(GMM_PLANE_Y),
|
||||||
surf->getAuxGfxAddress(GMM_AUX_CCS),
|
surf->getAuxGfxAddress(GMM_AUX_CCS),
|
||||||
mgr->GetAuxL3TableAddr());
|
mgr->GetAuxL3TableAddr());
|
||||||
|
ASSERT_TRUE(ywalker != NULL);
|
||||||
|
|
||||||
for(size_t i = 0; i < surf->getSurfaceSize(GMM_PLANE_Y); i++)
|
for(size_t i = 0; i < surf->getSurfaceSize(GMM_PLANE_Y); i++)
|
||||||
{
|
{
|
||||||
|
@ -248,6 +249,8 @@ TEST_F(CTestAuxTable, TestAuxTableContent)
|
||||||
surf->getAuxGfxAddress(GMM_AUX_UV_CCS),
|
surf->getAuxGfxAddress(GMM_AUX_UV_CCS),
|
||||||
mgr->GetAuxL3TableAddr());
|
mgr->GetAuxL3TableAddr());
|
||||||
|
|
||||||
|
ASSERT_TRUE(uvwalker != NULL);
|
||||||
|
|
||||||
for(size_t i = 0; i < surf->getSurfaceSize(GMM_PLANE_U); i++)
|
for(size_t i = 0; i < surf->getSurfaceSize(GMM_PLANE_U); i++)
|
||||||
{
|
{
|
||||||
GMM_GFX_ADDRESS addr = surf->getGfxAddress(GMM_PLANE_U) + i;
|
GMM_GFX_ADDRESS addr = surf->getGfxAddress(GMM_PLANE_U) + i;
|
||||||
|
|
|
@ -2488,7 +2488,7 @@ TEST_F(CTestResource, TestSeparateStencil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allocate multi-tiles in X/Y/Z dimension.
|
// Allocate multi-tiles in X/Y/Z dimension.
|
||||||
for(uint32_t i = RESOURCE_3D; i <= RESOURCE_3D; i++)
|
uint32_t i = RESOURCE_3D;
|
||||||
{
|
{
|
||||||
gmmParams.Type = static_cast<GMM_RESOURCE_TYPE>(i);
|
gmmParams.Type = static_cast<GMM_RESOURCE_TYPE>(i);
|
||||||
gmmParams.BaseWidth64 = StencilTileSize[0][0] + 0x1;
|
gmmParams.BaseWidth64 = StencilTileSize[0][0] + 0x1;
|
||||||
|
|
Loading…
Reference in New Issue