mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
Add shader entry tag to common header
* We also allow GetPointerType to silently return NULL when no pointer exists, as this will be useful for encoding when we want to check if a pointer type exists.
This commit is contained in:
@@ -2435,9 +2435,7 @@ const Type *Program::GetPointerType(const Type *type, Type::PointerAddrSpace add
|
||||
}
|
||||
}
|
||||
|
||||
RDCERR("Couldn't find pointer type");
|
||||
|
||||
return type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Metadata::~Metadata()
|
||||
|
||||
@@ -81,6 +81,15 @@ enum class ResourceKind
|
||||
SamplerComparison,
|
||||
};
|
||||
|
||||
enum class ShaderEntryTag
|
||||
{
|
||||
ShaderFlags = 0,
|
||||
Geometry = 1,
|
||||
Domain = 2,
|
||||
Hull = 3,
|
||||
Compute = 4,
|
||||
};
|
||||
|
||||
}; // namespace DXIL
|
||||
|
||||
DECLARE_STRINGISE_TYPE(DXIL::ComponentType);
|
||||
|
||||
@@ -28,15 +28,6 @@
|
||||
|
||||
namespace DXIL
|
||||
{
|
||||
enum class ShaderTag
|
||||
{
|
||||
ShaderFlags = 0,
|
||||
Geometry = 1,
|
||||
Domain = 2,
|
||||
Hull = 3,
|
||||
Compute = 4,
|
||||
};
|
||||
|
||||
enum class ResField
|
||||
{
|
||||
ID = 0,
|
||||
@@ -149,7 +140,7 @@ void Program::FetchComputeProperties(DXBC::Reflection *reflection)
|
||||
for(size_t t = 0; t < tags.children.size(); t += 2)
|
||||
{
|
||||
RDCASSERT(tags.children[t]->isConstant);
|
||||
if(getival<ShaderTag>(tags.children[t]) == ShaderTag::Compute)
|
||||
if(getival<ShaderEntryTag>(tags.children[t]) == ShaderEntryTag::Compute)
|
||||
{
|
||||
Metadata &threadDim = *tags.children[t + 1];
|
||||
RDCASSERTEQUAL(threadDim.children.size(), 3);
|
||||
@@ -190,7 +181,7 @@ D3D_PRIMITIVE_TOPOLOGY Program::GetOutputTopology()
|
||||
for(size_t t = 0; t < tags.children.size(); t += 2)
|
||||
{
|
||||
RDCASSERT(tags.children[t]->isConstant);
|
||||
if(getival<ShaderTag>(tags.children[t]) == ShaderTag::Geometry)
|
||||
if(getival<ShaderEntryTag>(tags.children[t]) == ShaderEntryTag::Geometry)
|
||||
{
|
||||
Metadata &geomData = *tags.children[t + 1];
|
||||
RDCASSERTEQUAL(geomData.children.size(), 5);
|
||||
|
||||
Reference in New Issue
Block a user