More refactoring
This commit is contained in:
@@ -30,51 +30,4 @@ void QueueOwnedResource::pipelineBarrier(SeAccessFlags srcAccess, SePipelineStag
|
||||
{
|
||||
// maybe add some checks
|
||||
executePipelineBarrier(srcAccess, srcStage, dstAccess, dstStage);
|
||||
}
|
||||
|
||||
|
||||
VertexDeclaration::VertexDeclaration()
|
||||
{
|
||||
}
|
||||
VertexDeclaration::~VertexDeclaration()
|
||||
{
|
||||
}
|
||||
|
||||
static std::mutex vertexDeclarationLock;
|
||||
static Map<uint32, PVertexDeclaration> vertexDeclarationCache;
|
||||
|
||||
PVertexDeclaration VertexDeclaration::createDeclaration(PGraphics graphics, const Array<VertexElement>& elementList)
|
||||
{
|
||||
std::scoped_lock lock(vertexDeclarationLock);
|
||||
uint32 key = CRC::Calculate(&elementList, sizeof(VertexElement) * elementList.size(), CRC::CRC_32());
|
||||
|
||||
auto found = vertexDeclarationCache[key];
|
||||
if(found == nullptr)
|
||||
{
|
||||
return found;
|
||||
}
|
||||
|
||||
PVertexDeclaration newDeclaration = graphics->createVertexDeclaration(elementList);
|
||||
|
||||
vertexDeclarationCache[key] = newDeclaration;
|
||||
return newDeclaration;
|
||||
}
|
||||
|
||||
RenderCommand::RenderCommand()
|
||||
{
|
||||
}
|
||||
|
||||
RenderCommand::~RenderCommand()
|
||||
{
|
||||
}
|
||||
|
||||
ComputeCommand::ComputeCommand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ComputeCommand::~ComputeCommand()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user