mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Don't print an error when precaching common types
This commit is contained in:
@@ -2346,7 +2346,7 @@ uint32_t Program::GetOrAssignMetaID(DebugLocation &l)
|
||||
return l.id;
|
||||
}
|
||||
|
||||
const DXIL::Type *Program::GetVoidType()
|
||||
const DXIL::Type *Program::GetVoidType(bool precache)
|
||||
{
|
||||
if(m_VoidType)
|
||||
return m_VoidType;
|
||||
@@ -2360,13 +2360,13 @@ const DXIL::Type *Program::GetVoidType()
|
||||
}
|
||||
}
|
||||
|
||||
if(!m_VoidType)
|
||||
if(!m_VoidType && !precache)
|
||||
RDCERR("Couldn't find void type");
|
||||
|
||||
return m_VoidType;
|
||||
}
|
||||
|
||||
const DXIL::Type *Program::GetBoolType()
|
||||
const DXIL::Type *Program::GetBoolType(bool precache)
|
||||
{
|
||||
if(m_BoolType)
|
||||
return m_BoolType;
|
||||
@@ -2381,13 +2381,13 @@ const DXIL::Type *Program::GetBoolType()
|
||||
}
|
||||
}
|
||||
|
||||
if(!m_BoolType)
|
||||
if(!m_BoolType && !precache)
|
||||
RDCERR("Couldn't find bool type");
|
||||
|
||||
return m_BoolType;
|
||||
}
|
||||
|
||||
const Type *Program::GetInt32Type()
|
||||
const Type *Program::GetInt32Type(bool precache)
|
||||
{
|
||||
if(m_Int32Type)
|
||||
return m_Int32Type;
|
||||
@@ -2402,7 +2402,7 @@ const Type *Program::GetInt32Type()
|
||||
}
|
||||
}
|
||||
|
||||
if(!m_Int32Type)
|
||||
if(!m_Int32Type && !precache)
|
||||
RDCERR("Couldn't find int32 type");
|
||||
|
||||
return m_Int32Type;
|
||||
|
||||
@@ -687,9 +687,9 @@ protected:
|
||||
|
||||
uint32_t GetOrAssignMetaID(Metadata *m);
|
||||
uint32_t GetOrAssignMetaID(DebugLocation &l);
|
||||
const Type *GetVoidType();
|
||||
const Type *GetBoolType();
|
||||
const Type *GetInt32Type();
|
||||
const Type *GetVoidType(bool precache = false);
|
||||
const Type *GetBoolType(bool precache = false);
|
||||
const Type *GetInt32Type(bool precache = false);
|
||||
const Type *GetInt8Type();
|
||||
const Type *GetPointerType(const Type *type, Type::PointerAddrSpace addrSpace) const;
|
||||
|
||||
|
||||
@@ -490,9 +490,9 @@ ProgramEditor::~ProgramEditor()
|
||||
#endif
|
||||
|
||||
// cache known types for encoding
|
||||
GetVoidType();
|
||||
GetBoolType();
|
||||
GetInt32Type();
|
||||
GetVoidType(true);
|
||||
GetBoolType(true);
|
||||
GetInt32Type(true);
|
||||
|
||||
// replace the DXIL bytecode in the container with
|
||||
DXBC::DXBCContainer::ReplaceChunk(m_OutBlob, DXBC::FOURCC_DXIL, EncodeProgram());
|
||||
|
||||
Reference in New Issue
Block a user