Basic shader cache.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#define XENIA_GPU_SHADER_H_
|
||||
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/gpu/xenos/xenos.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
@@ -19,8 +20,28 @@ namespace gpu {
|
||||
|
||||
class Shader {
|
||||
public:
|
||||
Shader();
|
||||
Shader(xenos::XE_GPU_SHADER_TYPE type,
|
||||
const uint8_t* src_ptr, size_t length,
|
||||
uint64_t hash);
|
||||
virtual ~Shader();
|
||||
|
||||
xenos::XE_GPU_SHADER_TYPE type() const { return type_; }
|
||||
const uint32_t* dwords() const { return dwords_; }
|
||||
size_t dword_count() const { return dword_count_; }
|
||||
uint64_t hash() const { return hash_; }
|
||||
|
||||
// vfetch formats
|
||||
// sampler formats
|
||||
// constants/registers/etc used
|
||||
|
||||
// NOTE: xe_free() the returned string!
|
||||
char* Disassemble();
|
||||
|
||||
protected:
|
||||
xenos::XE_GPU_SHADER_TYPE type_;
|
||||
uint32_t* dwords_;
|
||||
size_t dword_count_;
|
||||
uint64_t hash_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user