30 lines
982 B
C++
30 lines
982 B
C++
/*
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "test.h"
|
|
#include "unit_tests/fixtures/image_fixture.h"
|
|
#include "unit_tests/mocks/mock_context.h"
|
|
|
|
using namespace NEO;
|
|
|
|
typedef ::testing::Test gen9ImageTests;
|
|
|
|
GEN9TEST_F(gen9ImageTests, appendSurfaceStateParamsDoesNothing) {
|
|
typedef typename FamilyType::RENDER_SURFACE_STATE RENDER_SURFACE_STATE;
|
|
MockContext context;
|
|
auto image = std::unique_ptr<Image>(ImageHelper<Image1dDefaults>::create(&context));
|
|
auto surfaceStateBefore = FamilyType::cmdInitRenderSurfaceState;
|
|
auto surfaceStateAfter = FamilyType::cmdInitRenderSurfaceState;
|
|
auto imageHw = static_cast<ImageHw<FamilyType> *>(image.get());
|
|
|
|
EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE)));
|
|
|
|
imageHw->appendSurfaceStateParams(&surfaceStateAfter);
|
|
|
|
EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE)));
|
|
}
|