mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 21:27:04 +08:00
refactor: simplify isDcFlushAllowed implementation
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ef7dbc99f1
commit
8fe1a460f8
@@ -86,6 +86,8 @@ struct Gen11 {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr bool isDcFlushAllowed = true;
|
||||
|
||||
static_assert(sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor) == sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor::packed), "");
|
||||
};
|
||||
struct Gen11Family : public Gen11 {
|
||||
|
||||
@@ -85,6 +85,8 @@ struct Gen12Lp {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr bool isDcFlushAllowed = true;
|
||||
|
||||
static_assert(sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor) == sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor::packed), "");
|
||||
};
|
||||
struct Gen12LpFamily : public Gen12Lp {
|
||||
|
||||
@@ -87,6 +87,8 @@ struct Gen8 {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr bool isDcFlushAllowed = true;
|
||||
|
||||
static_assert(sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor) == sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor::packed), "");
|
||||
};
|
||||
struct Gen8Family : public Gen8 {
|
||||
|
||||
@@ -86,6 +86,8 @@ struct Gen9 {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr bool isDcFlushAllowed = true;
|
||||
|
||||
static_assert(sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor) == sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor::packed), "");
|
||||
};
|
||||
|
||||
|
||||
@@ -393,7 +393,8 @@ bool ProductHelperHw<gfxProduct>::isKmdMigrationSupported() const {
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::isDcFlushAllowed() const {
|
||||
auto dcFlushAllowed = true;
|
||||
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
|
||||
bool dcFlushAllowed = GfxProduct::isDcFlushAllowed;
|
||||
|
||||
if (debugManager.flags.AllowDcFlush.get() != -1) {
|
||||
dcFlushAllowed = debugManager.flags.AllowDcFlush.get();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -67,6 +67,8 @@ struct PVC : public XeHpcCoreFamily {
|
||||
return (revId <= 0x3);
|
||||
}
|
||||
static constexpr uint32_t pvcSteppingBits = 0b111;
|
||||
|
||||
static constexpr bool isDcFlushAllowed = false;
|
||||
};
|
||||
|
||||
class PvcHwConfig : public PVC {
|
||||
|
||||
@@ -16,17 +16,6 @@ bool ProductHelperHw<gfxProduct>::isDirectSubmissionSupported(ReleaseHelper *rel
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isDcFlushAllowed() const {
|
||||
auto dcFlushAllowed = false;
|
||||
|
||||
if (debugManager.flags.AllowDcFlush.get() != -1) {
|
||||
dcFlushAllowed = debugManager.flags.AllowDcFlush.get();
|
||||
}
|
||||
|
||||
return dcFlushAllowed;
|
||||
}
|
||||
|
||||
template <>
|
||||
void ProductHelperHw<gfxProduct>::adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) const {
|
||||
using SAMPLER_STATE = typename XeHpcCoreFamily::SAMPLER_STATE;
|
||||
|
||||
@@ -92,6 +92,8 @@ struct XeHpgCore {
|
||||
}
|
||||
};
|
||||
|
||||
static constexpr bool isDcFlushAllowed = true;
|
||||
|
||||
static_assert(sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor) == sizeof(DataPortBindlessSurfaceExtendedMessageDescriptor::packed), "");
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user