summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/compiler/radeon_emulate_loops.h
blob: 7748813c4eb33b0e0309273f87f32b65860c0344 (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


#ifndef RADEON_EMULATE_LOOPS_H
#define RADEON_EMULATE_LOOPS_H

#define MAX_ITERATIONS 8

struct radeon_compiler;

struct loop_info {
	struct rc_instruction * BeginLoop;
	struct rc_instruction * Cond;
	struct rc_instruction * If;
	struct rc_instruction * Brk;
	struct rc_instruction * EndIf;
	struct rc_instruction * EndLoop;
};

struct emulate_loop_state {
	struct radeon_compiler * C;
	struct loop_info * Loops;
	unsigned int LoopCount;
	unsigned int LoopReserved;
};

void rc_transform_unroll_loops(struct radeon_compiler *c,
					struct emulate_loop_state * s);

void rc_emulate_loops(struct emulate_loop_state *s,
					unsigned int max_instructions);

#endif /* RADEON_EMULATE_LOOPS_H */