Files
compute-runtime/unit_tests/gen8/image_tests_gen8.cpp
Zdanowicz, Zbigniew 158f200476 Add HW commands const definitions
Change-Id: If2e9d7f7f707b7b8c7bd8dbd3853ab3b6dad0c9a
2019-01-18 12:13:25 +01:00

30 lines
984 B
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "unit_tests/fixtures/image_fixture.h"
#include "unit_tests/mocks/mock_context.h"
#include "test.h"
using namespace OCLRT;
typedef ::testing::Test gen8ImageTests;
GEN8TEST_F(gen8ImageTests, 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)));
}