blob: 64e32edfa2c6978f44e1132e938c56479da2882b (
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
47
48
49
50
51
52
|
/*
Iterator based JIT compiler
There is a new structure that can be either source or
destination. It contains function pointers that know how to generate
pixels. The function pointers:
Source iterators:
- begin(): generates code that runs before the kernel
- begin_line(): generates code that runs before each scanline
- get_one_pixel(): generates code that reads one pixel
- get_two_pixels(): --- two pixels
- get_four_pixels(): --- four pixels
- get_eight_pixels(): --- eight pixels
- get_sixteen_pixels(): ---
- end_line();
- end();
An iterator is associated with a format:
format_4_a8r8g8b8
format_16_a8
format_8_a8r8g8b8
and possibly others
The iterator is supposed to return pixels in that format. It will
never be asked to fetch more pixels than the format supports. Ie.,
get_sixteen_pixels() will never be called if the format is
format_4_a8r8g8b8().
All the get_n_pixels() return a register where they left the pixel.
There are also combiners. These are also associated with a format
and know how to combine pixels in that format with each other.
Destination iterators are responsible for driving a lot of the access?
They have a method: process_scanline (src_iter, mask_iter, combiner)
which is responsible for:
- generating the inner loop,
- calling src iter,
- callling mask iter,
- calling combiner
- writing back
They are specific to a format, and an intermediate format.
There may also be setup()/setup_line() methods required.
*/
|