summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2010-10-27 16:49:26 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2010-11-02 14:28:55 +0800
commit0ab2c05a291738ee763eb518c46e6dcfe29249a2 (patch)
tree538959bbaff2f714d37d53b8bed470a5fbe347ff /src
parent21c86548dc2c80632c49ec6ec4da2935a0c99476 (diff)
render: fragments for composite on Sandybridge
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/render_program/Makefile.am18
l---------src/render_program/exa_wm_ca.g6a1
-rw-r--r--src/render_program/exa_wm_ca.g6b4
l---------src/render_program/exa_wm_ca_srcalpha.g6a1
-rw-r--r--src/render_program/exa_wm_ca_srcalpha.g6b4
-rw-r--r--src/render_program/exa_wm_mask_affine.g6a47
-rw-r--r--src/render_program/exa_wm_mask_affine.g6b4
-rw-r--r--src/render_program/exa_wm_mask_projective.g6a63
-rw-r--r--src/render_program/exa_wm_mask_projective.g6b12
l---------src/render_program/exa_wm_mask_sample_a.g6a1
-rw-r--r--src/render_program/exa_wm_mask_sample_a.g6b3
l---------src/render_program/exa_wm_mask_sample_argb.g6a1
-rw-r--r--src/render_program/exa_wm_mask_sample_argb.g6b3
l---------src/render_program/exa_wm_noca.g6a1
-rw-r--r--src/render_program/exa_wm_noca.g6b4
-rw-r--r--src/render_program/exa_wm_src_projective.g6a63
-rw-r--r--src/render_program/exa_wm_src_projective.g6b12
l---------src/render_program/exa_wm_src_sample_a.g6a1
-rw-r--r--src/render_program/exa_wm_src_sample_a.g6b3
19 files changed, 246 insertions, 0 deletions
diff --git a/src/render_program/Makefile.am b/src/render_program/Makefile.am
index 5229ef52..1a194375 100644
--- a/src/render_program/Makefile.am
+++ b/src/render_program/Makefile.am
@@ -63,15 +63,33 @@ INTEL_G4B_GEN5 = \
INTEL_G6A = \
exa_wm_src_affine.g6a \
+ exa_wm_src_projective.g6a \
exa_wm_src_sample_argb.g6a \
exa_wm_src_sample_planar.g6a \
+ exa_wm_src_sample_a.g6a \
+ exa_wm_mask_affine.g6a \
+ exa_wm_mask_projective.g6a \
+ exa_wm_mask_sample_argb.g6a \
+ exa_wm_mask_sample_a.g6a \
+ exa_wm_ca.g6a \
+ exa_wm_ca_srcalpha.g6a \
+ exa_wm_noca.g6a \
exa_wm_write.g6a \
exa_wm_yuv_rgb.g6a
INTEL_G6B = \
exa_wm_src_affine.g6b \
+ exa_wm_src_projective.g6b \
exa_wm_src_sample_argb.g6b \
exa_wm_src_sample_planar.g6b \
+ exa_wm_src_sample_a.g6b \
+ exa_wm_mask_affine.g6b \
+ exa_wm_mask_projective.g6b \
+ exa_wm_mask_sample_argb.g6b \
+ exa_wm_mask_sample_a.g6b \
+ exa_wm_ca.g6b \
+ exa_wm_ca_srcalpha.g6b \
+ exa_wm_noca.g6b \
exa_wm_write.g6b \
exa_wm_yuv_rgb.g6b
diff --git a/src/render_program/exa_wm_ca.g6a b/src/render_program/exa_wm_ca.g6a
new file mode 120000
index 00000000..a29acb1e
--- /dev/null
+++ b/src/render_program/exa_wm_ca.g6a
@@ -0,0 +1 @@
+exa_wm_ca.g4a \ No newline at end of file
diff --git a/src/render_program/exa_wm_ca.g6b b/src/render_program/exa_wm_ca.g6b
new file mode 100644
index 00000000..521a5b64
--- /dev/null
+++ b/src/render_program/exa_wm_ca.g6b
@@ -0,0 +1,4 @@
+ { 0x00800041, 0x21c077bd, 0x008d01c0, 0x008d02c0 },
+ { 0x00800041, 0x220077bd, 0x008d0200, 0x008d0300 },
+ { 0x00800041, 0x224077bd, 0x008d0240, 0x008d0340 },
+ { 0x00800041, 0x228077bd, 0x008d0280, 0x008d0380 },
diff --git a/src/render_program/exa_wm_ca_srcalpha.g6a b/src/render_program/exa_wm_ca_srcalpha.g6a
new file mode 120000
index 00000000..3503521c
--- /dev/null
+++ b/src/render_program/exa_wm_ca_srcalpha.g6a
@@ -0,0 +1 @@
+exa_wm_ca_srcalpha.g4a \ No newline at end of file
diff --git a/src/render_program/exa_wm_ca_srcalpha.g6b b/src/render_program/exa_wm_ca_srcalpha.g6b
new file mode 100644
index 00000000..d5ab7e42
--- /dev/null
+++ b/src/render_program/exa_wm_ca_srcalpha.g6b
@@ -0,0 +1,4 @@
+ { 0x00800041, 0x21c077bd, 0x008d02c0, 0x008d0280 },
+ { 0x00800041, 0x220077bd, 0x008d0300, 0x008d0280 },
+ { 0x00800041, 0x224077bd, 0x008d0340, 0x008d0280 },
+ { 0x00800041, 0x228077bd, 0x008d0380, 0x008d0280 },
diff --git a/src/render_program/exa_wm_mask_affine.g6a b/src/render_program/exa_wm_mask_affine.g6a
new file mode 100644
index 00000000..2daf4e24
--- /dev/null
+++ b/src/render_program/exa_wm_mask_affine.g6a
@@ -0,0 +1,47 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+/*
+ * Fragment to compute src u/v values
+ */
+include(`exa_wm.g4i')
+
+define(`ul', `mask_u')
+define(`uh', `m9')
+define(`vl', `mask_v')
+define(`vh', `m11')
+
+define(`bl', `g2.0<8,8,1>F')
+define(`bh', `g4.0<8,8,1>F')
+
+define(`a0_a_x',`g8.0<0,1,0>F')
+define(`a0_a_y',`g8.16<0,1,0>F')
+
+/* U */
+pln (8) ul<1>F a0_a_x bl { align1 }; /* pixel 0-7 */
+pln (8) uh<1>F a0_a_x bh { align1 }; /* pixel 8-15 */
+
+/* V */
+pln (8) vl<1>F a0_a_y bl { align1 }; /* pixel 0-7 */
+pln (8) vh<1>F a0_a_y bh { align1 }; /* pixel 8-15 */
diff --git a/src/render_program/exa_wm_mask_affine.g6b b/src/render_program/exa_wm_mask_affine.g6b
new file mode 100644
index 00000000..e4bef29e
--- /dev/null
+++ b/src/render_program/exa_wm_mask_affine.g6b
@@ -0,0 +1,4 @@
+ { 0x0060005a, 0x210077be, 0x00000100, 0x008d0040 },
+ { 0x0060005a, 0x212077be, 0x00000100, 0x008d0080 },
+ { 0x0060005a, 0x214077be, 0x00000110, 0x008d0040 },
+ { 0x0060005a, 0x216077be, 0x00000110, 0x008d0080 },
diff --git a/src/render_program/exa_wm_mask_projective.g6a b/src/render_program/exa_wm_mask_projective.g6a
new file mode 100644
index 00000000..378c2774
--- /dev/null
+++ b/src/render_program/exa_wm_mask_projective.g6a
@@ -0,0 +1,63 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+/*
+ * Fragment to compute src u/v values
+ */
+include(`exa_wm.g4i')
+
+define(`u', `mask_u')
+define(`ul', `mask_u')
+define(`uh', `m9')
+define(`v', `mask_v')
+define(`vl', `mask_v')
+define(`vh', `m11')
+define(`w', `mask_w')
+define(`wl', `mask_w_0')
+define(`wh', `mask_w_1')
+
+define(`bl', `g2.0<8,8,1>F')
+define(`bh', `g4.0<8,8,1>F')
+
+define(`a0_a_x',`g8.0<0,1,0>F')
+define(`a0_a_y',`g8.16<0,1,0>F')
+define(`a0_a_z',`g9.0<0,1,0>F')
+
+/* W */
+pln (8) temp_x_0<1>F a0_a_z bl { align1 }; /* pixel 0-7 */
+pln (8) temp_x_1<1>F a0_a_z bh { align1 }; /* pixel 8-15 */
+math (8) wl<1>F temp_x_0<8,8,1>F null inv { align1 };
+math (8) wh<1>F temp_x_1<8,8,1>F null inv { align1 };
+
+/* U */
+pln (8) temp_x_0<1>F a0_a_x bl { align1 }; /* pixel 0-7 */
+pln (8) temp_x_1<1>F a0_a_x bh { align1 }; /* pixel 8-15 */
+mul (8) ul<1>F temp_x_0<8,8,1>F wl<8,8,1>F { align1 };
+mul (8) uh<1>F temp_x_1<8,8,1>F wh<8,8,1>F { align1 };
+
+/* V */
+pln (8) temp_x_0<1>F a0_a_y bl { align1 }; /* pixel 0-7 */
+pln (8) temp_x_1<1>F a0_a_y bh { align1 }; /* pixel 8-15 */
+mul (8) vl<1>F temp_x_0<8,8,1>F wl<8,8,1>F { align1 };
+mul (8) vh<1>F temp_x_1<8,8,1>F wh<8,8,1>F { align1 };
diff --git a/src/render_program/exa_wm_mask_projective.g6b b/src/render_program/exa_wm_mask_projective.g6b
new file mode 100644
index 00000000..dddcb4bd
--- /dev/null
+++ b/src/render_program/exa_wm_mask_projective.g6b
@@ -0,0 +1,12 @@
+ { 0x0060005a, 0x23c077bd, 0x00000120, 0x008d0040 },
+ { 0x0060005a, 0x23e077bd, 0x00000120, 0x008d0080 },
+ { 0x01600038, 0x218003bd, 0x008d03c0, 0x00000000 },
+ { 0x01600038, 0x21a003bd, 0x008d03e0, 0x00000000 },
+ { 0x0060005a, 0x23c077bd, 0x00000100, 0x008d0040 },
+ { 0x0060005a, 0x23e077bd, 0x00000100, 0x008d0080 },
+ { 0x00600041, 0x210077be, 0x008d03c0, 0x008d0180 },
+ { 0x00600041, 0x212077be, 0x008d03e0, 0x008d01a0 },
+ { 0x0060005a, 0x23c077bd, 0x00000110, 0x008d0040 },
+ { 0x0060005a, 0x23e077bd, 0x00000110, 0x008d0080 },
+ { 0x00600041, 0x214077be, 0x008d03c0, 0x008d0180 },
+ { 0x00600041, 0x216077be, 0x008d03e0, 0x008d01a0 },
diff --git a/src/render_program/exa_wm_mask_sample_a.g6a b/src/render_program/exa_wm_mask_sample_a.g6a
new file mode 120000
index 00000000..9e34bd10
--- /dev/null
+++ b/src/render_program/exa_wm_mask_sample_a.g6a
@@ -0,0 +1 @@
+exa_wm_mask_sample_a.g4a \ No newline at end of file
diff --git a/src/render_program/exa_wm_mask_sample_a.g6b b/src/render_program/exa_wm_mask_sample_a.g6b
new file mode 100644
index 00000000..6d1eae93
--- /dev/null
+++ b/src/render_program/exa_wm_mask_sample_a.g6b
@@ -0,0 +1,3 @@
+ { 0x00000201, 0x20080061, 0x00000000, 0x00007000 },
+ { 0x00600001, 0x20e00022, 0x008d0000, 0x00000000 },
+ { 0x02800031, 0x23801cc9, 0x000000e0, 0x0a2a0102 },
diff --git a/src/render_program/exa_wm_mask_sample_argb.g6a b/src/render_program/exa_wm_mask_sample_argb.g6a
new file mode 120000
index 00000000..b7443bdb
--- /dev/null
+++ b/src/render_program/exa_wm_mask_sample_argb.g6a
@@ -0,0 +1 @@
+exa_wm_mask_sample_argb.g4a \ No newline at end of file
diff --git a/src/render_program/exa_wm_mask_sample_argb.g6b b/src/render_program/exa_wm_mask_sample_argb.g6b
new file mode 100644
index 00000000..e5630bd1
--- /dev/null
+++ b/src/render_program/exa_wm_mask_sample_argb.g6b
@@ -0,0 +1,3 @@
+ { 0x00000201, 0x20080061, 0x00000000, 0x00000000 },
+ { 0x00600001, 0x20e00022, 0x008d0000, 0x00000000 },
+ { 0x02800031, 0x22c01cc9, 0x000000e0, 0x0a8a0102 },
diff --git a/src/render_program/exa_wm_noca.g6a b/src/render_program/exa_wm_noca.g6a
new file mode 120000
index 00000000..cbf851e4
--- /dev/null
+++ b/src/render_program/exa_wm_noca.g6a
@@ -0,0 +1 @@
+exa_wm_noca.g4a \ No newline at end of file
diff --git a/src/render_program/exa_wm_noca.g6b b/src/render_program/exa_wm_noca.g6b
new file mode 100644
index 00000000..e77ea2dd
--- /dev/null
+++ b/src/render_program/exa_wm_noca.g6b
@@ -0,0 +1,4 @@
+ { 0x00800041, 0x21c077bd, 0x008d01c0, 0x008d0380 },
+ { 0x00800041, 0x220077bd, 0x008d0200, 0x008d0380 },
+ { 0x00800041, 0x224077bd, 0x008d0240, 0x008d0380 },
+ { 0x00800041, 0x228077bd, 0x008d0280, 0x008d0380 },
diff --git a/src/render_program/exa_wm_src_projective.g6a b/src/render_program/exa_wm_src_projective.g6a
new file mode 100644
index 00000000..af08effa
--- /dev/null
+++ b/src/render_program/exa_wm_src_projective.g6a
@@ -0,0 +1,63 @@
+/*
+ * Copyright © 2010 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+/*
+ * Fragment to compute src u/v values
+ */
+include(`exa_wm.g4i')
+
+define(`u', `src_u')
+define(`ul', `src_u')
+define(`uh', `m3')
+define(`v', `src_v')
+define(`vl', `src_v')
+define(`vh', `m5')
+define(`w', `src_w')
+define(`wl', `src_w_0')
+define(`wh', `src_w_1')
+
+define(`bl', `g2.0<8,8,1>F')
+define(`bh', `g4.0<8,8,1>F')
+
+define(`a0_a_x',`g6.0<0,1,0>F')
+define(`a0_a_y',`g6.16<0,1,0>F')
+define(`a0_a_z',`g7.0<0,1,0>F')
+
+/* W */
+pln (8) temp_x_0<1>F a0_a_z bl { align1 }; /* pixel 0-7 */
+pln (8) temp_x_1<1>F a0_a_z bh { align1 }; /* pixel 8-15 */
+math (8) wl<1>F temp_x_0<8,8,1>F null inv { align1 };
+math (8) wh<1>F temp_x_1<8,8,1>F null inv { align1 };
+
+/* U */
+pln (8) temp_x_0<1>F a0_a_x bl { align1 }; /* pixel 0-7 */
+pln (8) temp_x_1<1>F a0_a_x bh { align1 }; /* pixel 8-15 */
+mul (8) ul<1>F temp_x_0<8,8,1>F wl<8,8,1>F { align1 };
+mul (8) uh<1>F temp_x_1<8,8,1>F wh<8,8,1>F { align1 };
+
+/* V */
+pln (8) temp_x_0<1>F a0_a_y bl { align1 }; /* pixel 0-7 */
+pln (8) temp_x_1<1>F a0_a_y bh { align1 }; /* pixel 8-15 */
+mul (8) vl<1>F temp_x_0<8,8,1>F wl<8,8,1>F { align1 };
+mul (8) vh<1>F temp_x_1<8,8,1>F wh<8,8,1>F { align1 };
diff --git a/src/render_program/exa_wm_src_projective.g6b b/src/render_program/exa_wm_src_projective.g6b
new file mode 100644
index 00000000..8e39bffa
--- /dev/null
+++ b/src/render_program/exa_wm_src_projective.g6b
@@ -0,0 +1,12 @@
+ { 0x0060005a, 0x23c077bd, 0x000000e0, 0x008d0040 },
+ { 0x0060005a, 0x23e077bd, 0x000000e0, 0x008d0080 },
+ { 0x01600038, 0x218003bd, 0x008d03c0, 0x00000000 },
+ { 0x01600038, 0x21a003bd, 0x008d03e0, 0x00000000 },
+ { 0x0060005a, 0x23c077bd, 0x000000c0, 0x008d0040 },
+ { 0x0060005a, 0x23e077bd, 0x000000c0, 0x008d0080 },
+ { 0x00600041, 0x204077be, 0x008d03c0, 0x008d0180 },
+ { 0x00600041, 0x206077be, 0x008d03e0, 0x008d01a0 },
+ { 0x0060005a, 0x23c077bd, 0x000000d0, 0x008d0040 },
+ { 0x0060005a, 0x23e077bd, 0x000000d0, 0x008d0080 },
+ { 0x00600041, 0x208077be, 0x008d03c0, 0x008d0180 },
+ { 0x00600041, 0x20a077be, 0x008d03e0, 0x008d01a0 },
diff --git a/src/render_program/exa_wm_src_sample_a.g6a b/src/render_program/exa_wm_src_sample_a.g6a
new file mode 120000
index 00000000..c6e112c1
--- /dev/null
+++ b/src/render_program/exa_wm_src_sample_a.g6a
@@ -0,0 +1 @@
+exa_wm_src_sample_a.g4a \ No newline at end of file
diff --git a/src/render_program/exa_wm_src_sample_a.g6b b/src/render_program/exa_wm_src_sample_a.g6b
new file mode 100644
index 00000000..0b4a955d
--- /dev/null
+++ b/src/render_program/exa_wm_src_sample_a.g6b
@@ -0,0 +1,3 @@
+ { 0x00000201, 0x20080061, 0x00000000, 0x00007000 },
+ { 0x00600001, 0x20200022, 0x008d0000, 0x00000000 },
+ { 0x02800031, 0x22801cc9, 0x00000020, 0x0a2a0001 },