Hacking to get first triangle drawn.

This commit is contained in:
Ben Vanik
2013-10-12 15:07:34 -07:00
parent 83d7523da1
commit 0ef278325f
13 changed files with 396 additions and 85 deletions

View File

@@ -11,6 +11,7 @@
#define XENIA_GPU_SHADER_H_
#include <xenia/core.h>
#include <xenia/gpu/xenos/ucode.h>
#include <xenia/gpu/xenos/xenos.h>
@@ -31,19 +32,27 @@ public:
uint64_t hash() const { return hash_; }
bool is_prepared() const { return is_prepared_; }
// vfetch formats
// sampler formats
// constants/registers/etc used
const xenos::instr_fetch_vtx_t* GetFetchVtxBySlot(uint32_t fetch_slot);
// NOTE: xe_free() the returned string!
char* Disassemble();
private:
void GatherIO();
void GatherAlloc(const xenos::instr_cf_alloc_t* cf);
void GatherExec(const xenos::instr_cf_exec_t* cf);
void GatherVertexFetch(const xenos::instr_fetch_vtx_t* vtx);
protected:
xenos::XE_GPU_SHADER_TYPE type_;
uint32_t* dwords_;
size_t dword_count_;
uint64_t hash_;
bool is_prepared_;
std::vector<xenos::instr_cf_alloc_t> allocs_;
std::vector<xenos::instr_fetch_vtx_t> fetch_vtxs_;
xenos::instr_fetch_vtx_t fetch_vtx_slots_[96];
};