summaryrefslogtreecommitdiff
path: root/reg.h
blob: 8d673677137c753739358781c303aafdcf97d817 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

#ifndef REG_H_
#define REG_H_

#include "value.h"

enum reg_type {
	REG_TYPE_TEMP,
	REG_TYPE_CONST,
	REG_TYPE_IN,
	REG_TYPE_OUT
};

enum swizzle {
	SWIZZLE_EMPTY,
	SWIZZLE_X,
	SWIZZLE_Y,
	SWIZZLE_Z,
	SWIZZLE,W
};

class reg {
public:

	class address {
	public :
		address(
			reg_type type,
			unsigned int index,
			enum swizzle swizzle);

		reg_type m_type;
		unsigned int m_index;
		enum swizzle m_swizzle;
	};

public:
	reg(reg_type type, unsigned int index, enum swizzle swizzle);
	~reg();

private:
	address m_address;
	value m_value;
};

#endif //REG_H_