Factoring out a lot of reusable GPU code from gl4/.

This commit is contained in:
Ben Vanik
2015-11-08 11:54:36 -08:00
parent b26f4a5719
commit b5a18b5462
23 changed files with 3074 additions and 2746 deletions

View File

@@ -0,0 +1,84 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2015 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_GPU_TRACE_PROTOCOL_H_
#define XENIA_GPU_TRACE_PROTOCOL_H_
#include <cstdint>
namespace xe {
namespace gpu {
enum class TraceCommandType : uint32_t {
kPrimaryBufferStart,
kPrimaryBufferEnd,
kIndirectBufferStart,
kIndirectBufferEnd,
kPacketStart,
kPacketEnd,
kMemoryRead,
kMemoryWrite,
kEvent,
};
struct PrimaryBufferStartCommand {
TraceCommandType type;
uint32_t base_ptr;
uint32_t count;
};
struct PrimaryBufferEndCommand {
TraceCommandType type;
};
struct IndirectBufferStartCommand {
TraceCommandType type;
uint32_t base_ptr;
uint32_t count;
};
struct IndirectBufferEndCommand {
TraceCommandType type;
};
struct PacketStartCommand {
TraceCommandType type;
uint32_t base_ptr;
uint32_t count;
};
struct PacketEndCommand {
TraceCommandType type;
};
struct MemoryReadCommand {
TraceCommandType type;
uint32_t base_ptr;
uint32_t length;
};
struct MemoryWriteCommand {
TraceCommandType type;
uint32_t base_ptr;
uint32_t length;
};
enum class EventType {
kSwap,
};
struct EventCommand {
TraceCommandType type;
EventType event_type;
};
} // namespace gpu
} // namespace xe
#endif // XENIA_GPU_TRACE_PROTOCOL_H_