diff options
author | Gwenole Beauchesne <gbeauchesne@splitted-desktop.com> | 2009-11-18 11:24:29 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2009-11-18 11:51:11 +0800 |
commit | 2475e64c118509830c7ce0a14c852a5b55175520 (patch) | |
tree | e22695c892c954a1b7e23ad5c4368265a9505f38 | |
parent | 37de6473f15679e6416a8a0bdf111b1b3fe75001 (diff) | |
download | libva-intel-driver-2475e64c118509830c7ce0a14c852a5b55175520.tar.gz libva-intel-driver-2475e64c118509830c7ce0a14c852a5b55175520.tar.bz2 libva-intel-driver-2475e64c118509830c7ce0a14c852a5b55175520.zip |
fix rendering of RGBA subpicture
-rw-r--r-- | i965_render.c | 4 | ||||
-rw-r--r-- | shaders/render/Makefile.am | 6 | ||||
-rw-r--r-- | shaders/render/exa_wm_blend_subpicture.g4b | 15 | ||||
-rw-r--r-- | shaders/render/exa_wm_blend_subpicture.g4b.gen5 | 15 | ||||
-rw-r--r-- | shaders/render/exa_wm_src_sample_argb.g4a (renamed from shaders/render/exa_wm_blend_subpicture.g4a) | 50 | ||||
-rw-r--r-- | shaders/render/exa_wm_src_sample_argb.g4b | 2 | ||||
-rw-r--r-- | shaders/render/exa_wm_src_sample_argb.g4b.gen5 | 2 |
7 files changed, 16 insertions, 78 deletions
diff --git a/i965_render.c b/i965_render.c index f523c6a..f3e89c2 100644 --- a/i965_render.c +++ b/i965_render.c @@ -70,7 +70,7 @@ static const unsigned int ps_subpic_kernel_static[][4] = { #include "shaders/render/exa_wm_xy.g4b" #include "shaders/render/exa_wm_src_affine.g4b" -#include "shaders/render/exa_wm_blend_subpicture.g4b" +#include "shaders/render/exa_wm_src_sample_argb.g4b" #include "shaders/render/exa_wm_write.g4b" }; @@ -92,7 +92,7 @@ static const unsigned int ps_subpic_kernel_static_gen5[][4] = { #include "shaders/render/exa_wm_xy.g4b.gen5" #include "shaders/render/exa_wm_src_affine.g4b.gen5" -#include "shaders/render/exa_wm_blend_subpicture.g4b.gen5" +#include "shaders/render/exa_wm_src_sample_argb.g4b.gen5" #include "shaders/render/exa_wm_write.g4b.gen5" }; diff --git a/shaders/render/Makefile.am b/shaders/render/Makefile.am index f38c234..fb9b11e 100644 --- a/shaders/render/Makefile.am +++ b/shaders/render/Makefile.am @@ -7,27 +7,27 @@ INTEL_G4A = \ exa_sf.g4a \ exa_wm_xy.g4a \ exa_wm_src_affine.g4a \ + exa_wm_src_sample_argb.g4a \ exa_wm_src_sample_planar.g4a \ exa_wm_yuv_rgb.g4a \ - exa_wm_blend_subpicture.g4a \ exa_wm_write.g4a INTEL_G4B = \ exa_sf.g4b \ exa_wm_xy.g4b \ exa_wm_src_affine.g4b \ + exa_wm_src_sample_argb.g4b \ exa_wm_src_sample_planar.g4b \ exa_wm_yuv_rgb.g4b \ - exa_wm_blend_subpicture.g4b \ exa_wm_write.g4b INTEL_G4B_GEN5 = \ exa_sf.g4b.gen5 \ exa_wm_xy.g4b.gen5 \ exa_wm_src_affine.g4b.gen5 \ + exa_wm_src_sample_argb.g4b.gen5 \ exa_wm_src_sample_planar.g4b.gen5 \ exa_wm_yuv_rgb.g4b.gen5 \ - exa_wm_blend_subpicture.g4b.gen5 \ exa_wm_write.g4b.gen5 EXTRA_DIST = $(INTEL_G4I) \ diff --git a/shaders/render/exa_wm_blend_subpicture.g4b b/shaders/render/exa_wm_blend_subpicture.g4b deleted file mode 100644 index bbc75c0..0000000 --- a/shaders/render/exa_wm_blend_subpicture.g4b +++ /dev/null @@ -1,15 +0,0 @@ - { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, - { 0x01800031, 0x22001d29, 0x008d0000, 0x02520001 }, - { 0x01800031, 0x21c01d29, 0x008d0000, 0x02520201 }, - { 0x01800031, 0x22401d29, 0x008d0000, 0x02520401 }, - { 0x00600001, 0x228003bd, 0x008d01c0, 0x00000000 }, - { 0x00600001, 0x22a003bd, 0x008d01e0, 0x00000000 }, - { 0x00600040, 0x21c07fbd, 0x008d01c0, 0x3f000000 }, - { 0x00600040, 0x21e07fbd, 0x008d01e0, 0x3f000000 }, - { 0x00600040, 0x22007fbd, 0x008d0200, 0x3f000000 }, - { 0x00600040, 0x22207fbd, 0x008d0220, 0x3f000000 }, - { 0x00600040, 0x22407fbd, 0x008d0240, 0x3f000000 }, - { 0x00600040, 0x22607fbd, 0x008d0260, 0x3f000000 }, - { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, - { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, - { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, diff --git a/shaders/render/exa_wm_blend_subpicture.g4b.gen5 b/shaders/render/exa_wm_blend_subpicture.g4b.gen5 deleted file mode 100644 index 0e7534f..0000000 --- a/shaders/render/exa_wm_blend_subpicture.g4b.gen5 +++ /dev/null @@ -1,15 +0,0 @@ - { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 }, - { 0x01800031, 0x22001d29, 0x208d0000, 0x0a2a0001 }, - { 0x01800031, 0x21c01d29, 0x208d0000, 0x0a2a0201 }, - { 0x01800031, 0x22401d29, 0x208d0000, 0x0a2a0401 }, - { 0x00600001, 0x228003bd, 0x008d01c0, 0x00000000 }, - { 0x00600001, 0x22a003bd, 0x008d01e0, 0x00000000 }, - { 0x00600040, 0x21c07fbd, 0x008d01c0, 0x3f000000 }, - { 0x00600040, 0x21e07fbd, 0x008d01e0, 0x3f000000 }, - { 0x00600040, 0x22007fbd, 0x008d0200, 0x3f000000 }, - { 0x00600040, 0x22207fbd, 0x008d0220, 0x3f000000 }, - { 0x00600040, 0x22407fbd, 0x008d0240, 0x3f000000 }, - { 0x00600040, 0x22607fbd, 0x008d0260, 0x3f000000 }, - { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, - { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, - { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, diff --git a/shaders/render/exa_wm_blend_subpicture.g4a b/shaders/render/exa_wm_src_sample_argb.g4a index 2d2cd31..c20f53f 100644 --- a/shaders/render/exa_wm_blend_subpicture.g4a +++ b/shaders/render/exa_wm_src_sample_argb.g4a @@ -25,7 +25,8 @@ * Keith Packard <keithp@keithp.com> */ -/* Sample the src surface in planar format */ +/* Sample the src surface */ + include(`exa_wm.g4i') /* prepare sampler read back gX register, which would be written back to output */ @@ -33,51 +34,14 @@ include(`exa_wm.g4i') /* 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 }; +/* load argb */ +mov (1) g0.8<1>UD 0x00000000UD { align1 mask_disable }; /* src_msg will be copied with g0, as it contains send desc */ /* emit sampler 'send' cmd */ - - -/* sample Y */ -send (16) src_msg_ind /* msg reg index */ - src_sample_g<1>UW /* readback */ - g0<8,8,1>UW /* copy to msg start reg*/ - sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype)*/ - mlen 5 rlen 2 {align1}; - -/* sample U (Cr) */ -send (16) src_msg_ind /* msg reg index */ - src_sample_r<1>UW /* readback */ - g0<8,8,1>UW /* copy to msg start reg*/ - sampler (1,2,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 */ + src_sample_base<1>UW /* readback */ g0<8,8,1>UW /* copy to msg start reg*/ - sampler (1,4,F) /* sampler message description, (binding_table,sampler_index,datatype) + 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 */ - -/*extract alpha value, alpha value stores in one float with color value, because the color value is small, -we can neglect it when doing alpha blend*/ -mov (8) src_sample_a<1>F g14<8,8,1>F { align1 }; -mov (8) src_sample_a_23<1>F g15<8,8,1>F { align1 }; - - -/*set subtitle color*/ -add (8) g14<1>F g14<8,8,1>F 0.5F { align1 }; -add (8) g15<1>F g15<8,8,1>F 0.5F { align1 }; -add (8) g16<1>F g16<8,8,1>F 0.5F { align1 }; -add (8) g17<1>F g17<8,8,1>F 0.5F { align1 }; -add (8) g18<1>F g18<8,8,1>F 0.5F { align1 }; -add (8) g19<1>F g19<8,8,1>F 0.5F { align1 }; - -nop; -nop; -nop; - + mlen 5 rlen 8 { align1 }; /* required message len 5, readback len 8 */ diff --git a/shaders/render/exa_wm_src_sample_argb.g4b b/shaders/render/exa_wm_src_sample_argb.g4b new file mode 100644 index 0000000..c5b9274 --- /dev/null +++ b/shaders/render/exa_wm_src_sample_argb.g4b @@ -0,0 +1,2 @@ + { 0x00000201, 0x20080061, 0x00000000, 0x00000000 }, + { 0x01800031, 0x21c01d29, 0x008d0000, 0x02580001 }, diff --git a/shaders/render/exa_wm_src_sample_argb.g4b.gen5 b/shaders/render/exa_wm_src_sample_argb.g4b.gen5 new file mode 100644 index 0000000..f8cb41e --- /dev/null +++ b/shaders/render/exa_wm_src_sample_argb.g4b.gen5 @@ -0,0 +1,2 @@ + { 0x00000201, 0x20080061, 0x00000000, 0x00000000 }, + { 0x01800031, 0x21c01d29, 0x208d0000, 0x0a8a0001 }, |