mirror of
https://github.com/intel/intel-graphics-compiler.git
synced 2025-11-04 08:21:06 +08:00
Add workaround for static vertex count
Change-Id: I3e20bbeaff390753960ca549d6cf3c6a6bd276a1
This commit is contained in:
@ -250,7 +250,8 @@ void CollectGeometryShaderProperties::HandleCutOrStreamHeader(llvm::GenIntrinsic
|
||||
|
||||
auto pVertexCount = llvm::dyn_cast<llvm::ConstantInt>(I.getOperand(I.getNumOperands() - 2));
|
||||
// if the emitCount is not a constant int, we have runtime value of vertex count
|
||||
m_gsProps.Output().HasNonstaticVertexCount(pVertexCount == nullptr || IGC_IS_FLAG_ENABLED(ForceStaticToDynamic));
|
||||
auto ctx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext();
|
||||
m_gsProps.Output().HasNonstaticVertexCount(pVertexCount == nullptr || ctx->platform.disableStaticVertexCount());
|
||||
|
||||
// for static number of vertices, we get the actual value,
|
||||
// for dynamic, declaration-derived upper bound (for safety)
|
||||
|
||||
@ -695,7 +695,8 @@ void GeometryShaderLowering::LowerControlHeader(llvm::Instruction* inst)
|
||||
// Add write to vertex count field for non-static number of output vertices
|
||||
IRBuilder<> irb(inst);
|
||||
Value* undef = llvm::UndefValue::get(Type::getFloatTy(m_pModule->getContext()));
|
||||
if (pConstVertexIndex == nullptr || IGC_IS_FLAG_ENABLED(ForceStaticToDynamic))
|
||||
auto pCtx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext();
|
||||
if (pConstVertexIndex == nullptr || pCtx->platform.disableStaticVertexCount())
|
||||
{
|
||||
IGC_ASSERT(m_gsProps->GetProperties().Output().HasNonstaticVertexCount());
|
||||
// bitcast since data arguments of urbWrite are floats - ugly
|
||||
|
||||
@ -395,6 +395,11 @@ bool hasEarlyGRFRead() const
|
||||
return m_platformInfo.eProductFamily == IGFX_TIGERLAKE_LP && m_platformInfo.usRevId == REVISION_A0;
|
||||
}
|
||||
|
||||
bool disableStaticVertexCount() const
|
||||
{
|
||||
return m_WaTable.Wa_14012504847 != 0 || IGC_IS_FLAG_ENABLED(ForceStaticToDynamic);
|
||||
}
|
||||
|
||||
bool hasSamplerSupport() const
|
||||
{
|
||||
return true;
|
||||
|
||||
@ -8487,6 +8487,12 @@ typedef struct _WA_TABLE
|
||||
"Workaround",
|
||||
WA_BUG_TYPE_UNKNOWN,
|
||||
WA_BUG_PERF_IMPACT_UNKNOWN, WA_COMPONENT_UNKNOWN)
|
||||
|
||||
WA_DECLARE(
|
||||
Wa_14012504847,
|
||||
"Workaround",
|
||||
WA_BUG_TYPE_UNKNOWN,
|
||||
WA_BUG_PERF_IMPACT_UNKNOWN, WA_COMPONENT_UNKNOWN)
|
||||
} WA_TABLE, *PWA_TABLE;
|
||||
|
||||
#ifdef _USC_
|
||||
|
||||
Reference in New Issue
Block a user