enable Xv on Ivybridge
cover enable Xv on Ivybridge
Xiang, Haihao (5):
Xv: separate fragments from M4 macros
Xv: New shaders for Xv on Ivybridge
Xv: update SURFACE_STATE & SAMPLER_STATE for Xv on Ivybridge
Xv: upload new shaders to GEM objects for Xv on Ivybridge
Xv: set up pipeline for Xv on Ivybridge
configure.ac | 2 +- src/brw_structs.h | 124 +++++ src/i965_reg.h | 132 +++++ src/i965_video.c | 632 +++++++++++++++++++++-- src/render_program/Makefile.am | 38 ++- src/render_program/exa_wm_affine.g6i | 35 ++ src/render_program/exa_wm_mask_affine.g6a | 8 +- src/render_program/exa_wm_sample_planar.g4i | 64 +++ src/render_program/exa_wm_src_affine.g6a | 8 +- src/render_program/exa_wm_src_affine.g7a | 41 ++ src/render_program/exa_wm_src_affine.g7b | 4 + src/render_program/exa_wm_src_sample_argb.g4a | 18 +- src/render_program/exa_wm_src_sample_argb.g4i | 44 ++ src/render_program/exa_wm_src_sample_argb.g7a | 38 ++ src/render_program/exa_wm_src_sample_argb.g7b | 3 + src/render_program/exa_wm_src_sample_planar.g4a | 36 +-- src/render_program/exa_wm_src_sample_planar.g7a | 38 ++ src/render_program/exa_wm_src_sample_planar.g7b | 5 + src/render_program/exa_wm_write.g6a | 38 +-- src/render_program/exa_wm_write.g6i | 61 +++ src/render_program/exa_wm_write.g7a | 41 ++ src/render_program/exa_wm_write.g7b | 17 + src/render_program/exa_wm_yuv_rgb.g7a | 1 + src/render_program/exa_wm_yuv_rgb.g7b | 12 + 24 files changed, 1292 insertions(+), 148 deletions(-) create mode 100644 src/render_program/exa_wm_affine.g6i create mode 100644 src/render_program/exa_wm_sample_planar.g4i create mode 100644 src/render_program/exa_wm_src_affine.g7a create mode 100644 src/render_program/exa_wm_src_affine.g7b create mode 100644 src/render_program/exa_wm_src_sample_argb.g4i create mode 100644 src/render_program/exa_wm_src_sample_argb.g7a create mode 100644 src/render_program/exa_wm_src_sample_argb.g7b create mode 100644 src/render_program/exa_wm_src_sample_planar.g7a create mode 100644 src/render_program/exa_wm_src_sample_planar.g7b create mode 100644 src/render_program/exa_wm_write.g6i create mode 100644 src/render_program/exa_wm_write.g7a create mode 100644 src/render_program/exa_wm_write.g7b create mode 120000 src/render_program/exa_wm_yuv_rgb.g7a create mode 100644 src/render_program/exa_wm_yuv_rgb.g7b
PATCH 1/5 Xv: separate fragments from M4 macros
It is to prepare for Xv on Ivybridge. The difference from Sandybridge is that all message payload must be in GRF registers instead of MRF registers on Ivybridge. We will only redefine some M4 macros for Ivybridge
--- src/render_program/Makefile.am | 13 ++++- src/render_program/exa_wm_affine.g6i | 35 ++++++++++++ src/render_program/exa_wm_mask_affine.g6a | 8 +--- src/render_program/exa_wm_sample_planar.g4i | 64 +++++++++++++++++++++++ src/render_program/exa_wm_src_affine.g6a | 8 +--- src/render_program/exa_wm_src_sample_argb.g4a | 18 +------ src/render_program/exa_wm_src_sample_argb.g4i | 44 ++++++++++++++++ src/render_program/exa_wm_src_sample_planar.g4a | 36 +------------ src/render_program/exa_wm_write.g6a | 38 +------------- src/render_program/exa_wm_write.g6i | 61 +++++++++++++++++++++ 10 files changed, 219 insertions(+), 106 deletions(-) create mode 100644 src/render_program/exa_wm_affine.g6i create mode 100644 src/render_program/exa_wm_sample_planar.g4i create mode 100644 src/render_program/exa_wm_src_sample_argb.g4i create mode 100644 src/render_program/exa_wm_write.g6i
src/render_program/Makefile.am +10 -3
@@ -20,7 +20,9 @@ INTEL_G4A = \ INTEL_G4I = \ exa_wm.g4i \ exa_wm_affine.g4i \ - exa_wm_projective.g4i + exa_wm_projective.g4i \ + exa_wm_sample_planar.g4i \ + exa_wm_src_sample_argb.g4i INTEL_G4B = \ exa_sf.g4b \
@@ -61,6 +63,10 @@ INTEL_G4B_GEN5 = \ exa_wm_yuv_rgb.g4b.gen5 \ exa_wm_xy.g4b.gen5 +INTEL_G6I = \ + exa_wm_affine.g6i \ + exa_wm_write.g6i + INTEL_G6A = \ exa_wm_src_affine.g6a \ exa_wm_src_projective.g6a \
@@ -99,7 +105,8 @@ EXTRA_DIST = \ $(INTEL_G4B) \ $(INTEL_G4B_GEN5)\ $(INTEL_G6A) \ - $(INTEL_G6B) + $(INTEL_G6B) \ + $(INTEL_G6I) if HAVE_GEN4ASM
@@ -111,7 +118,7 @@ SUFFIXES = .g4a .g4b .g6a .g6b m4 -I$(srcdir) -s $< > $*.g6m && intel-gen4asm -g 6 -o $@ $*.g6m && rm $*.g6m $(INTEL_G4B): $(INTEL_G4I) -$(INTEL_G6B): $(INTEL_G4I) +$(INTEL_G6B): $(INTEL_G4I) $(INTEL_G6I) BUILT_SOURCES= $(INTEL_G4B) $(INTEL_G6B)
src/render_program/exa_wm_affine.g6i new file +35 -0
@@ -0,0 +1,35 @@ +/* + * Copyright © 2010-2011 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 + */ + +/* 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 */
src/render_program/exa_wm_mask_affine.g6a +1 -7
@@ -38,10 +38,4 @@ 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 */ +include(`exa_wm_affine.g6i')
src/render_program/exa_wm_sample_planar.g4i new file +64 -0
64 lines not on this page · raw message
src/render_program/exa_wm_src_affine.g6a +1 -7
@@ -38,10 +38,4 @@ 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') -/* 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 */ +include(`exa_wm_affine.g6i')
src/render_program/exa_wm_src_sample_argb.g4a +1 -17
@@ -29,20 +29,4 @@ include(`exa_wm.g4i') -/* prepare sampler read back gX register, which would be written back to output */ - -/* use simd16 sampler, param 0 is u, param 1 is v. */ -/* 'payload' loading, assuming tex coord start from g4 */ - -/* load argb */ -mov (1) g0.8<1>UD 0x00000000UD { align1 mask_disable }; -mov (8) src_msg<1>UD g0<8,8,1>UD { align1 }; /* copy to msg start reg*/ - -/* src_msg will be copied with g0, as it contains send desc */ -/* emit sampler 'send' cmd */ -send (16) src_msg_ind /* msg reg index */ - src_sample_base<1>UW /* readback */ - null - sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype) - /* here(src->dst) we should use src_sampler and src_surface */ - mlen 5 rlen 8 { align1 }; /* required message len 5, readback len 8 */ +include(`exa_wm_src_sample_argb.g4i')
src/render_program/exa_wm_src_sample_argb.g4i new file +44 -0
44 lines not on this page · raw message
src/render_program/exa_wm_src_sample_planar.g4a +1 -35
@@ -29,38 +29,4 @@ include(`exa_wm.g4i') -/* prepare sampler read back gX register, which would be written back to output */ - -/* use simd16 sampler, param 0 is u, param 1 is v. */ -/* 'payload' loading, assuming tex coord start from g4 */ - -/* load r */ -mov (1) g0.8<1>UD 0x0000e000UD { align1 mask_disable }; - -/* src_msg will be copied with g0, as it contains send desc */ -/* emit sampler 'send' cmd */ - -/* sample Y */ -mov (8) src_msg<1>UD g0<8,8,1>UD { align1 }; /* copy to msg start reg*/ -send (16) src_msg_ind /* msg reg index */ - src_sample_g<1>UW /* readback */ - null - sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype) - /* here(src->dst) we should use src_sampler and src_surface */ - mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */ - -/* sample U (Cr) */ -send (16) src_msg_ind /* msg reg index */ - src_sample_r<1>UW /* readback */ - null - sampler (3,0,F) /* sampler message description, (binding_table,sampler_index,datatype) - /* here(src->dst) we should use src_sampler and src_surface */ - mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */ - -/* sample V (Cb) */ -send (16) src_msg_ind /* msg reg index */ - src_sample_b<1>UW /* readback */ - null - sampler (5,0,F) /* sampler message description, (binding_table,sampler_index,datatype) - /* here(src->dst) we should use src_sampler and src_surface */ - mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */ +include(`exa_wm_sample_planar.g4i')
src/render_program/exa_wm_write.g6a +1 -37
@@ -38,40 +38,4 @@ define(`slot_a_00', `m8') define(`slot_a_01', `m9') define(`data_port_msg_2_ind', `2') -mov (8) slot_r_00<1>F src_sample_r_01<8,8,1>F { align1 }; -mov (8) slot_r_01<1>F src_sample_r_23<8,8,1>F { align1 }; - -mov (8) slot_g_00<1>F src_sample_g_01<8,8,1>F { align1 }; -mov (8) slot_g_01<1>F src_sample_g_23<8,8,1>F { align1 }; - -mov (8) slot_b_00<1>F src_sample_b_01<8,8,1>F { align1 }; -mov (8) slot_b_01<1>F src_sample_b_23<8,8,1>F { align1 }; - -mov (8) slot_a_00<1>F src_sample_a_01<8,8,1>F { align1 }; -mov (8) slot_a_01<1>F src_sample_a_23<8,8,1>F { align1 }; - -/* write */ -send (16) - data_port_msg_2_ind - acc0<1>UW - null - write ( - 0, /* binding_table */ - 16, /* pixel scordboard clear, msg type simd16 single source */ - 12, /* render target write */ - 0, /* no write commit message */ - 0 /* headerless render target write */ - ) - mlen 8 - rlen 0 - { align1 EOT }; - -nop; -nop; -nop; -nop; -nop; -nop; -nop; -nop; - +include(`exa_wm_write.g6i')
src/render_program/exa_wm_write.g6i new file +61 -0
61 lines not on this page · raw message
Signature · 1 line
1.7.0.4
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/5 Xv: New shaders for Xv on Ivybridge
In reply to Xiang, HaihaoRedefine some M4 macros, also update the check for intel-gen4asm to support Ivybridge
--- configure.ac | 2 +- src/render_program/Makefile.am | 27 +++++++++++++-- src/render_program/exa_wm_src_affine.g7a | 41 +++++++++++++++++++++++ src/render_program/exa_wm_src_affine.g7b | 4 ++ src/render_program/exa_wm_src_sample_argb.g7a | 38 +++++++++++++++++++++ src/render_program/exa_wm_src_sample_argb.g7b | 3 ++ src/render_program/exa_wm_src_sample_planar.g7a | 38 +++++++++++++++++++++ src/render_program/exa_wm_src_sample_planar.g7b | 5 +++ src/render_program/exa_wm_write.g7a | 41 +++++++++++++++++++++++ src/render_program/exa_wm_write.g7b | 17 +++++++++ src/render_program/exa_wm_yuv_rgb.g7a | 1 + src/render_program/exa_wm_yuv_rgb.g7b | 12 +++++++ 12 files changed, 225 insertions(+), 4 deletions(-) create mode 100644 src/render_program/exa_wm_src_affine.g7a create mode 100644 src/render_program/exa_wm_src_affine.g7b create mode 100644 src/render_program/exa_wm_src_sample_argb.g7a create mode 100644 src/render_program/exa_wm_src_sample_argb.g7b create mode 100644 src/render_program/exa_wm_src_sample_planar.g7a create mode 100644 src/render_program/exa_wm_src_sample_planar.g7b create mode 100644 src/render_program/exa_wm_write.g7a create mode 100644 src/render_program/exa_wm_write.g7b create mode 120000 src/render_program/exa_wm_yuv_rgb.g7a create mode 100644 src/render_program/exa_wm_yuv_rgb.g7b
configure.ac +1 -1
@@ -61,7 +61,7 @@ m4_ifndef([XORG_DRIVER_CHECK_EXT], LT_PREREQ([2.2]) LT_INIT([disable-static]) -PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.1], [gen4asm=yes], [gen4asm=no]) +PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.2], [gen4asm=yes], [gen4asm=no]) AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes) PKG_CHECK_MODULES(UDEV, [libudev], [udev=yes], [udev=no])
src/render_program/Makefile.am +24 -3
@@ -99,6 +99,20 @@ INTEL_G6B = \ exa_wm_write.g6b \ exa_wm_yuv_rgb.g6b +INTEL_G7A = \ + exa_wm_src_affine.g7a \ + exa_wm_src_sample_argb.g7a \ + exa_wm_src_sample_planar.g7a \ + exa_wm_write.g7a \ + exa_wm_yuv_rgb.g7a + +INTEL_G7B = \ + exa_wm_src_affine.g7b \ + exa_wm_src_sample_argb.g7b \ + exa_wm_src_sample_planar.g7b \ + exa_wm_write.g7b \ + exa_wm_yuv_rgb.g7b + EXTRA_DIST = \ $(INTEL_G4A) \ $(INTEL_G4I) \
@@ -106,23 +120,30 @@ EXTRA_DIST = \ $(INTEL_G4B_GEN5)\ $(INTEL_G6A) \ $(INTEL_G6B) \ - $(INTEL_G6I) + $(INTEL_G6I) \ + $(INTEL_G7A) \ + $(INTEL_G7B) if HAVE_GEN4ASM -SUFFIXES = .g4a .g4b .g6a .g6b +SUFFIXES = .g4a .g4b .g6a .g6b .g7a .g7b .g4a.g4b: m4 -I$(srcdir) -s $< > $*.g4m && intel-gen4asm -o $@ $*.g4m && intel-gen4asm -g 5 -o [email protected] $*.g4m && rm $*.g4m .g6a.g6b: m4 -I$(srcdir) -s $< > $*.g6m && intel-gen4asm -g 6 -o $@ $*.g6m && rm $*.g6m +.g7a.g7b: + m4 -I$(srcdir) -s $< > $*.g7m && intel-gen4asm -g 7 -o $@ $*.g7m && rm $*.g7m + $(INTEL_G4B): $(INTEL_G4I) $(INTEL_G6B): $(INTEL_G4I) $(INTEL_G6I) +$(INTEL_G7B): $(INTEL_G4I) $(INTEL_G6I) -BUILT_SOURCES= $(INTEL_G4B) $(INTEL_G6B) +BUILT_SOURCES= $(INTEL_G4B) $(INTEL_G6B) $(INTEL_G7B) clean-local: -rm -f $(INTEL_G4B) $(INTEL_G4B_GEN5) -rm -f $(INTEL_G6B) + -rm -f $(INTEL_G7B) endif
src/render_program/exa_wm_src_affine.g7a new file +41 -0
41 lines not on this page · raw message
src/render_program/exa_wm_src_affine.g7b new file +4 -0
@@ -0,0 +1,4 @@ + { 0x0060005a, 0x284077bd, 0x000000c0, 0x008d0040 }, + { 0x0060005a, 0x286077bd, 0x000000c0, 0x008d0080 }, + { 0x0060005a, 0x288077bd, 0x000000d0, 0x008d0040 }, + { 0x0060005a, 0x28a077bd, 0x000000d0, 0x008d0080 },
src/render_program/exa_wm_src_sample_argb.g7a new file +38 -0
@@ -0,0 +1,38 @@ +/* + * Copyright © 2006 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. + * + * Authors: + * Wang Zhenyu <[email protected]> + * Keith Packard <[email protected]> + */ + +/* Sample the src surface */ + +include(`exa_wm.g4i') + +undefine(`src_msg') +undefine(`src_msg_ind') + +define(`src_msg', `g65') +define(`src_msg_ind', `65') + +include(`exa_wm_src_sample_argb.g4i')
src/render_program/exa_wm_src_sample_argb.g7b new file +3 -0
@@ -0,0 +1,3 @@ + { 0x00000201, 0x20080061, 0x00000000, 0x00000000 }, + { 0x00600001, 0x28200021, 0x008d0000, 0x00000000 }, + { 0x02800031, 0x21c01ca9, 0x00000820, 0x0a8c0001 },
src/render_program/exa_wm_src_sample_planar.g7a new file +38 -0
@@ -0,0 +1,38 @@ +/* + * Copyright © 2006 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. + * + * Authors: + * Wang Zhenyu <[email protected]> + * Keith Packard <[email protected]> + */ + +/* Sample the src surface in planar format */ + +include(`exa_wm.g4i') + +undefine(`src_msg') +undefine(`src_msg_ind') + +define(`src_msg', `g65') +define(`src_msg_ind', `65') + +include(`exa_wm_sample_planar.g4i')
src/render_program/exa_wm_src_sample_planar.g7b new file +5 -0
@@ -0,0 +1,5 @@ + { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, + { 0x00600001, 0x28200021, 0x008d0000, 0x00000000 }, + { 0x02800031, 0x22001ca9, 0x00000820, 0x0a2c0001 }, + { 0x02800031, 0x21c01ca9, 0x00000820, 0x0a2c0003 }, + { 0x02800031, 0x22401ca9, 0x00000820, 0x0a2c0005 },
src/render_program/exa_wm_write.g7a new file +41 -0
41 lines not on this page · raw message
src/render_program/exa_wm_write.g7b new file +17 -0
@@ -0,0 +1,17 @@ + { 0x00600001, 0x284003bd, 0x008d01c0, 0x00000000 }, + { 0x00600001, 0x286003bd, 0x008d01e0, 0x00000000 }, + { 0x00600001, 0x288003bd, 0x008d0200, 0x00000000 }, + { 0x00600001, 0x28a003bd, 0x008d0220, 0x00000000 }, + { 0x00600001, 0x28c003bd, 0x008d0240, 0x00000000 }, + { 0x00600001, 0x28e003bd, 0x008d0260, 0x00000000 }, + { 0x00600001, 0x290003bd, 0x008d0280, 0x00000000 }, + { 0x00600001, 0x292003bd, 0x008d02a0, 0x00000000 }, + { 0x05800031, 0x24001ca8, 0x00000840, 0x90031000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
src/render_program/exa_wm_yuv_rgb.g7a new file +1 -0
@@ -0,0 +1 @@ +exa_wm_yuv_rgb.g4a
src/render_program/exa_wm_yuv_rgb.g7b new file +12 -0
@@ -0,0 +1,12 @@ + { 0x00800040, 0x23007fbd, 0x008d0200, 0xbd808081 }, + { 0x00800041, 0x23007fbd, 0x008d0300, 0x3f94fdf4 }, + { 0x00800040, 0x22c07fbd, 0x008d01c0, 0xbf008084 }, + { 0x00800040, 0x23407fbd, 0x008d0240, 0xbf008084 }, + { 0x00800001, 0x240003bc, 0x008d0300, 0x00000000 }, + { 0x80800048, 0x21c07fbd, 0x008d02c0, 0x3fcc49ba }, + { 0x00800001, 0x240003bc, 0x008d0300, 0x00000000 }, + { 0x00800048, 0x24007fbc, 0x008d02c0, 0xbf5020c5 }, + { 0x80800048, 0x22007fbd, 0x008d0340, 0xbec8b439 }, + { 0x00800001, 0x240003bc, 0x008d0300, 0x00000000 }, + { 0x80800048, 0x22407fbd, 0x008d0340, 0x40011687 }, + { 0x00800001, 0x228003fd, 0x00000000, 0x3f800000 },
Signature · 1 line
1.7.0.4
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/5 Xv: update SURFACE_STATE & SAMPLER_STATE for Xv on Ivybridge
In reply to Xiang, HaihaoSURFACE_STATE & SAMPLER_STATE are changed since Ivybridge
--- src/brw_structs.h | 124 ++++++++++++++++++++++++++++++++++++++++++ src/i965_video.c | 154 +++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 267 insertions(+), 11 deletions(-)
src/brw_structs.h +124 -0
@@ -1592,4 +1592,128 @@ struct gen6_depth_stencil_state } ds2; }; +struct gen7_surface_state +{ +struct { +unsigned int cube_pos_z:1 ; +unsigned int cube_neg_z:1 ; +unsigned int cube_pos_y:1 ; +unsigned int cube_neg_y:1 ; +unsigned int cube_pos_x:1 ; +unsigned int cube_neg_x:1 ; +unsigned int pad2:2 ; +unsigned int render_cache_read_write:1 ; +unsigned int pad1:1 ; +unsigned int surface_array_spacing:1 ; +unsigned int vert_line_stride_ofs:1 ; +unsigned int vert_line_stride:1 ; +unsigned int tile_walk:1 ; +unsigned int tiled_surface:1 ; +unsigned int horizontal_alignment:1 ; +unsigned int vertical_alignment:2 ; +unsigned int surface_format:9 ;/**< BRW_SURFACEFORMAT_x */ +unsigned int pad0:1 ; +unsigned int is_array:1 ; +unsigned int surface_type:3 ;/**< BRW_SURFACE_1D/2D/3D/CUBE */ + } ss0; + +struct { +unsigned int base_addr; + } ss1; + +struct { +unsigned int width:14 ; +unsigned int pad1:2 ; +unsigned int height:14 ; +unsigned int pad0:2 ; + } ss2; + +struct { +unsigned int pitch:18 ; +unsigned int pad:3 ; +unsigned int depth:11 ; + } ss3; + +struct { +unsigned int multisample_position_palette_index:3 ; +unsigned int num_multisamples:3 ; +unsigned int multisampled_surface_storage_format:1 ; +unsigned int render_target_view_extent:11 ; +unsigned int min_array_elt:11 ; +unsigned int rotation:2 ; +unsigned int pad0:1 ; + } ss4; + +struct { +unsigned int mip_count:4 ; +unsigned int min_lod:4 ; +unsigned int pad1:12 ; +unsigned int y_offset:4 ; +unsigned int pad0:1 ; +unsigned int x_offset:7 ; + } ss5; + +struct { +unsigned int pad;/* Multisample Control Surface stuff */ + } ss6; + +struct { +unsigned int resource_min_lod:12 ; +unsigned int pad0:16 ; +unsigned int alpha_clear_color:1 ; +unsigned int blue_clear_color:1 ; +unsigned int green_clear_color:1 ; +unsigned int red_clear_color:1 ; + } ss7; +}; + +struct gen7_sampler_state +{ +struct + { +unsigned int aniso_algorithm:1 ; +unsigned int lod_bias:13 ; +unsigned int min_filter:3 ; +unsigned int mag_filter:3 ; +unsigned int mip_filter:2 ; +unsigned int base_level:5 ; +unsigned int pad1:1 ; +unsigned int lod_preclamp:1 ; +unsigned int default_color_mode:1 ; +unsigned int pad0:1 ; +unsigned int disable:1 ; + } ss0; + +struct + { +unsigned int cube_control_mode:1 ; +unsigned int shadow_function:3 ; +unsigned int pad:4 ; +unsigned int max_lod:12 ; +unsigned int min_lod:12 ; + } ss1; + +struct + { +unsigned int pad:5 ; +unsigned int default_color_pointer:27 ; + } ss2; + +struct + { +unsigned int r_wrap_mode:3 ; +unsigned int t_wrap_mode:3 ; +unsigned int s_wrap_mode:3 ; +unsigned int pad:1 ; +unsigned int non_normalized_coord:1 ; +unsigned int trilinear_quality:2 ; +unsigned int address_round:6 ; +unsigned int max_aniso:3 ; +unsigned int chroma_key_mode:1 ; +unsigned int chroma_key_index:2 ; +unsigned int chroma_key_enable:1 ; +unsigned int pad0:6 ; + } ss3; +}; +#endif
src/i965_video.c +143 -11
237 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 4/5 Xv: upload new shaders to GEM objects for Xv on Ivybridge
In reply to Xiang, Haihao--- src/i965_video.c | 36 ++++++++++++++++++++++++++++++------ 1 files changed, 30 insertions(+), 6 deletions(-)
src/i965_video.c +30 -6
@@ -149,6 +149,21 @@ static const uint32_t ps_kernel_planar_static_gen6[][4] = {#include "exa_wm_write.g6b" }; +/* programs for Ivybridge */ +static const uint32_t ps_kernel_packed_static_gen7[][4 ] = { +#include "exa_wm_src_affine.g7b" +#include "exa_wm_src_sample_argb.g7b" +#include "exa_wm_yuv_rgb.g7b" +#include "exa_wm_write.g7b" +}; + +static const uint32_t ps_kernel_planar_static_gen7[][4 ] = { +#include "exa_wm_src_affine.g7b" +#include "exa_wm_src_sample_planar.g7b" +#include "exa_wm_yuv_rgb.g7b" +#include "exa_wm_write.g7b" +}; +#ifndef MAX2 #define MAX2 (a,b) ((a) > (b) ? (a) : (b))#endif
@@ -1459,28 +1474,37 @@ gen6_create_vidoe_objects(ScrnInfoPtr scrn) {intel_screen_private *intel =intel_get_screen_private (scrn); drm_intel_bo *(*create_sampler_state)(ScrnInfoPtr); - +const uint32_t *packed_ps_kernel, *planar_ps_kernel; +unsigned int packed_ps_size, planar_ps_size; +if (INTEL_INFO (intel)->gen >=70 ) { create_sampler_state = gen7_create_sampler_state; + packed_ps_kernel = &ps_kernel_packed_static_gen7[0 ][0 ]; + packed_ps_size =sizeof (ps_kernel_packed_static_gen7); + planar_ps_kernel = &ps_kernel_planar_static_gen7[0 ][0 ]; + planar_ps_size =sizeof (ps_kernel_planar_static_gen7); }else { create_sampler_state = i965_create_sampler_state; + packed_ps_kernel = &ps_kernel_packed_static_gen6[0 ][0 ]; + packed_ps_size =sizeof (ps_kernel_packed_static_gen6); + planar_ps_kernel = &ps_kernel_planar_static_gen6[0 ][0 ]; + planar_ps_size =sizeof (ps_kernel_planar_static_gen6); } -if (intel->video.gen4_sampler_bo ==NULL ) intel->video.gen4_sampler_bo =create_sampler_state (scrn);if (intel->video.wm_prog_packed_bo ==NULL ) intel->video.wm_prog_packed_bo =i965_create_program (scrn, - &ps_kernel_packed_static_gen6[0 ][0 ], -sizeof (ps_kernel_packed_static_gen6)); + packed_ps_kernel, + packed_ps_size);if (intel->video.wm_prog_planar_bo ==NULL ) intel->video.wm_prog_planar_bo =i965_create_program (scrn, - &ps_kernel_planar_static_gen6[0 ][0 ], -sizeof (ps_kernel_planar_static_gen6)); + planar_ps_kernel, + planar_ps_size);if (intel->video.gen4_cc_vp_bo ==NULL ) intel->video.gen4_cc_vp_bo =i965_create_cc_vp_state (scrn);
Signature · 1 line
1.7.0.4
PATCH 5/5 Xv: set up pipeline for Xv on Ivybridge
In reply to Xiang, HaihaoThe configuration is same as that on Sandybridge, but many state commands are changed
--- src/i965_reg.h | 132 ++++++++++++++++ src/i965_video.c | 446 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 554 insertions(+), 24 deletions(-)
src/i965_reg.h +132 -0
@@ -136,6 +136,138 @@# define GEN6_3DSTATE_MULTISAMPLE_NUMSAMPLES_4 (2 << 1)# define GEN6_3DSTATE_MULTISAMPLE_NUMSAMPLES_8 (3 << 1) +/* on GEN7+ */ +/* _3DSTATE_VERTEX_BUFFERS on GEN7*/ +/* DW1 */ +#define GEN7_VB0_ADDRESS_MODIFYENABLE (1 << 14) + +/* _3DPRIMITIVE on GEN7 */ +/* DW1 */ +# define GEN7_3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL (0 << 8) +# define GEN7_3DPRIM_VERTEXBUFFER_ACCESS_RANDOM (1 << 8) + +/* 3DSTATE_WM on GEN7 */ +/* DW1 */ +# define GEN7_WM_STATISTICS_ENABLE (1 << 31) +# define GEN7_WM_DEPTH_CLEAR (1 << 30) +# define GEN7_WM_DISPATCH_ENABLE (1 << 29) +# define GEN6_WM_DEPTH_RESOLVE (1 << 28) +# define GEN7_WM_HIERARCHICAL_DEPTH_RESOLVE (1 << 27) +# define GEN7_WM_KILL_ENABLE (1 << 25) +# define GEN7_WM_PSCDEPTH_OFF (0 << 23) +# define GEN7_WM_PSCDEPTH_ON (1 << 23) +# define GEN7_WM_PSCDEPTH_ON_GE (2 << 23) +# define GEN7_WM_PSCDEPTH_ON_LE (3 << 23) +# define GEN7_WM_USES_SOURCE_DEPTH (1 << 20) +# define GEN7_WM_USES_SOURCE_W (1 << 19) +# define GEN7_WM_POSITION_ZW_PIXEL (0 << 17) +# define GEN7_WM_POSITION_ZW_CENTROID (2 << 17) +# define GEN7_WM_POSITION_ZW_SAMPLE (3 << 17) +# define GEN7_WM_NONPERSPECTIVE_SAMPLE_BARYCENTRIC (1 << 16) +# define GEN7_WM_NONPERSPECTIVE_CENTROID_BARYCENTRIC (1 << 15) +# define GEN7_WM_NONPERSPECTIVE_PIXEL_BARYCENTRIC (1 << 14) +# define GEN7_WM_PERSPECTIVE_SAMPLE_BARYCENTRIC (1 << 13) +# define GEN7_WM_PERSPECTIVE_CENTROID_BARYCENTRIC (1 << 12) +# define GEN7_WM_PERSPECTIVE_PIXEL_BARYCENTRIC (1 << 11) +# define GEN7_WM_USES_INPUT_COVERAGE_MASK (1 << 10) +# define GEN7_WM_LINE_END_CAP_AA_WIDTH_0_5 (0 << 8) +# define GEN7_WM_LINE_END_CAP_AA_WIDTH_1_0 (1 << 8) +# define GEN7_WM_LINE_END_CAP_AA_WIDTH_2_0 (2 << 8) +# define GEN7_WM_LINE_END_CAP_AA_WIDTH_4_0 (3 << 8) +# define GEN7_WM_LINE_AA_WIDTH_0_5 (0 << 6) +# define GEN7_WM_LINE_AA_WIDTH_1_0 (1 << 6) +# define GEN7_WM_LINE_AA_WIDTH_2_0 (2 << 6) +# define GEN7_WM_LINE_AA_WIDTH_4_0 (3 << 6) +# define GEN7_WM_POLYGON_STIPPLE_ENABLE (1 << 4) +# define GEN7_WM_LINE_STIPPLE_ENABLE (1 << 3) +# define GEN7_WM_POINT_RASTRULE_UPPER_RIGHT (1 << 2) +# define GEN7_WM_MSRAST_OFF_PIXEL (0 << 0) +# define GEN7_WM_MSRAST_OFF_PATTERN (1 << 0) +# define GEN7_WM_MSRAST_ON_PIXEL (2 << 0) +# define GEN7_WM_MSRAST_ON_PATTERN (3 << 0) +/* DW2 */ +# define GEN7_WM_MSDISPMODE_PERPIXEL (1 << 31) + +#define GEN7_3DSTATE_CLEAR_PARAMS BRW_3D(3, 0, 0x04) +#define GEN7_3DSTATE_DEPTH_BUFFER BRW_3D(3, 0, 0x05) + +#define GEN7_3DSTATE_CONSTANT_HS BRW_3D(3, 0, 0x19) +#define GEN7_3DSTATE_CONSTANT_DS BRW_3D(3, 0, 0x1a) + +#define GEN7_3DSTATE_HS BRW_3D(3, 0, 0x1b) +#define GEN7_3DSTATE_TE BRW_3D(3, 0, 0x1c) +#define GEN7_3DSTATE_DS BRW_3D(3, 0, 0x1d) +#define GEN7_3DSTATE_STREAMOUT BRW_3D(3, 0, 0x1e) +#define GEN7_3DSTATE_SBE BRW_3D(3, 0, 0x1f) + +/* DW1 */ +# define GEN7_SBE_SWIZZLE_CONTROL_MODE (1 << 28) +# define GEN7_SBE_NUM_OUTPUTS_SHIFT 22 +# define GEN7_SBE_SWIZZLE_ENABLE (1 << 21) +# define GEN7_SBE_POINT_SPRITE_LOWERLEFT (1 << 20) +# define GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT 11 +# define GEN7_SBE_URB_ENTRY_READ_OFFSET_SHIFT 4 + +#define GEN7_3DSTATE_PS BRW_3D(3, 0, 0x20) +/* DW1: kernel pointer */ +/* DW2 */ +# define GEN7_PS_SPF_MODE (1 << 31) +# define GEN7_PS_VECTOR_MASK_ENABLE (1 << 30) +# define GEN7_PS_SAMPLER_COUNT_SHIFT 27 +# define GEN7_PS_BINDING_TABLE_ENTRY_COUNT_SHIFT 18 +# define GEN7_PS_FLOATING_POINT_MODE_IEEE_754 (0 << 16) +# define GEN7_PS_FLOATING_POINT_MODE_ALT (1 << 16) +/* DW3: scratch space */ +/* DW4 */ +# define GEN7_PS_MAX_THREADS_SHIFT 23 +# define GEN7_PS_PUSH_CONSTANT_ENABLE (1 << 11) +# define GEN7_PS_ATTRIBUTE_ENABLE (1 << 10) +# define GEN7_PS_OMASK_TO_RENDER_TARGET (1 << 9) +# define GEN7_PS_DUAL_SOURCE_BLEND_ENABLE (1 << 7) +# define GEN7_PS_POSOFFSET_NONE (0 << 3) +# define GEN7_PS_POSOFFSET_CENTROID (2 << 3) +# define GEN7_PS_POSOFFSET_SAMPLE (3 << 3) +# define GEN7_PS_32_DISPATCH_ENABLE (1 << 2) +# define GEN7_PS_16_DISPATCH_ENABLE (1 << 1) +# define GEN7_PS_8_DISPATCH_ENABLE (1 << 0) +/* DW5 */ +# define GEN7_PS_DISPATCH_START_GRF_SHIFT_0 16 +# define GEN7_PS_DISPATCH_START_GRF_SHIFT_1 8 +# define GEN7_PS_DISPATCH_START_GRF_SHIFT_2 0 +/* DW6: kernel 1 pointer */ +/* DW7: kernel 2 pointer */ + +#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CL BRW_3D(3, 0, 0x21) +#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC BRW_3D(3, 0, 0x23) + +#define GEN7_3DSTATE_BLEND_STATE_POINTERS BRW_3D(3, 0, 0x24) +#define GEN7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS BRW_3D(3, 0, 0x25) + +#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS BRW_3D(3, 0, 0x26) +#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS BRW_3D(3, 0, 0x27) +#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS BRW_3D(3, 0, 0x28) +#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_GS BRW_3D(3, 0, 0x29) +#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS BRW_3D(3, 0, 0x2a) + +#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS BRW_3D(3, 0, 0x2b) +#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS BRW_3D(3, 0, 0x2e) +#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS BRW_3D(3, 0, 0x2f) + +#define GEN7_3DSTATE_URB_VS BRW_3D(3, 0, 0x30) +#define GEN7_3DSTATE_URB_HS BRW_3D(3, 0, 0x31) +#define GEN7_3DSTATE_URB_DS BRW_3D(3, 0, 0x32) +#define GEN7_3DSTATE_URB_GS BRW_3D(3, 0, 0x33) +/* DW1 */ +# define GEN7_URB_ENTRY_NUMBER_SHIFT 0 +# define GEN7_URB_ENTRY_SIZE_SHIFT 16 +# define GEN7_URB_STARTING_ADDRESS_SHIFT 25 + +#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS BRW_3D(3, 1, 0x12) +#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS BRW_3D(3, 1, 0x16) +/* DW1 */ +# define GEN7_PUSH_CONSTANT_BUFFER_OFFSET_SHIFT 16 + +#define PIPELINE_SELECT_3D 0#define PIPELINE_SELECT_MEDIA 1
src/i965_video.c +422 -24
485 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Re: [PATCH 5/5] Xv: set up pipeline for Xv on Ivybridge
Quoted 16 lines · Haihao
The configuration is same as that on Sandybridge, but many state commands are changed
Signed-off-by Xiang, Haihao <[email protected]>--- src/i965_reg.h | 132 ++++++++++++++++ src/i965_video.c | 446 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 554 insertions(+), 24 deletions(-)src/i965_reg.h +0
-0
src/i965_video.c gen6_create_blend_state(ScrnInfoPtr scrn) · line 1451
Quoted 7 lines
src/i965_video.c +1
-0@@ -1445,6 +1445,7 @@ gen6_create_blend_state(ScrnInfoPtr scrn) blend_state->blend1.logic_op_enable =1 ; blend_state->blend1.logic_op_func =0xc ; + blend_state->blend1.pre_blend_clamp_enable =1 ;drm_intel_bo_unmap (blend_bo);return blend_bo;
Can you please explain why this chunk is added for all gen6 and above?
-0-
Signature · 2 lines
Why was I born with such contemporaries? -- Oscar Wilde
Re: [PATCH 5/5] Xv: set up pipeline for Xv on Ivybridge
Quoted 18 lines · Owain Ainsworth
Quoted 17 lines · Haihao
The configuration is same as that on Sandybridge, but many state commands are changed
Signed-off-by Xiang, Haihao <[email protected]>--- src/i965_reg.h | 132 ++++++++++++++++ src/i965_video.c | 446 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 554 insertions(+), 24 deletions(-)src/i965_reg.h +0
-0src/i965_video.c +0
-0@@ -1445,6 +1445,7 @@ gen6_create_blend_state(ScrnInfoPtr scrn)
Quoted 8 lines
src/i965_video.c gen6_create_blend_state(ScrnInfoPtr scrn) · line 1451
Quoted 6 lines
src/i965_video.c +1
-0blend_state->blend1.logic_op_enable =1 ; blend_state->blend1.logic_op_func =0xc ; + blend_state->blend1.pre_blend_clamp_enable =1 ;drm_intel_bo_unmap (blend_bo);return blend_bo;Can you please explain why this chunk is added for all gen6 and above?
Sandybridge and Ivybridge have the same requirement about Pre-Blend Color Clamp Enable. The document says it must be enabled if the format of the render target is UNORM, and the DDX driver uses XXX_UNORM format for Xv.
Dear Haihao,
Am Donnerstag, den 23.06.2011, 00:47 +0800 schrieb Xiang, Haihao:
Quoted 6 lines
Xiang, Haihao (5):
Xv: separate fragments from M4 macros
Xv: New shaders for Xv on Ivybridge
Xv: updateSURFACE_STATE&SAMPLER_STATEfor Xv on Ivybridge
Xv: upload new shaders to GEM objects for Xv on Ivybridge
Xv: set up pipeline for Xv on Ivybridge
[…]
please make sure to update the copyright information like years and authors of at least newly created files. I cannot see easily if these are renames are newly created.
Also I do not know what the policy is, but when renaming files you can make the diff smaller adding the option -M -C -C -C to git format-patch.
Thanks,
Paul
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx