Reformat all the things. Have fun with merge conflicts.

This commit is contained in:
Pierre Bourdon
2016-06-24 10:43:46 +02:00
parent 2115e8a4a6
commit 3570c7f03a
1116 changed files with 187405 additions and 180344 deletions

View File

@ -11,50 +11,49 @@
namespace DX12
{
class PerfQuery final : public PerfQueryBase
{
public:
PerfQuery();
~PerfQuery();
PerfQuery();
~PerfQuery();
void EnableQuery(PerfQueryGroup type) override;
void DisableQuery(PerfQueryGroup type) override;
void ResetQuery() override;
u32 GetQueryResult(PerfQueryType type) override;
void FlushResults() override;
bool IsFlushed() const override;
void EnableQuery(PerfQueryGroup type) override;
void DisableQuery(PerfQueryGroup type) override;
void ResetQuery() override;
u32 GetQueryResult(PerfQueryType type) override;
void FlushResults() override;
bool IsFlushed() const override;
private:
struct ActiveQuery
{
PerfQueryGroup query_type;
UINT64 fence_value;
};
struct ActiveQuery
{
PerfQueryGroup query_type;
UINT64 fence_value;
};
void WeakFlush();
void WeakFlush();
// Find the last fence value of all pending queries.
UINT64 FindLastPendingFenceValue() const;
// Find the last fence value of all pending queries.
UINT64 FindLastPendingFenceValue() const;
// Only use when non-empty
void FlushOne();
// Only use when non-empty
void FlushOne();
static void QueueFenceCallback(void* owning_object, UINT64 fence_value);
void QueueFence(UINT64 fence_value);
static void QueueFenceCallback(void* owning_object, UINT64 fence_value);
void QueueFence(UINT64 fence_value);
// when testing in SMS: 64 was too small, 128 was ok
static constexpr size_t PERF_QUERY_BUFFER_SIZE = 512;
static constexpr size_t QUERY_READBACK_BUFFER_SIZE = PERF_QUERY_BUFFER_SIZE * sizeof(UINT64);
// when testing in SMS: 64 was too small, 128 was ok
static constexpr size_t PERF_QUERY_BUFFER_SIZE = 512;
static constexpr size_t QUERY_READBACK_BUFFER_SIZE = PERF_QUERY_BUFFER_SIZE * sizeof(UINT64);
std::array<ActiveQuery, PERF_QUERY_BUFFER_SIZE> m_query_buffer;
int m_query_read_pos = 0;
std::array<ActiveQuery, PERF_QUERY_BUFFER_SIZE> m_query_buffer;
int m_query_read_pos = 0;
ID3D12QueryHeap* m_query_heap = nullptr;
ID3D12Resource* m_query_readback_buffer = nullptr;
ID3D12QueryHeap* m_query_heap = nullptr;
ID3D12Resource* m_query_readback_buffer = nullptr;
ID3D12Fence* m_tracking_fence = nullptr;
UINT64 m_next_fence_value = 0;
ID3D12Fence* m_tracking_fence = nullptr;
UINT64 m_next_fence_value = 0;
};
} // namespace
} // namespace