Formatted EVERYTHING
This commit is contained in:
@@ -1,41 +1,34 @@
|
||||
#pragma once
|
||||
#include "Math/Math.h"
|
||||
#include "Enums.h"
|
||||
#include "Containers/Array.h"
|
||||
#include "Enums.h"
|
||||
#include "Math/Math.h"
|
||||
|
||||
|
||||
#ifndef ENABLE_VALIDATION
|
||||
#define ENABLE_VALIDATION 1
|
||||
#endif
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
namespace Seele {
|
||||
DECLARE_REF(Material)
|
||||
namespace Gfx
|
||||
{
|
||||
namespace Gfx {
|
||||
DECLARE_REF(DescriptorSet)
|
||||
DECLARE_REF(Graphics)
|
||||
DECLARE_REF(VertexBuffer)
|
||||
DECLARE_REF(IndexBuffer)
|
||||
DECLARE_REF(GraphicsPipeline)
|
||||
DECLARE_REF(ComputePipeline)
|
||||
class Sampler
|
||||
{
|
||||
public:
|
||||
virtual ~Sampler()
|
||||
{
|
||||
}
|
||||
class Sampler {
|
||||
public:
|
||||
virtual ~Sampler() {}
|
||||
};
|
||||
DEFINE_REF(Sampler)
|
||||
|
||||
struct QueueFamilyMapping
|
||||
{
|
||||
struct QueueFamilyMapping {
|
||||
uint32 graphicsFamily;
|
||||
uint32 computeFamily;
|
||||
uint32 transferFamily;
|
||||
uint32 getQueueTypeFamilyIndex(Gfx::QueueType type) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
uint32 getQueueTypeFamilyIndex(Gfx::QueueType type) const {
|
||||
switch (type) {
|
||||
case Gfx::QueueType::GRAPHICS:
|
||||
return graphicsFamily;
|
||||
case Gfx::QueueType::COMPUTE:
|
||||
@@ -46,28 +39,26 @@ struct QueueFamilyMapping
|
||||
return 0x7fff;
|
||||
}
|
||||
}
|
||||
bool needsTransfer(Gfx::QueueType src, Gfx::QueueType dst) const
|
||||
{
|
||||
bool needsTransfer(Gfx::QueueType src, Gfx::QueueType dst) const {
|
||||
uint32 srcIndex = getQueueTypeFamilyIndex(src);
|
||||
uint32 dstIndex = getQueueTypeFamilyIndex(dst);
|
||||
return srcIndex != dstIndex;
|
||||
}
|
||||
};
|
||||
|
||||
class QueueOwnedResource
|
||||
{
|
||||
public:
|
||||
class QueueOwnedResource {
|
||||
public:
|
||||
QueueOwnedResource(QueueFamilyMapping mapping, QueueType startQueueType);
|
||||
virtual ~QueueOwnedResource();
|
||||
|
||||
//Preliminary checks to see if the barrier should be executed at all
|
||||
// Preliminary checks to see if the barrier should be executed at all
|
||||
void transferOwnership(QueueType newOwner);
|
||||
void pipelineBarrier(SeAccessFlags srcAccess, SePipelineStageFlags srcStage, SeAccessFlags dstAccess, SePipelineStageFlags dstStage);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
virtual void executeOwnershipBarrier(QueueType newOwner) = 0;
|
||||
virtual void executePipelineBarrier(SeAccessFlags srcAccess, SePipelineStageFlags srcStage,
|
||||
SeAccessFlags dstAccess, SePipelineStageFlags dstStage) = 0;
|
||||
virtual void executePipelineBarrier(SeAccessFlags srcAccess, SePipelineStageFlags srcStage, SeAccessFlags dstAccess,
|
||||
SePipelineStageFlags dstStage) = 0;
|
||||
Gfx::QueueType currentOwner;
|
||||
QueueFamilyMapping mapping;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user