| 1 | /* |
| 2 | * Copyright © 2006 Intel Corporation |
| 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | * copy of this software and associated documentation files (the "Software"), |
| 6 | * to deal in the Software without restriction, including without limitation |
| 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 | * and/or sell copies of the Software, and to permit persons to whom the |
| 9 | * Software is furnished to do so, subject to the following conditions: |
| 10 | * |
| 11 | * The above copyright notice and this permission notice (including the next |
| 12 | * paragraph) shall be included in all copies or substantial portions of the |
| 13 | * Software. |
| 14 | * |
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 21 | * SOFTWARE. |
| 22 | * |
| 23 | * Authors: |
| 24 | * Eric Anholt <[email protected]> |
| 25 | * |
| 26 | */ |
| 27 | |
| 28 | #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:410:9`! |
| 29 | #include "config.h"cxx . . $ `<file>/config.h`/ |
| 30 | #endif |
| 31 | |
| 32 | #include "xorg-server.h" |
| 33 | #include "xf86.h" |
| 34 | #include "xf86_OSproc.h" |
| 35 | #include "xf86xv.h" |
| 36 | #include "fourcc.h" |
| 37 | #include "gcstruct.h" |
| 38 | |
| 39 | #include "intel.h"cxx . . $ `<file>/src/uxa/intel.h`/ |
| 40 | #include "intel_uxa.h"cxx . . $ `<file>/src/uxa/intel_uxa.h`/ |
| 41 | #include "i915_reg.h"cxx . . $ `<file>/src/uxa/i915_reg.h`/ |
| 42 | #include "i915_3d.h"cxx . . $ `<file>/src/uxa/i915_3d.h`/ |
| 43 | |
| 44 | void |
| 45 | I915DisplayVideoTexturedcxx . . $ I915DisplayVideoTextured(1d0b031a0ff06bed).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, |
| 46 | intel_adaptor_privatecxx . . $ intel_adaptor_private# *adaptor_priv, int id, |
| 47 | RegionPtrcxx . . $ RegionPtr# dstRegion, |
| 48 | short width, short height, int video_pitch, |
| 49 | int video_pitch2, |
| 50 | short src_w, short src_h, short drw_w, short drw_h, |
| 51 | PixmapPtrcxx . . $ PixmapPtr# pixmap) |
| 52 | { |
| 53 | intel_screen_privatecxx . . $ intel_screen_private# *intel = intel_get_screen_privatecxx . . $ intel_get_screen_private(cf5cbdd6c817525a).(scrn); |
| 54 | uint32_tcxx . . $ uint32_t# format, ms3, s5, tiling; |
| 55 | BoxPtrcxx . . $ BoxPtr# pbox = REGION_RECTScxx . . $ `<external>/14128946855725894503/regionstr.h:348:9`!(dstRegion); |
| 56 | int nbox_total = REGION_NUM_RECTScxx . . $ `<external>/14128946855725894503/regionstr.h:346:9`!(dstRegion); |
| 57 | int nbox_this_time; |
| 58 | int dxo, dyo, pix_xoff, pix_yoff; |
| 59 | PixmapPtrcxx . . $ PixmapPtr# target; |
| 60 | |
| 61 | #if 0 |
| 62 | ErrorF("I915DisplayVideo: %dx%d (pitch %d)\n", width, height, |
| 63 | video_pitch); |
| 64 | #endif |
| 65 | |
| 66 | dxo = dstRegion->extentscxx . . $ pixman_region16#extents..x1cxx . . $ pixman_box16#x1.; |
| 67 | dyo = dstRegion->extentscxx . . $ pixman_region16#extents..y1cxx . . $ pixman_box16#y1.; |
| 68 | |
| 69 | if (pixmap->drawablecxx . . $ _Pixmap#drawable..widthcxx . . $ _Drawable#width. > 2048 || pixmap->drawablecxx . . $ _Pixmap#drawable..heightcxx . . $ _Drawable#height. > 2048 || |
| 70 | !intel_uxa_check_pitch_3dcxx . . $ intel_uxa_check_pitch_3d(b4f27dd675b63059).(pixmap)) { |
| 71 | ScreenPtrcxx . . $ ScreenPtr# screen = pixmap->drawablecxx . . $ _Pixmap#drawable..pScreencxx . . $ _Drawable#pScreen.; |
| 72 | |
| 73 | target = screen->CreatePixmapcxx . . $ _Screen#CreatePixmap.(screen, |
| 74 | dstRegion->extentscxx . . $ pixman_region16#extents..x2cxx . . $ pixman_box16#x2. - dxo, |
| 75 | dstRegion->extentscxx . . $ pixman_region16#extents..y2cxx . . $ pixman_box16#y2. - dyo, |
| 76 | pixmap->drawablecxx . . $ _Pixmap#drawable..depthcxx . . $ _Drawable#depth., |
| 77 | CREATE_PIXMAP_USAGE_SCRATCHcxx . . $ `<external>/1376006743595286137/scrnintstr.h:181:9`!); |
| 78 | if (target == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 79 | return; |
| 80 | |
| 81 | if (intel_uxa_get_pixmap_bocxx . . $ intel_uxa_get_pixmap_bo(1295b95074994f70).(target) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 82 | screen->DestroyPixmapcxx . . $ _Screen#DestroyPixmap.(target); |
| 83 | return; |
| 84 | } |
| 85 | |
| 86 | pix_xoff = -dxo; |
| 87 | pix_yoff = -dyo; |
| 88 | } else { |
| 89 | target = pixmap; |
| 90 | |
| 91 | /* Set up the offset for translating from the given region |
| 92 | * (in screen coordinates) to the backing pixmap. |
| 93 | */ |
| 94 | #ifdef COMPOSITEcxx . . $ `<external>/9559255664802066005/xorg-server.h:31:9`! |
| 95 | pix_xoff = -target->screen_xcxx . . $ _Pixmap#screen_x. + target->drawablecxx . . $ _Pixmap#drawable..xcxx . . $ _Drawable#x.; |
| 96 | pix_yoff = -target->screen_ycxx . . $ _Pixmap#screen_y. + target->drawablecxx . . $ _Pixmap#drawable..ycxx . . $ _Drawable#y.; |
| 97 | #else |
| 98 | pix_xoff = 0; |
| 99 | pix_yoff = 0; |
| 100 | #endif |
| 101 | } |
| 102 | |
| 103 | #define BYTES_FOR_BOXEScxx . . $ `src/uxa/i915_video.c:103:9`!(n) ((200 + (n) * 20) * 4) |
| 104 | #define BOXES_IN_BYTEScxx . . $ `src/uxa/i915_video.c:104:9`!(s) ((((s)/4) - 200) / 20) |
| 105 | #define BATCH_BYTEScxx . . $ `src/uxa/i915_video.c:105:9`!(p) ((p)->batch_bo->size - 16) |
| 106 | |
| 107 | while (nbox_total) { |
| 108 | nbox_this_time = nbox_total; |
| 109 | if (BYTES_FOR_BOXEScxx . . $ `src/uxa/i915_video.c:103:9`!(nbox_this_time) > BATCH_BYTEScxx . . $ `src/uxa/i915_video.c:105:9`!(intel)) |
| 110 | nbox_this_time = BOXES_IN_BYTEScxx . . $ `src/uxa/i915_video.c:104:9`!(BATCH_BYTEScxx . . $ `src/uxa/i915_video.c:105:9`!(intel)); |
| 111 | nbox_total -= nbox_this_time; |
| 112 | |
| 113 | intel_batch_start_atomiccxx . . $ intel_batch_start_atomic(dfa31234d21d6d72).(scrn, 200 + 20 * nbox_this_time); |
| 114 | |
| 115 | IntelEmitInvarientStatecxx . . $ IntelEmitInvarientState(f1d66590ec36ebe6).(scrn); |
| 116 | intel->last_3dcxx . . $ intel_screen_private#last_3d. = LAST_3D_VIDEOcxx . . $ LAST_3D_VIDEO.; |
| 117 | |
| 118 | /* draw rect -- just clipping */ |
| 119 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(_3DSTATE_DRAW_RECT_CMDcxx . . $ `src/uxa/i915_reg.h:176:9`!); |
| 120 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(DRAW_DITHER_OFS_Xcxx . . $ `src/uxa/i915_reg.h:179:9`!(pixmap->drawable.x & 3) | |
| 121 | DRAW_DITHER_OFS_Ycxx . . $ `src/uxa/i915_reg.h:180:9`!(pixmap->drawable.y & 3)); |
| 122 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x00000000); /* ymin, xmin */ |
| 123 | /* ymax, xmax */ |
| 124 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!((target->drawable.width - 1) | |
| 125 | (target->drawable.height - 1) << 16); |
| 126 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x00000000); /* yorigin, xorigin */ |
| 127 | |
| 128 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(_3DSTATE_LOAD_STATE_IMMEDIATE_1cxx . . $ `src/uxa/i915_reg.h:325:9`! | I1_LOAD_Scxx . . $ `src/uxa/i915_reg.h:326:9`!(2) | |
| 129 | I1_LOAD_Scxx . . $ `src/uxa/i915_reg.h:326:9`!(5) | I1_LOAD_Scxx . . $ `src/uxa/i915_reg.h:326:9`!(6) | 2); |
| 130 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(S2_TEXCOORD_FMTcxx . . $ `src/uxa/i915_reg.h:345:9`!(0, TEXCOORDFMT_2Dcxx . . $ `src/uxa/i915_reg.h:336:9`!) | |
| 131 | S2_TEXCOORD_FMTcxx . . $ `src/uxa/i915_reg.h:345:9`!(1, TEXCOORDFMT_NOT_PRESENTcxx . . $ `src/uxa/i915_reg.h:342:9`!) | |
| 132 | S2_TEXCOORD_FMTcxx . . $ `src/uxa/i915_reg.h:345:9`!(2, TEXCOORDFMT_NOT_PRESENTcxx . . $ `src/uxa/i915_reg.h:342:9`!) | |
| 133 | S2_TEXCOORD_FMTcxx . . $ `src/uxa/i915_reg.h:345:9`!(3, TEXCOORDFMT_NOT_PRESENTcxx . . $ `src/uxa/i915_reg.h:342:9`!) | |
| 134 | S2_TEXCOORD_FMTcxx . . $ `src/uxa/i915_reg.h:345:9`!(4, TEXCOORDFMT_NOT_PRESENTcxx . . $ `src/uxa/i915_reg.h:342:9`!) | |
| 135 | S2_TEXCOORD_FMTcxx . . $ `src/uxa/i915_reg.h:345:9`!(5, TEXCOORDFMT_NOT_PRESENTcxx . . $ `src/uxa/i915_reg.h:342:9`!) | |
| 136 | S2_TEXCOORD_FMTcxx . . $ `src/uxa/i915_reg.h:345:9`!(6, TEXCOORDFMT_NOT_PRESENTcxx . . $ `src/uxa/i915_reg.h:342:9`!) | |
| 137 | S2_TEXCOORD_FMTcxx . . $ `src/uxa/i915_reg.h:345:9`!(7, TEXCOORDFMT_NOT_PRESENTcxx . . $ `src/uxa/i915_reg.h:342:9`!)); |
| 138 | s5 = 0x0; |
| 139 | if (intel->cppcxx . . $ intel_screen_private#cpp. == 2) |
| 140 | s5 |= S5_COLOR_DITHER_ENABLEcxx . . $ `src/uxa/i915_reg.h:418:9`!; |
| 141 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(s5); /* S5 - enable bits */ |
| 142 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!((2 << S6_DEPTH_TEST_FUNC_SHIFTcxx . . $ `src/uxa/i915_reg.h:427:9`!) | |
| 143 | (2 << S6_CBUF_SRC_BLEND_FACT_SHIFTcxx . . $ `src/uxa/i915_reg.h:432:9`!) | |
| 144 | (1 << S6_CBUF_DST_BLEND_FACT_SHIFTcxx . . $ `src/uxa/i915_reg.h:434:9`!) | |
| 145 | S6_COLOR_WRITE_ENABLEcxx . . $ `src/uxa/i915_reg.h:437:9`! | (2 << S6_TRISTRIP_PV_SHIFTcxx . . $ `src/uxa/i915_reg.h:438:9`!)); |
| 146 | |
| 147 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(_3DSTATE_CONST_BLEND_COLOR_CMDcxx . . $ `src/uxa/i915_reg.h:117:9`!); |
| 148 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x00000000); |
| 149 | |
| 150 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(_3DSTATE_DST_BUF_VARS_CMDcxx . . $ `src/uxa/i915_reg.h:141:9`!); |
| 151 | if (intel->cppcxx . . $ intel_screen_private#cpp. == 2) |
| 152 | format = COLR_BUF_RGB565cxx . . $ `src/uxa/i915_reg.h:162:9`!; |
| 153 | else |
| 154 | format = |
| 155 | COLR_BUF_ARGB8888cxx . . $ `src/uxa/i915_reg.h:163:9`! | DEPTH_FRMT_24_FIXED_8_OTHERcxx . . $ `src/uxa/i915_reg.h:169:9`!; |
| 156 | |
| 157 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(LOD_PRECLAMP_OGLcxx . . $ `src/uxa/i915_reg.h:146:9`! | |
| 158 | DSTORG_HORT_BIAScxx . . $ `src/uxa/i915_reg.h:153:9`!(0x8) | |
| 159 | DSTORG_VERT_BIAScxx . . $ `src/uxa/i915_reg.h:154:9`!(0x8) | format); |
| 160 | |
| 161 | /* front buffer, pitch, offset */ |
| 162 | if (intel_uxa_pixmap_tiledcxx . . $ intel_uxa_pixmap_tiled(b4f27dd675b63059).(target)) { |
| 163 | tiling = BUF_3D_TILED_SURFACEcxx . . $ `src/uxa/i915_reg.h:98:9`!; |
| 164 | if (intel_uxa_get_pixmap_privatecxx . . $ intel_uxa_get_pixmap_private(38765e3cf8028239).(target)->tilingcxx . . $ intel_uxa_pixmap#tiling. == I915_TILING_Ycxx . . $ `<external>/17903803794487424948/i915_drm.h:1659:9`!) |
| 165 | tiling |= BUF_3D_TILE_WALK_Ycxx . . $ `src/uxa/i915_reg.h:100:9`!; |
| 166 | } else |
| 167 | tiling = 0; |
| 168 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(_3DSTATE_BUF_INFO_CMDcxx . . $ `src/uxa/i915_reg.h:93:9`!); |
| 169 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(BUF_3D_ID_COLOR_BACKcxx . . $ `src/uxa/i915_reg.h:95:9`! | tiling | |
| 170 | BUF_3D_PITCHcxx . . $ `src/uxa/i915_reg.h:101:9`!(intel_pixmap_pitch(target))); |
| 171 | OUT_RELOC_PIXMAPcxx . . $ `src/uxa/intel_batchbuffer.h:170:9`!(target, I915_GEM_DOMAIN_RENDERcxx . . $ `<external>/17903803794487424948/i915_drm.h:1110:9`!, |
| 172 | I915_GEM_DOMAIN_RENDERcxx . . $ `<external>/17903803794487424948/i915_drm.h:1110:9`!, 0); |
| 173 | |
| 174 | if (!is_planar_fourcccxx . . $ is_planar_fourcc(7864480464b09eea).(id)) { |
| 175 | FS_LOCALScxx . . $ `src/uxa/i915_3d.h:606:9`!(); |
| 176 | |
| 177 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(_3DSTATE_PIXEL_SHADER_CONSTANTScxx . . $ `src/uxa/i915_reg.h:465:9`! | 4); |
| 178 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x0000001); /* constant 0 */ |
| 179 | /* constant 0: brightness/contrast */ |
| 180 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(adaptor_priv->brightness / 128.0); |
| 181 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(adaptor_priv->contrast / 255.0); |
| 182 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(0.0); |
| 183 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(0.0); |
| 184 | |
| 185 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(_3DSTATE_SAMPLER_STATEcxx . . $ `src/uxa/i915_reg.h:770:9`! | 3); |
| 186 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x00000001); |
| 187 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(SS2_COLORSPACE_CONVERSIONcxx . . $ `src/uxa/i915_reg.h:777:9`! | |
| 188 | (FILTER_LINEARcxx . . $ `src/uxa/i915_reg.h:789:11`! << SS2_MAG_FILTER_SHIFTcxx . . $ `src/uxa/i915_reg.h:786:9`!) | |
| 189 | (FILTER_LINEARcxx . . $ `src/uxa/i915_reg.h:789:11`! << SS2_MIN_FILTER_SHIFTcxx . . $ `src/uxa/i915_reg.h:795:9`!)); |
| 190 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!((TEXCOORDMODE_CLAMP_EDGEcxx . . $ `src/uxa/i915_reg.h:820:11`! << |
| 191 | SS3_TCX_ADDR_MODE_SHIFTcxx . . $ `src/uxa/i915_reg.h:816:9`!) | |
| 192 | (TEXCOORDMODE_CLAMP_EDGEcxx . . $ `src/uxa/i915_reg.h:820:11`! << |
| 193 | SS3_TCY_ADDR_MODE_SHIFTcxx . . $ `src/uxa/i915_reg.h:824:9`!) | |
| 194 | (0 << SS3_TEXTUREMAP_INDEX_SHIFTcxx . . $ `src/uxa/i915_reg.h:829:9`!) | |
| 195 | SS3_NORMALIZED_COORDScxx . . $ `src/uxa/i915_reg.h:828:9`!); |
| 196 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x00000000); |
| 197 | |
| 198 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(_3DSTATE_MAP_STATEcxx . . $ `src/uxa/i915_reg.h:684:9`! | 3); |
| 199 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x00000001); /* texture map #1 */ |
| 200 | if (adaptor_priv->bufcxx . . $ $anonymous_type_b91f15a9274ef484_0#buf.) |
| 201 | OUT_RELOCcxx . . $ `src/uxa/intel_batchbuffer.h:164:9`!(adaptor_priv->buf, |
| 202 | I915_GEM_DOMAIN_SAMPLERcxx . . $ `<external>/17903803794487424948/i915_drm.h:1112:9`!, 0, |
| 203 | adaptor_priv->YBufOffset); |
| 204 | else |
| 205 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(adaptor_priv->YBufOffset); |
| 206 | |
| 207 | ms3 = MAPSURF_422cxx . . $ `src/uxa/i915_reg.h:702:12`!; |
| 208 | switch (id) { |
| 209 | case FOURCC_YUY2cxx . . $ `<external>/5950719045248363523/fourcc.h:39:9`!: |
| 210 | ms3 |= MT_422_YCRCB_NORMALcxx . . $ `src/uxa/i915_reg.h:738:12`!; |
| 211 | break; |
| 212 | case FOURCC_UYVYcxx . . $ `<external>/5950719045248363523/fourcc.h:99:9`!: |
| 213 | ms3 |= MT_422_YCRCB_SWAPYcxx . . $ `src/uxa/i915_reg.h:737:12`!; |
| 214 | break; |
| 215 | } |
| 216 | ms3 |= (height - 1) << MS3_HEIGHT_SHIFTcxx . . $ `src/uxa/i915_reg.h:694:9`!; |
| 217 | ms3 |= (width - 1) << MS3_WIDTH_SHIFTcxx . . $ `src/uxa/i915_reg.h:695:9`!; |
| 218 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(ms3); |
| 219 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(((video_pitch / 4) - 1) << MS4_PITCH_SHIFTcxx . . $ `src/uxa/i915_reg.h:751:9`!); |
| 220 | |
| 221 | FS_BEGINcxx . . $ `src/uxa/i915_3d.h:609:9`!(); |
| 222 | i915_fs_dclcxx . . $ `src/uxa/i915_3d.h:357:9`!(FS_S0cxx . . $ `src/uxa/i915_3d.h:274:9`!); |
| 223 | i915_fs_dclcxx . . $ `src/uxa/i915_3d.h:357:9`!(FS_T0cxx . . $ `src/uxa/i915_3d.h:251:9`!); |
| 224 | i915_fs_texldcxx . . $ `src/uxa/i915_3d.h:367:9`!(FS_OCcxx . . $ `src/uxa/i915_3d.h:280:9`!, FS_S0cxx . . $ `src/uxa/i915_3d.h:274:9`!, FS_T0cxx . . $ `src/uxa/i915_3d.h:251:9`!); |
| 225 | if (adaptor_priv->brightnesscxx . . $ $anonymous_type_b91f15a9274ef484_0#brightness. != 0) { |
| 226 | i915_fs_addcxx . . $ `src/uxa/i915_3d.h:523:9`!(FS_OCcxx . . $ `src/uxa/i915_3d.h:280:9`!, |
| 227 | i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_OCcxx . . $ `src/uxa/i915_3d.h:280:9`!), |
| 228 | i915_fs_operandcxx . . $ `src/uxa/i915_3d.h:320:9`!(FS_C0cxx . . $ `src/uxa/i915_3d.h:264:9`!, X, X, X, |
| 229 | ZERO)); |
| 230 | } |
| 231 | FS_ENDcxx . . $ `src/uxa/i915_3d.h:614:9`!(); |
| 232 | } else { |
| 233 | FS_LOCALScxx . . $ `src/uxa/i915_3d.h:606:9`!(); |
| 234 | |
| 235 | /* For the planar formats, we set up three samplers -- |
| 236 | * one for each plane, in a Y8 format. Because I |
| 237 | * couldn't get the special PLANAR_TO_PACKED |
| 238 | * shader setup to work, I did the manual pixel shader: |
| 239 | * |
| 240 | * y' = y - .0625 |
| 241 | * u' = u - .5 |
| 242 | * v' = v - .5; |
| 243 | * |
| 244 | * r = 1.1643 * y' + 0.0 * u' + 1.5958 * v' |
| 245 | * g = 1.1643 * y' - 0.39173 * u' - 0.81290 * v' |
| 246 | * b = 1.1643 * y' + 2.017 * u' + 0.0 * v' |
| 247 | * |
| 248 | * register assignment: |
| 249 | * r0 = (y',u',v',0) |
| 250 | * r1 = (y,y,y,y) |
| 251 | * r2 = (u,u,u,u) |
| 252 | * r3 = (v,v,v,v) |
| 253 | * OC = (r,g,b,1) |
| 254 | */ |
| 255 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(_3DSTATE_PIXEL_SHADER_CONSTANTScxx . . $ `src/uxa/i915_reg.h:465:9`! | (22 - 2)); |
| 256 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x000001f); /* constants 0-4 */ |
| 257 | /* constant 0: normalization offsets */ |
| 258 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(-0.0625); |
| 259 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(-0.5); |
| 260 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(-0.5); |
| 261 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(0.0); |
| 262 | /* constant 1: r coefficients */ |
| 263 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(1.1643); |
| 264 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(0.0); |
| 265 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(1.5958); |
| 266 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(0.0); |
| 267 | /* constant 2: g coefficients */ |
| 268 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(1.1643); |
| 269 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(-0.39173); |
| 270 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(-0.81290); |
| 271 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(0.0); |
| 272 | /* constant 3: b coefficients */ |
| 273 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(1.1643); |
| 274 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(2.017); |
| 275 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(0.0); |
| 276 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(0.0); |
| 277 | /* constant 4: brightness/contrast */ |
| 278 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(adaptor_priv->brightness / 128.0); |
| 279 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(adaptor_priv->contrast / 255.0); |
| 280 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(0.0); |
| 281 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(0.0); |
| 282 | |
| 283 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(_3DSTATE_SAMPLER_STATEcxx . . $ `src/uxa/i915_reg.h:770:9`! | 9); |
| 284 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x00000007); |
| 285 | /* sampler 0 */ |
| 286 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!((FILTER_LINEARcxx . . $ `src/uxa/i915_reg.h:789:11`! << SS2_MAG_FILTER_SHIFTcxx . . $ `src/uxa/i915_reg.h:786:9`!) | |
| 287 | (FILTER_LINEARcxx . . $ `src/uxa/i915_reg.h:789:11`! << SS2_MIN_FILTER_SHIFTcxx . . $ `src/uxa/i915_reg.h:795:9`!)); |
| 288 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!((TEXCOORDMODE_CLAMP_EDGEcxx . . $ `src/uxa/i915_reg.h:820:11`! << |
| 289 | SS3_TCX_ADDR_MODE_SHIFTcxx . . $ `src/uxa/i915_reg.h:816:9`!) | |
| 290 | (TEXCOORDMODE_CLAMP_EDGEcxx . . $ `src/uxa/i915_reg.h:820:11`! << |
| 291 | SS3_TCY_ADDR_MODE_SHIFTcxx . . $ `src/uxa/i915_reg.h:824:9`!) | |
| 292 | (0 << SS3_TEXTUREMAP_INDEX_SHIFTcxx . . $ `src/uxa/i915_reg.h:829:9`!) | |
| 293 | SS3_NORMALIZED_COORDScxx . . $ `src/uxa/i915_reg.h:828:9`!); |
| 294 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x00000000); |
| 295 | /* sampler 1 */ |
| 296 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!((FILTER_LINEARcxx . . $ `src/uxa/i915_reg.h:789:11`! << SS2_MAG_FILTER_SHIFTcxx . . $ `src/uxa/i915_reg.h:786:9`!) | |
| 297 | (FILTER_LINEARcxx . . $ `src/uxa/i915_reg.h:789:11`! << SS2_MIN_FILTER_SHIFTcxx . . $ `src/uxa/i915_reg.h:795:9`!)); |
| 298 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!((TEXCOORDMODE_CLAMP_EDGEcxx . . $ `src/uxa/i915_reg.h:820:11`! << |
| 299 | SS3_TCX_ADDR_MODE_SHIFTcxx . . $ `src/uxa/i915_reg.h:816:9`!) | |
| 300 | (TEXCOORDMODE_CLAMP_EDGEcxx . . $ `src/uxa/i915_reg.h:820:11`! << |
| 301 | SS3_TCY_ADDR_MODE_SHIFTcxx . . $ `src/uxa/i915_reg.h:824:9`!) | |
| 302 | (1 << SS3_TEXTUREMAP_INDEX_SHIFTcxx . . $ `src/uxa/i915_reg.h:829:9`!) | |
| 303 | SS3_NORMALIZED_COORDScxx . . $ `src/uxa/i915_reg.h:828:9`!); |
| 304 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x00000000); |
| 305 | /* sampler 2 */ |
| 306 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!((FILTER_LINEARcxx . . $ `src/uxa/i915_reg.h:789:11`! << SS2_MAG_FILTER_SHIFTcxx . . $ `src/uxa/i915_reg.h:786:9`!) | |
| 307 | (FILTER_LINEARcxx . . $ `src/uxa/i915_reg.h:789:11`! << SS2_MIN_FILTER_SHIFTcxx . . $ `src/uxa/i915_reg.h:795:9`!)); |
| 308 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!((TEXCOORDMODE_CLAMP_EDGEcxx . . $ `src/uxa/i915_reg.h:820:11`! << |
| 309 | SS3_TCX_ADDR_MODE_SHIFTcxx . . $ `src/uxa/i915_reg.h:816:9`!) | |
| 310 | (TEXCOORDMODE_CLAMP_EDGEcxx . . $ `src/uxa/i915_reg.h:820:11`! << |
| 311 | SS3_TCY_ADDR_MODE_SHIFTcxx . . $ `src/uxa/i915_reg.h:824:9`!) | |
| 312 | (2 << SS3_TEXTUREMAP_INDEX_SHIFTcxx . . $ `src/uxa/i915_reg.h:829:9`!) | |
| 313 | SS3_NORMALIZED_COORDScxx . . $ `src/uxa/i915_reg.h:828:9`!); |
| 314 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x00000000); |
| 315 | |
| 316 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(_3DSTATE_MAP_STATEcxx . . $ `src/uxa/i915_reg.h:684:9`! | 9); |
| 317 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(0x00000007); |
| 318 | |
| 319 | if (adaptor_priv->bufcxx . . $ $anonymous_type_b91f15a9274ef484_0#buf.) |
| 320 | OUT_RELOCcxx . . $ `src/uxa/intel_batchbuffer.h:164:9`!(adaptor_priv->buf, |
| 321 | I915_GEM_DOMAIN_SAMPLERcxx . . $ `<external>/17903803794487424948/i915_drm.h:1112:9`!, 0, |
| 322 | adaptor_priv->YBufOffset); |
| 323 | else |
| 324 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(adaptor_priv->YBufOffset); |
| 325 | |
| 326 | ms3 = MAPSURF_8BITcxx . . $ `src/uxa/i915_reg.h:699:12`! | MT_8BIT_I8cxx . . $ `src/uxa/i915_reg.h:708:12`!; |
| 327 | ms3 |= (height - 1) << MS3_HEIGHT_SHIFTcxx . . $ `src/uxa/i915_reg.h:694:9`!; |
| 328 | ms3 |= (width - 1) << MS3_WIDTH_SHIFTcxx . . $ `src/uxa/i915_reg.h:695:9`!; |
| 329 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(ms3); |
| 330 | /* check to see if Y has special pitch than normal |
| 331 | * double u/v pitch, e.g i915 XvMC hw requires at |
| 332 | * least 1K alignment, so Y pitch might |
| 333 | * be same as U/V's.*/ |
| 334 | if (video_pitch2) |
| 335 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(((video_pitch2 / 4) - |
| 336 | 1) << MS4_PITCH_SHIFTcxx . . $ `src/uxa/i915_reg.h:751:9`!); |
| 337 | else |
| 338 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(((video_pitch * 2 / 4) - |
| 339 | 1) << MS4_PITCH_SHIFTcxx . . $ `src/uxa/i915_reg.h:751:9`!); |
| 340 | |
| 341 | if (adaptor_priv->bufcxx . . $ $anonymous_type_b91f15a9274ef484_0#buf.) |
| 342 | OUT_RELOCcxx . . $ `src/uxa/intel_batchbuffer.h:164:9`!(adaptor_priv->buf, |
| 343 | I915_GEM_DOMAIN_SAMPLERcxx . . $ `<external>/17903803794487424948/i915_drm.h:1112:9`!, 0, |
| 344 | adaptor_priv->UBufOffset); |
| 345 | else |
| 346 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(adaptor_priv->UBufOffset); |
| 347 | |
| 348 | ms3 = MAPSURF_8BITcxx . . $ `src/uxa/i915_reg.h:699:12`! | MT_8BIT_I8cxx . . $ `src/uxa/i915_reg.h:708:12`!; |
| 349 | ms3 |= (height / 2 - 1) << MS3_HEIGHT_SHIFTcxx . . $ `src/uxa/i915_reg.h:694:9`!; |
| 350 | ms3 |= (width / 2 - 1) << MS3_WIDTH_SHIFTcxx . . $ `src/uxa/i915_reg.h:695:9`!; |
| 351 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(ms3); |
| 352 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(((video_pitch / 4) - 1) << MS4_PITCH_SHIFTcxx . . $ `src/uxa/i915_reg.h:751:9`!); |
| 353 | |
| 354 | if (adaptor_priv->bufcxx . . $ $anonymous_type_b91f15a9274ef484_0#buf.) |
| 355 | OUT_RELOCcxx . . $ `src/uxa/intel_batchbuffer.h:164:9`!(adaptor_priv->buf, |
| 356 | I915_GEM_DOMAIN_SAMPLERcxx . . $ `<external>/17903803794487424948/i915_drm.h:1112:9`!, 0, |
| 357 | adaptor_priv->VBufOffset); |
| 358 | else |
| 359 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(adaptor_priv->VBufOffset); |
| 360 | |
| 361 | ms3 = MAPSURF_8BITcxx . . $ `src/uxa/i915_reg.h:699:12`! | MT_8BIT_I8cxx . . $ `src/uxa/i915_reg.h:708:12`!; |
| 362 | ms3 |= (height / 2 - 1) << MS3_HEIGHT_SHIFTcxx . . $ `src/uxa/i915_reg.h:694:9`!; |
| 363 | ms3 |= (width / 2 - 1) << MS3_WIDTH_SHIFTcxx . . $ `src/uxa/i915_reg.h:695:9`!; |
| 364 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(ms3); |
| 365 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(((video_pitch / 4) - 1) << MS4_PITCH_SHIFTcxx . . $ `src/uxa/i915_reg.h:751:9`!); |
| 366 | |
| 367 | FS_BEGINcxx . . $ `src/uxa/i915_3d.h:609:9`!(); |
| 368 | /* Declare samplers */ |
| 369 | i915_fs_dclcxx . . $ `src/uxa/i915_3d.h:357:9`!(FS_S0cxx . . $ `src/uxa/i915_3d.h:274:9`!); /* Y */ |
| 370 | i915_fs_dclcxx . . $ `src/uxa/i915_3d.h:357:9`!(FS_S1cxx . . $ `src/uxa/i915_3d.h:275:9`!); /* U */ |
| 371 | i915_fs_dclcxx . . $ `src/uxa/i915_3d.h:357:9`!(FS_S2cxx . . $ `src/uxa/i915_3d.h:276:9`!); /* V */ |
| 372 | i915_fs_dclcxx . . $ `src/uxa/i915_3d.h:357:9`!(FS_T0cxx . . $ `src/uxa/i915_3d.h:251:9`!); /* normalized coords */ |
| 373 | |
| 374 | /* Load samplers to temporaries. */ |
| 375 | i915_fs_texldcxx . . $ `src/uxa/i915_3d.h:367:9`!(FS_R1cxx . . $ `src/uxa/i915_3d.h:246:9`!, FS_S0cxx . . $ `src/uxa/i915_3d.h:274:9`!, FS_T0cxx . . $ `src/uxa/i915_3d.h:251:9`!); |
| 376 | i915_fs_texldcxx . . $ `src/uxa/i915_3d.h:367:9`!(FS_R2cxx . . $ `src/uxa/i915_3d.h:247:9`!, FS_S1cxx . . $ `src/uxa/i915_3d.h:275:9`!, FS_T0cxx . . $ `src/uxa/i915_3d.h:251:9`!); |
| 377 | i915_fs_texldcxx . . $ `src/uxa/i915_3d.h:367:9`!(FS_R3cxx . . $ `src/uxa/i915_3d.h:248:9`!, FS_S2cxx . . $ `src/uxa/i915_3d.h:276:9`!, FS_T0cxx . . $ `src/uxa/i915_3d.h:251:9`!); |
| 378 | |
| 379 | /* Move the sampled YUV data in R[123] to the first |
| 380 | * 3 channels of R0. |
| 381 | */ |
| 382 | i915_fs_mov_maskedcxx . . $ `src/uxa/i915_3d.h:509:9`!(FS_R0cxx . . $ `src/uxa/i915_3d.h:245:9`!, MASK_Xcxx . . $ `src/uxa/i915_3d.h:236:9`!, |
| 383 | i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_R1cxx . . $ `src/uxa/i915_3d.h:246:9`!)); |
| 384 | i915_fs_mov_maskedcxx . . $ `src/uxa/i915_3d.h:509:9`!(FS_R0cxx . . $ `src/uxa/i915_3d.h:245:9`!, MASK_Ycxx . . $ `src/uxa/i915_3d.h:237:9`!, |
| 385 | i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_R2cxx . . $ `src/uxa/i915_3d.h:247:9`!)); |
| 386 | i915_fs_mov_maskedcxx . . $ `src/uxa/i915_3d.h:509:9`!(FS_R0cxx . . $ `src/uxa/i915_3d.h:245:9`!, MASK_Zcxx . . $ `src/uxa/i915_3d.h:238:9`!, |
| 387 | i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_R3cxx . . $ `src/uxa/i915_3d.h:248:9`!)); |
| 388 | |
| 389 | /* Normalize the YUV data */ |
| 390 | i915_fs_addcxx . . $ `src/uxa/i915_3d.h:523:9`!(FS_R0cxx . . $ `src/uxa/i915_3d.h:245:9`!, i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_R0cxx . . $ `src/uxa/i915_3d.h:245:9`!), |
| 391 | i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_C0cxx . . $ `src/uxa/i915_3d.h:264:9`!)); |
| 392 | /* dot-product the YUV data in R0 by the vectors of |
| 393 | * coefficients for calculating R, G, and B, storing |
| 394 | * the results in the R, G, or B channels of the output |
| 395 | * color. The OC results are implicitly clamped |
| 396 | * at the end of the program. |
| 397 | */ |
| 398 | i915_fs_dp3cxx . . $ `src/uxa/i915_3d.h:588:9`!(FS_OCcxx . . $ `src/uxa/i915_3d.h:280:9`!, MASK_Xcxx . . $ `src/uxa/i915_3d.h:236:9`!, |
| 399 | i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_R0cxx . . $ `src/uxa/i915_3d.h:245:9`!), |
| 400 | i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_C1cxx . . $ `src/uxa/i915_3d.h:265:9`!)); |
| 401 | i915_fs_dp3cxx . . $ `src/uxa/i915_3d.h:588:9`!(FS_OCcxx . . $ `src/uxa/i915_3d.h:280:9`!, MASK_Ycxx . . $ `src/uxa/i915_3d.h:237:9`!, |
| 402 | i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_R0cxx . . $ `src/uxa/i915_3d.h:245:9`!), |
| 403 | i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_C2cxx . . $ `src/uxa/i915_3d.h:266:9`!)); |
| 404 | i915_fs_dp3cxx . . $ `src/uxa/i915_3d.h:588:9`!(FS_OCcxx . . $ `src/uxa/i915_3d.h:280:9`!, MASK_Zcxx . . $ `src/uxa/i915_3d.h:238:9`!, |
| 405 | i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_R0cxx . . $ `src/uxa/i915_3d.h:245:9`!), |
| 406 | i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_C3cxx . . $ `src/uxa/i915_3d.h:267:9`!)); |
| 407 | /* Set alpha of the output to 1.0, by wiring W to 1 |
| 408 | * and not actually using the source. |
| 409 | */ |
| 410 | i915_fs_mov_maskedcxx . . $ `src/uxa/i915_3d.h:509:9`!(FS_OCcxx . . $ `src/uxa/i915_3d.h:280:9`!, MASK_Wcxx . . $ `src/uxa/i915_3d.h:239:9`!, |
| 411 | i915_fs_operand_onecxx . . $ `src/uxa/i915_3d.h:349:9`!()); |
| 412 | |
| 413 | if (adaptor_priv->brightnesscxx . . $ $anonymous_type_b91f15a9274ef484_0#brightness. != 0) { |
| 414 | i915_fs_addcxx . . $ `src/uxa/i915_3d.h:523:9`!(FS_OCcxx . . $ `src/uxa/i915_3d.h:280:9`!, |
| 415 | i915_fs_operand_regcxx . . $ `src/uxa/i915_3d.h:330:9`!(FS_OCcxx . . $ `src/uxa/i915_3d.h:280:9`!), |
| 416 | i915_fs_operandcxx . . $ `src/uxa/i915_3d.h:320:9`!(FS_C4cxx . . $ `src/uxa/i915_3d.h:268:9`!, X, X, X, |
| 417 | ZERO)); |
| 418 | } |
| 419 | FS_ENDcxx . . $ `src/uxa/i915_3d.h:614:9`!(); |
| 420 | } |
| 421 | |
| 422 | OUT_BATCHcxx . . $ `src/uxa/intel_batchbuffer.h:162:9`!(PRIM3D_RECTLISTcxx . . $ `src/uxa/i915_reg.h:44:9`! | (12 * nbox_this_time - 1)); |
| 423 | while (nbox_this_time--) { |
| 424 | int box_x1 = pbox->x1cxx . . $ pixman_box16#x1.; |
| 425 | int box_y1 = pbox->y1cxx . . $ pixman_box16#y1.; |
| 426 | int box_x2 = pbox->x2cxx . . $ pixman_box16#x2.; |
| 427 | int box_y2 = pbox->y2cxx . . $ pixman_box16#y2.; |
| 428 | float src_scale_x, src_scale_y; |
| 429 | |
| 430 | pbox++; |
| 431 | |
| 432 | src_scale_x = ((float)src_w / width) / drw_w; |
| 433 | src_scale_y = ((float)src_h / height) / drw_h; |
| 434 | |
| 435 | /* vertex data - rect list consists of bottom right, |
| 436 | * bottom left, and top left vertices. |
| 437 | */ |
| 438 | |
| 439 | /* bottom right */ |
| 440 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(box_x2 + pix_xoff); |
| 441 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(box_y2 + pix_yoff); |
| 442 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!((box_x2 - dxo) * src_scale_x); |
| 443 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!((box_y2 - dyo) * src_scale_y); |
| 444 | |
| 445 | /* bottom left */ |
| 446 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(box_x1 + pix_xoff); |
| 447 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(box_y2 + pix_yoff); |
| 448 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!((box_x1 - dxo) * src_scale_x); |
| 449 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!((box_y2 - dyo) * src_scale_y); |
| 450 | |
| 451 | /* top left */ |
| 452 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(box_x1 + pix_xoff); |
| 453 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!(box_y1 + pix_yoff); |
| 454 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!((box_x1 - dxo) * src_scale_x); |
| 455 | OUT_BATCH_Fcxx . . $ `src/uxa/intel_batchbuffer.h:181:9`!((box_y1 - dyo) * src_scale_y); |
| 456 | } |
| 457 | |
| 458 | intel_batch_end_atomiccxx . . $ intel_batch_end_atomic(f1d66590ec36ebe6).(scrn); |
| 459 | } |
| 460 | |
| 461 | if (target != pixmap) { |
| 462 | GCPtrcxx . . $ GCPtr# gc; |
| 463 | |
| 464 | gc = GetScratchGCcxx . . $ GetScratchGC(44bf9445c2078010).(pixmap->drawablecxx . . $ _Pixmap#drawable..depthcxx . . $ _Drawable#depth., |
| 465 | pixmap->drawablecxx . . $ _Pixmap#drawable..pScreencxx . . $ _Drawable#pScreen.); |
| 466 | if (gc) { |
| 467 | gc->subWindowModecxx . . $ _GC#subWindowMode. = ClipByChildrencxx . . $ `<external>/1208737181511191802/X.h:535:9`!; |
| 468 | |
| 469 | if (REGION_NUM_RECTScxx . . $ `<external>/14128946855725894503/regionstr.h:346:9`!(dstRegion) > 1) { |
| 470 | RegionPtrcxx . . $ RegionPtr# tmp; |
| 471 | |
| 472 | tmp = REGION_CREATEcxx . . $ `<external>/14128946855725894503/regionstr.h:355:9`!(pixmap->drawable.pScreen, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 0); |
| 473 | if (tmp) { |
| 474 | REGION_COPYcxx . . $ `<external>/14128946855725894503/regionstr.h:356:9`!(pixmap->drawable.pScreen, tmp, dstRegion); |
| 475 | gc->funcscxx . . $ _GC#funcs.->ChangeClipcxx . . $ _GCFuncs#ChangeClip.(gc, CT_REGIONcxx . . $ `<external>/7839170913118237144/gc.h:59:9`!, tmp, 0); |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | ValidateGCcxx . . $ ValidateGC(846eadd374091791).(&pixmap->drawablecxx . . $ _Pixmap#drawable., gc); |
| 480 | gc->opscxx . . $ _GC#ops.->CopyAreacxx . . $ _GCOps#CopyArea.(&target->drawablecxx . . $ _Pixmap#drawable., &pixmap->drawablecxx . . $ _Pixmap#drawable., gc, |
| 481 | 0, 0, |
| 482 | target->drawablecxx . . $ _Pixmap#drawable..widthcxx . . $ _Drawable#width., |
| 483 | target->drawablecxx . . $ _Pixmap#drawable..heightcxx . . $ _Drawable#height., |
| 484 | -pix_xoff, -pix_yoff); |
| 485 | FreeScratchGCcxx . . $ FreeScratchGC(e7809960d98f6890).(gc); |
| 486 | } |
| 487 | |
| 488 | target->drawablecxx . . $ _Pixmap#drawable..pScreencxx . . $ _Drawable#pScreen.->DestroyPixmapcxx . . $ _Screen#DestroyPixmap.(target); |
| 489 | } |
| 490 | |
| 491 | intel_uxa_debug_flushcxx . . $ intel_uxa_debug_flush(f1d66590ec36ebe6).(scrn); |
| 492 | } |