Misc cleanup during review
This commit is contained in:
Родитель
7a085056f8
Коммит
397a67082e
|
@ -197,10 +197,7 @@ public:
|
|||
// TemplateArgument tags
|
||||
static const unsigned kDxilTemplateArgTypeTag = 0; // Type template argument, followed by undef of type
|
||||
static const unsigned kDxilTemplateArgIntegralTag = 1; // Integral template argument, followed by i64 value
|
||||
// TemplateArgType
|
||||
static const unsigned kDxilTemplateArgType = 1; // Position of type for template arg that is type
|
||||
static const unsigned kDxilTemplateArgIntegral = 1; // Position of i64 for template arg that is integral
|
||||
|
||||
static const unsigned kDxilTemplateArgValue = 1; // Position of template arg value (type or int)
|
||||
|
||||
// Control flow hint.
|
||||
static const char kDxilControlFlowHintMDName[];
|
||||
|
|
|
@ -795,11 +795,11 @@ void DxilMDHelper::LoadDxilTemplateArgAnnotation(const llvm::MDOperand &MDO, Dxi
|
|||
case kDxilTemplateArgTypeTag:
|
||||
IFTBOOL(pTupleMD->getNumOperands() == 2, DXC_E_INCORRECT_DXIL_METADATA);
|
||||
annotation.SetType(MetadataAsValue::get(m_Ctx,
|
||||
pTupleMD->getOperand(kDxilTemplateArgType))->getType());
|
||||
pTupleMD->getOperand(kDxilTemplateArgValue))->getType());
|
||||
break;
|
||||
case kDxilTemplateArgIntegralTag:
|
||||
IFTBOOL(pTupleMD->getNumOperands() == 2, DXC_E_INCORRECT_DXIL_METADATA);
|
||||
annotation.SetIntegral((int64_t)ConstMDToUint64(pTupleMD->getOperand(kDxilTemplateArgType)));
|
||||
annotation.SetIntegral((int64_t)ConstMDToUint64(pTupleMD->getOperand(kDxilTemplateArgValue)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -565,7 +565,7 @@ bool IsHLSLRayQueryType(llvm::Type *Ty) {
|
|||
if (llvm::StructType *ST = dyn_cast<llvm::StructType>(Ty)) {
|
||||
StringRef name = ST->getName();
|
||||
// TODO: don't check names.
|
||||
name = name.ltrim("class.");
|
||||
ConsumePrefix(name, "class.");
|
||||
if (name.startswith("RayQuery<"))
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2171,7 +2171,15 @@ UINT DxilShaderReflection::GetThreadGroupSize(UINT *pSizeX, UINT *pSizeY, UINT *
|
|||
}
|
||||
|
||||
UINT64 DxilShaderReflection::GetRequiresFlags() {
|
||||
return m_pDxilModule->m_ShaderFlags.GetFeatureInfo();
|
||||
UINT64 result = m_pDxilModule->m_ShaderFlags.GetFeatureInfo();
|
||||
// FeatureInfo flags are identical, with the exception of a collision between:
|
||||
// SHADER_FEATURE_COMPUTE_SHADERS_PLUS_RAW_AND_STRUCTURED_BUFFERS_VIA_SHADER_4_X
|
||||
// and D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL
|
||||
// We keep track of the flag elsewhere, so use that instead.
|
||||
result &= ~(UINT64)D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL;
|
||||
if (m_pDxilModule->m_ShaderFlags.GetForceEarlyDepthStencil())
|
||||
result |= D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче