[Intel-gfx] [PATCH 3/5] render: fragments for composite on Sandybridge

Xiang, Haihao haihao.xiang at intel.com
Mon Nov 1 09:33:38 CET 2010


Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
---
 src/render_program/Makefile.am                 |   18 +++++++
 src/render_program/exa_wm_ca.g6a               |    1 +
 src/render_program/exa_wm_ca.g6b               |    4 ++
 src/render_program/exa_wm_ca_srcalpha.g6a      |    1 +
 src/render_program/exa_wm_ca_srcalpha.g6b      |    4 ++
 src/render_program/exa_wm_mask_affine.g6a      |   47 ++++++++++++++++++
 src/render_program/exa_wm_mask_affine.g6b      |    4 ++
 src/render_program/exa_wm_mask_projective.g6a  |   63 ++++++++++++++++++++++++
 src/render_program/exa_wm_mask_projective.g6b  |   12 +++++
 src/render_program/exa_wm_mask_sample_a.g6a    |    1 +
 src/render_program/exa_wm_mask_sample_a.g6b    |    3 +
 src/render_program/exa_wm_mask_sample_argb.g6a |    1 +
 src/render_program/exa_wm_mask_sample_argb.g6b |    3 +
 src/render_program/exa_wm_noca.g6a             |    1 +
 src/render_program/exa_wm_noca.g6b             |    4 ++
 src/render_program/exa_wm_src_projective.g6a   |   63 ++++++++++++++++++++++++
 src/render_program/exa_wm_src_projective.g6b   |   12 +++++
 src/render_program/exa_wm_src_sample_a.g6a     |    1 +
 src/render_program/exa_wm_src_sample_a.g6b     |    3 +
 19 files changed, 246 insertions(+), 0 deletions(-)
 create mode 120000 src/render_program/exa_wm_ca.g6a
 create mode 100644 src/render_program/exa_wm_ca.g6b
 create mode 120000 src/render_program/exa_wm_ca_srcalpha.g6a
 create mode 100644 src/render_program/exa_wm_ca_srcalpha.g6b
 create mode 100644 src/render_program/exa_wm_mask_affine.g6a
 create mode 100644 src/render_program/exa_wm_mask_affine.g6b
 create mode 100644 src/render_program/exa_wm_mask_projective.g6a
 create mode 100644 src/render_program/exa_wm_mask_projective.g6b
 create mode 120000 src/render_program/exa_wm_mask_sample_a.g6a
 create mode 100644 src/render_program/exa_wm_mask_sample_a.g6b
 create mode 120000 src/render_program/exa_wm_mask_sample_argb.g6a
 create mode 100644 src/render_program/exa_wm_mask_sample_argb.g6b
 create mode 120000 src/render_program/exa_wm_noca.g6a
 create mode 100644 src/render_program/exa_wm_noca.g6b
 create mode 100644 src/render_program/exa_wm_src_projective.g6a
 create mode 100644 src/render_program/exa_wm_src_projective.g6b
 create mode 120000 src/render_program/exa_wm_src_sample_a.g6a
 create mode 100644 src/render_program/exa_wm_src_sample_a.g6b

diff --git a/src/render_program/Makefile.am b/src/render_program/Makefile.am
index 5229ef5..1a19437 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 0000000..a29acb1
--- /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 0000000..521a5b6
--- /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 0000000..3503521
--- /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 0000000..d5ab7e4
--- /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 0000000..2daf4e2
--- /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 0000000..e4bef29
--- /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 0000000..378c277
--- /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 0000000..dddcb4b
--- /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 0000000..9e34bd1
--- /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 0000000..6d1eae9
--- /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 0000000..b7443bd
--- /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 0000000..e5630bd
--- /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 0000000..cbf851e
--- /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 0000000..e77ea2d
--- /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 0000000..af08eff
--- /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 0000000..8e39bff
--- /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 0000000..c6e112c
--- /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 0000000..0b4a955
--- /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 },
-- 
1.7.0.4




More information about the Intel-gfx mailing list