Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5361 | serge | 1 | /* |
2 | * Copyright © <2010>, Intel Corporation. |
||
3 | * |
||
4 | * This program is licensed under the terms and conditions of the |
||
5 | * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at |
||
6 | * http://www.opensource.org/licenses/eclipse-1.0.php. |
||
7 | * |
||
8 | */ |
||
9 | //=============== Spawn a child thread for Luma or Chroma =============== |
||
10 | |||
11 | //----- Create child thread R0 header ----- |
||
12 | #if defined(_DEBUG) |
||
13 | mov (1) EntrySignature:w 0xAAAA:w |
||
14 | #endif |
||
15 | |||
16 | //***** Set CT_R0Hdr fields that change for every thread |
||
17 | |||
18 | // Restore CT_R0Hdr.4:ud to r0.4:ud |
||
19 | mov (1) CT_R0Hdr.4:ud r0.4:ud |
||
20 | |||
21 | // R0.2: Interface Discriptor Ptr. Add a child offset for child kernel |
||
22 | // add (1) CT_R0Hdr.2:ud r0.2:ud CHILD_OFFSET:w |
||
23 | |||
24 | // Assign a new Thread Count for this child |
||
25 | mov (1) CT_R0Hdr.6:ud ChildThreadsID:uw |
||
26 | |||
27 | //----- Prepare URB for launching a child thread ----- |
||
28 | mov (16) m2.0:w ChildParam<16;16,1>:w |
||
29 | |||
30 | shr (1) MRF0.0:uw URBOffset:uw 1:w |
||
31 | |||
32 | add (1) ChildThreadsID:uw ChildThreadsID:uw 2:uw // Luma child=even, chroma child=odd |
||
33 | |||
34 | //-------------------------------------------------- |
||
35 | // #include "writeURB.asm" |
||
36 | send null:uw MRF0 null:ud URBWRITE URBWriteMsgDesc:ud // URB write |
||
37 | |||
38 | //-------------------------------------------------- |
||
39 | // Set URB handle for child thread launching: |
||
40 | // URB handle Length (bit 15:10) - 0000 0000 0000 0000 yyyy yy00 0000 0000 |
||
41 | // URB handle offset (bit 9:0) - 0000 0000 0000 0000 0000 00xx xxxx xxxx |
||
42 | |||
43 | or (1) CT_R0Hdr.4:ud URB_EntriesPerMB_2:w URBOffset:uw |
||
44 | |||
45 | // 2 URB entries: |
||
46 | // Entry 0 - CT_R0Hdr |
||
47 | // Entry 1 - input parameter to child kernel |
||
48 | |||
49 | //----- Spawn a child now ----- |
||
50 | send (8) null:ud CT_R0Hdr null:ud TS TSMSGDSC |
||
51 | // send (8) null:ud CT_Spawn_Reg null:ud 0x07100001 |
||
52 | |||
53 | |||
54 | // Restore CT_R0Hdr.4:ud to r0.4:ud for next use |
||
55 | // mov (1) CT_R0Hdr.4:ud r0.4:ud16;16,1>2010> |