mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
refactor: remove not needed logic around DisallowLowQualityFiltering
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
652cc31160
commit
0df7e3279e
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,8 +12,5 @@ namespace NEO {
|
||||
|
||||
typedef Gen11Family Family;
|
||||
|
||||
// clang-format off
|
||||
#include "shared/source/image/image_bdw_and_later.inl"
|
||||
#include "shared/source/image/image_skl_and_later.inl"
|
||||
// clang-format on
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,8 +12,5 @@ namespace NEO {
|
||||
|
||||
using Family = Gen12LpFamily;
|
||||
|
||||
// clang-format off
|
||||
#include "shared/source/image/image_bdw_and_later.inl"
|
||||
#include "shared/source/image/image_skl_and_later.inl"
|
||||
// clang-format on
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -14,8 +14,4 @@ typedef Gen8Family Family;
|
||||
|
||||
template <>
|
||||
void setMipTailStartLod<Family>(Family::RENDER_SURFACE_STATE *surfaceState, Gmm *gmm) {}
|
||||
|
||||
// clang-format off
|
||||
#include "shared/source/image/image_bdw_and_later.inl"
|
||||
// clang-format on
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,8 +12,5 @@ namespace NEO {
|
||||
|
||||
typedef Gen9Family Family;
|
||||
|
||||
// clang-format off
|
||||
#include "shared/source/image/image_bdw_and_later.inl"
|
||||
#include "shared/source/image/image_skl_and_later.inl"
|
||||
// clang-format on
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1728,6 +1728,7 @@ typedef struct tagRENDER_SURFACE_STATE {
|
||||
TheStructure.Common.MemoryCompressionType = MEMORY_COMPRESSION_TYPE_MEDIA_COMPRESSION;
|
||||
TheStructure._SurfaceFormatIsPlanar.HalfPitchForChroma = HALF_PITCH_FOR_CHROMA_DISABLE;
|
||||
TheStructure._SurfaceFormatIsnotPlanar.AuxiliarySurfaceMode = AUXILIARY_SURFACE_MODE_AUX_NONE;
|
||||
TheStructure.Common.DisallowLowQualityFiltering = false;
|
||||
}
|
||||
static tagRENDER_SURFACE_STATE sInit() {
|
||||
RENDER_SURFACE_STATE state;
|
||||
@@ -2128,7 +2129,8 @@ typedef struct tagRENDER_SURFACE_STATE {
|
||||
inline uint32_t getClearColorAddressHigh() const { // patched
|
||||
return TheStructure.Common.ClearAddressHigh;
|
||||
}
|
||||
inline void setDisallowLowQualityFiltering(const bool value) {
|
||||
inline void setDisallowLowQualityFiltering(const bool value) { // patched
|
||||
UNRECOVERABLE_IF(true);
|
||||
TheStructure.Common.DisallowLowQualityFiltering = value;
|
||||
}
|
||||
inline bool getDisallowLowQualityFiltering() const {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2020-2021 Intel Corporation
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -7,7 +7,6 @@
|
||||
set(NEO_CORE_IMAGE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_bdw_and_later.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_skl_and_later.inl
|
||||
)
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
template <>
|
||||
void setFilterMode<Family>(typename Family::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo){};
|
||||
@@ -15,9 +15,6 @@
|
||||
#include "shared/source/helpers/surface_format_info.h"
|
||||
|
||||
namespace NEO {
|
||||
template <typename GfxFamily>
|
||||
void setFilterMode(typename GfxFamily::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo);
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline void setImageSurfaceState(typename GfxFamily::RENDER_SURFACE_STATE *surfaceState, const ImageInfo &imageInfo, Gmm *gmm, GmmHelper &gmmHelper, uint32_t cubeFaceIndex, uint64_t gpuAddress, const SurfaceOffsets &surfaceOffsets, bool isNV12Format) {
|
||||
using RENDER_SURFACE_STATE = typename GfxFamily::RENDER_SURFACE_STATE;
|
||||
@@ -92,7 +89,6 @@ inline void setImageSurfaceState(typename GfxFamily::RENDER_SURFACE_STATE *surfa
|
||||
}
|
||||
|
||||
surfaceState->setSurfaceFormat(static_cast<SURFACE_FORMAT>(imageInfo.surfaceFormat->genxSurfaceFormat));
|
||||
setFilterMode<GfxFamily>(surfaceState, gmmHelper.getHardwareInfo());
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,8 +12,5 @@ namespace NEO {
|
||||
|
||||
using Family = XeHpcCoreFamily;
|
||||
|
||||
// clang-format off
|
||||
#include "shared/source/image/image_bdw_and_later.inl"
|
||||
#include "shared/source/image/image_skl_and_later.inl"
|
||||
// clang-format on
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,11 +12,5 @@ namespace NEO {
|
||||
|
||||
using Family = XeHpgCoreFamily;
|
||||
|
||||
template <>
|
||||
void setFilterMode<Family>(Family::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo) {
|
||||
surfaceState->setDisallowLowQualityFiltering(false);
|
||||
}
|
||||
// clang-format off
|
||||
#include "shared/source/image/image_skl_and_later.inl"
|
||||
// clang-format on
|
||||
} // namespace NEO
|
||||
|
||||
@@ -20,7 +20,6 @@ if(TESTS_MTL)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_config_helper_tests_mtl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_mtl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_encode_dispatch_kernel_mtl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_image_surface_state_mtl.cpp
|
||||
)
|
||||
|
||||
add_subdirectories()
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/unit_test/image/image_surface_state_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using ImageSurfaceStateTestsMtl = ImageSurfaceStateTests;
|
||||
|
||||
MTLTEST_F(ImageSurfaceStateTestsMtl, givenMtlWhenCallSetFilterModeThenDisallowLowQualityFliteringIsAllwaysFalse) {
|
||||
auto size = sizeof(typename FamilyType::RENDER_SURFACE_STATE);
|
||||
auto surfaceState = std::make_unique<char[]>(size);
|
||||
auto castSurfaceState = reinterpret_cast<typename FamilyType::RENDER_SURFACE_STATE *>(surfaceState.get());
|
||||
|
||||
setFilterMode<FamilyType>(castSurfaceState, &pDevice->getHardwareInfo());
|
||||
EXPECT_FALSE(castSurfaceState->getDisallowLowQualityFiltering());
|
||||
}
|
||||
|
||||
MTLTEST_F(ImageSurfaceStateTestsMtl, givenMtlWhenCallSetImageSurfaceStateThenDisallowLowQualityFliteringIsAllwaysFalse) {
|
||||
auto size = sizeof(typename FamilyType::RENDER_SURFACE_STATE);
|
||||
auto surfaceState = std::make_unique<char[]>(size);
|
||||
auto castSurfaceState = reinterpret_cast<typename FamilyType::RENDER_SURFACE_STATE *>(surfaceState.get());
|
||||
const uint32_t cubeFaceIndex = 2u;
|
||||
|
||||
SurfaceFormatInfo surfaceFormatInfo;
|
||||
surfaceFormatInfo.genxSurfaceFormat = GFX3DSTATE_SURFACEFORMAT::GFX3DSTATE_SURFACEFORMAT_A32_FLOAT;
|
||||
imageInfo.surfaceFormat = &surfaceFormatInfo;
|
||||
SurfaceOffsets surfaceOffsets;
|
||||
surfaceOffsets.offset = 0u;
|
||||
surfaceOffsets.xOffset = 11u;
|
||||
surfaceOffsets.yOffset = 12u;
|
||||
surfaceOffsets.yOffsetForUVplane = 13u;
|
||||
|
||||
const uint64_t gpuAddress = 0x000001a78a8a8000;
|
||||
|
||||
setImageSurfaceState<FamilyType>(castSurfaceState, imageInfo, mockGmm.get(), *gmmHelper, cubeFaceIndex, gpuAddress, surfaceOffsets, true);
|
||||
EXPECT_FALSE(castSurfaceState->getDisallowLowQualityFiltering());
|
||||
}
|
||||
Reference in New Issue
Block a user