r600_textured_videofuncs.c revision b13dfe66
1/* 2 * Copyright 2008 Advanced Micro Devices, Inc. 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 * Author: Alex Deucher <alexander.deucher@amd.com> 24 * 25 */ 26 27#ifdef HAVE_CONFIG_H 28#include "config.h" 29#endif 30 31#include "xf86.h" 32 33#include "exa.h" 34 35#include "radeon.h" 36#include "radeon_reg.h" 37#include "r600_shader.h" 38#include "r600_reg.h" 39#include "r600_state.h" 40 41#include "radeon_video.h" 42 43#include <X11/extensions/Xv.h> 44#include "fourcc.h" 45 46#include "damage.h" 47 48#include "radeon_exa_shared.h" 49#include "radeon_vbo.h" 50 51/* Parameters for ITU-R BT.601 and ITU-R BT.709 colour spaces 52 note the difference to the parameters used in overlay are due 53 to 10bit vs. float calcs */ 54static REF_TRANSFORM trans[2] = 55{ 56 {1.1643, 0.0, 1.5960, -0.3918, -0.8129, 2.0172, 0.0}, /* BT.601 */ 57 {1.1643, 0.0, 1.7927, -0.2132, -0.5329, 2.1124, 0.0} /* BT.709 */ 58}; 59 60void 61R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) 62{ 63 RADEONInfoPtr info = RADEONPTR(pScrn); 64 struct radeon_accel_state *accel_state = info->accel_state; 65 PixmapPtr pPixmap = pPriv->pPixmap; 66 BoxPtr pBox = REGION_RECTS(&pPriv->clip); 67 int nBox = REGION_NUM_RECTS(&pPriv->clip); 68 int dstxoff, dstyoff; 69 struct r600_accel_object src_obj, dst_obj; 70 cb_config_t cb_conf; 71 tex_resource_t tex_res; 72 tex_sampler_t tex_samp; 73 shader_config_t vs_conf, ps_conf; 74 /* 75 * y' = y - .0625 76 * u' = u - .5 77 * v' = v - .5; 78 * 79 * r = 1.1643 * y' + 0.0 * u' + 1.5958 * v' 80 * g = 1.1643 * y' - 0.39173 * u' - 0.81290 * v' 81 * b = 1.1643 * y' + 2.017 * u' + 0.0 * v' 82 * 83 * DP3 might look like the straightforward solution 84 * but we'd need to move the texture yuv values in 85 * the same reg for this to work. Therefore use MADs. 86 * Brightness just adds to the off constant. 87 * Contrast is multiplication of luminance. 88 * Saturation and hue change the u and v coeffs. 89 * Default values (before adjustments - depend on colorspace): 90 * yco = 1.1643 91 * uco = 0, -0.39173, 2.017 92 * vco = 1.5958, -0.8129, 0 93 * off = -0.0625 * yco + -0.5 * uco[r] + -0.5 * vco[r], 94 * -0.0625 * yco + -0.5 * uco[g] + -0.5 * vco[g], 95 * -0.0625 * yco + -0.5 * uco[b] + -0.5 * vco[b], 96 * 97 * temp = MAD(yco, yuv.yyyy, off) 98 * temp = MAD(uco, yuv.uuuu, temp) 99 * result = MAD(vco, yuv.vvvv, temp) 100 */ 101 /* TODO: calc consts in the shader */ 102 const float Loff = -0.0627; 103 const float Coff = -0.502; 104 float uvcosf, uvsinf; 105 float yco; 106 float uco[3], vco[3], off[3]; 107 float bright, cont, gamma; 108 int ref = pPriv->transform_index; 109 Bool needgamma = FALSE; 110 float ps_alu_consts[12]; 111 float vs_alu_consts[4]; 112 113 cont = RTFContrast(pPriv->contrast); 114 bright = RTFBrightness(pPriv->brightness); 115 gamma = (float)pPriv->gamma / 1000.0; 116 uvcosf = RTFSaturation(pPriv->saturation) * cos(RTFHue(pPriv->hue)); 117 uvsinf = RTFSaturation(pPriv->saturation) * sin(RTFHue(pPriv->hue)); 118 /* overlay video also does pre-gamma contrast/sat adjust, should we? */ 119 120 yco = trans[ref].RefLuma * cont; 121 uco[0] = -trans[ref].RefRCr * uvsinf; 122 uco[1] = trans[ref].RefGCb * uvcosf - trans[ref].RefGCr * uvsinf; 123 uco[2] = trans[ref].RefBCb * uvcosf; 124 vco[0] = trans[ref].RefRCr * uvcosf; 125 vco[1] = trans[ref].RefGCb * uvsinf + trans[ref].RefGCr * uvcosf; 126 vco[2] = trans[ref].RefBCb * uvsinf; 127 off[0] = Loff * yco + Coff * (uco[0] + vco[0]) + bright; 128 off[1] = Loff * yco + Coff * (uco[1] + vco[1]) + bright; 129 off[2] = Loff * yco + Coff * (uco[2] + vco[2]) + bright; 130 131 // XXX 132 gamma = 1.0; 133 134 if (gamma != 1.0) { 135 needgamma = TRUE; 136 /* note: gamma correction is out = in ^ gamma; 137 gpu can only do LG2/EX2 therefore we transform into 138 in ^ gamma = 2 ^ (log2(in) * gamma). 139 Lots of scalar ops, unfortunately (better solution?) - 140 without gamma that's 3 inst, with gamma it's 10... 141 could use different gamma factors per channel, 142 if that's of any use. */ 143 } 144 145 /* setup the ps consts */ 146 ps_alu_consts[0] = off[0]; 147 ps_alu_consts[1] = off[1]; 148 ps_alu_consts[2] = off[2]; 149 ps_alu_consts[3] = yco; 150 151 ps_alu_consts[4] = uco[0]; 152 ps_alu_consts[5] = uco[1]; 153 ps_alu_consts[6] = uco[2]; 154 ps_alu_consts[7] = gamma; 155 156 ps_alu_consts[8] = vco[0]; 157 ps_alu_consts[9] = vco[1]; 158 ps_alu_consts[10] = vco[2]; 159 ps_alu_consts[11] = 0.0; 160 161 CLEAR (cb_conf); 162 CLEAR (tex_res); 163 CLEAR (tex_samp); 164 CLEAR (vs_conf); 165 CLEAR (ps_conf); 166 167#if defined(XF86DRM_MODE) 168 if (info->cs) { 169 dst_obj.offset = 0; 170 src_obj.offset = 0; 171 dst_obj.bo = radeon_get_pixmap_bo(pPixmap); 172 } else 173#endif 174 { 175 dst_obj.offset = exaGetPixmapOffset(pPixmap) + info->fbLocation + pScrn->fbOffset; 176 src_obj.offset = pPriv->src_offset + info->fbLocation + pScrn->fbOffset; 177 dst_obj.bo = src_obj.bo = NULL; 178 } 179 dst_obj.pitch = exaGetPixmapPitch(pPixmap) / (pPixmap->drawable.bitsPerPixel / 8); 180 181 src_obj.pitch = pPriv->src_pitch; 182 src_obj.width = pPriv->w; 183 src_obj.height = pPriv->h; 184 src_obj.bpp = 16; 185 src_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT; 186 src_obj.bo = pPriv->src_bo[pPriv->currentBuffer]; 187 188 dst_obj.width = pPixmap->drawable.width; 189 dst_obj.height = pPixmap->drawable.height; 190 dst_obj.bpp = pPixmap->drawable.bitsPerPixel; 191 dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; 192 193 if (!R600SetAccelState(pScrn, 194 &src_obj, 195 NULL, 196 &dst_obj, 197 accel_state->xv_vs_offset, accel_state->xv_ps_offset, 198 3, 0xffffffff)) 199 return; 200 201#ifdef COMPOSITE 202 dstxoff = -pPixmap->screen_x + pPixmap->drawable.x; 203 dstyoff = -pPixmap->screen_y + pPixmap->drawable.y; 204#else 205 dstxoff = 0; 206 dstyoff = 0; 207#endif 208 209 radeon_vbo_check(pScrn, &accel_state->vbo, 16); 210 radeon_cp_start(pScrn); 211 212 r600_set_default_state(pScrn, accel_state->ib); 213 214 r600_set_generic_scissor(pScrn, accel_state->ib, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); 215 r600_set_screen_scissor(pScrn, accel_state->ib, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); 216 r600_set_window_scissor(pScrn, accel_state->ib, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); 217 218 /* PS bool constant */ 219 switch(pPriv->id) { 220 case FOURCC_YV12: 221 case FOURCC_I420: 222 r600_set_bool_consts(pScrn, accel_state->ib, SQ_BOOL_CONST_ps, (1 << 0)); 223 break; 224 case FOURCC_UYVY: 225 case FOURCC_YUY2: 226 default: 227 r600_set_bool_consts(pScrn, accel_state->ib, SQ_BOOL_CONST_ps, (0 << 0)); 228 break; 229 } 230 231 /* Shader */ 232 vs_conf.shader_addr = accel_state->vs_mc_addr; 233 vs_conf.shader_size = accel_state->vs_size; 234 vs_conf.num_gprs = 2; 235 vs_conf.stack_size = 0; 236 vs_conf.bo = accel_state->shaders_bo; 237 r600_vs_setup(pScrn, accel_state->ib, &vs_conf, RADEON_GEM_DOMAIN_VRAM); 238 239 ps_conf.shader_addr = accel_state->ps_mc_addr; 240 ps_conf.shader_size = accel_state->ps_size; 241 ps_conf.num_gprs = 3; 242 ps_conf.stack_size = 1; 243 ps_conf.uncached_first_inst = 1; 244 ps_conf.clamp_consts = 0; 245 ps_conf.export_mode = 2; 246 ps_conf.bo = accel_state->shaders_bo; 247 r600_ps_setup(pScrn, accel_state->ib, &ps_conf, RADEON_GEM_DOMAIN_VRAM); 248 249 /* PS alu constants */ 250 r600_set_alu_consts(pScrn, accel_state->ib, SQ_ALU_CONSTANT_ps, 251 sizeof(ps_alu_consts) / SQ_ALU_CONSTANT_offset, ps_alu_consts); 252 253 /* Texture */ 254 switch(pPriv->id) { 255 case FOURCC_YV12: 256 case FOURCC_I420: 257 accel_state->src_size[0] = accel_state->src_obj[0].pitch * pPriv->h; 258 259 /* Y texture */ 260 tex_res.id = 0; 261 tex_res.w = accel_state->src_obj[0].width; 262 tex_res.h = accel_state->src_obj[0].height; 263 tex_res.pitch = accel_state->src_obj[0].pitch; 264 tex_res.depth = 0; 265 tex_res.dim = SQ_TEX_DIM_2D; 266 tex_res.base = accel_state->src_obj[0].offset; 267 tex_res.mip_base = accel_state->src_obj[0].offset; 268 tex_res.size = accel_state->src_size[0]; 269 tex_res.bo = accel_state->src_obj[0].bo; 270 tex_res.mip_bo = accel_state->src_obj[0].bo; 271 272 tex_res.format = FMT_8; 273 tex_res.dst_sel_x = SQ_SEL_X; /* Y */ 274 tex_res.dst_sel_y = SQ_SEL_1; 275 tex_res.dst_sel_z = SQ_SEL_1; 276 tex_res.dst_sel_w = SQ_SEL_1; 277 278 tex_res.request_size = 1; 279 tex_res.base_level = 0; 280 tex_res.last_level = 0; 281 tex_res.perf_modulation = 0; 282 tex_res.interlaced = 0; 283 if (accel_state->src_obj[0].tiling_flags == 0) 284 tex_res.tile_mode = 1; 285 r600_set_tex_resource(pScrn, accel_state->ib, &tex_res, accel_state->src_obj[0].domain); 286 287 /* Y sampler */ 288 tex_samp.id = 0; 289 tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL; 290 tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL; 291 tex_samp.clamp_z = SQ_TEX_WRAP; 292 293 /* xxx: switch to bicubic */ 294 tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_BILINEAR; 295 tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_BILINEAR; 296 297 tex_samp.z_filter = SQ_TEX_Z_FILTER_NONE; 298 tex_samp.mip_filter = 0; /* no mipmap */ 299 r600_set_tex_sampler(pScrn, accel_state->ib, &tex_samp); 300 301 /* U or V texture */ 302 tex_res.id = 1; 303 tex_res.format = FMT_8; 304 tex_res.w = accel_state->src_obj[0].width >> 1; 305 tex_res.h = accel_state->src_obj[0].height >> 1; 306 tex_res.pitch = RADEON_ALIGN(accel_state->src_obj[0].pitch >> 1, pPriv->hw_align); 307 tex_res.dst_sel_x = SQ_SEL_X; /* V or U */ 308 tex_res.dst_sel_y = SQ_SEL_1; 309 tex_res.dst_sel_z = SQ_SEL_1; 310 tex_res.dst_sel_w = SQ_SEL_1; 311 tex_res.interlaced = 0; 312 313 tex_res.base = accel_state->src_obj[0].offset + pPriv->planev_offset; 314 tex_res.mip_base = accel_state->src_obj[0].offset + pPriv->planev_offset; 315 tex_res.size = tex_res.pitch * (pPriv->h >> 1); 316 if (accel_state->src_obj[0].tiling_flags == 0) 317 tex_res.tile_mode = 1; 318 r600_set_tex_resource(pScrn, accel_state->ib, &tex_res, accel_state->src_obj[0].domain); 319 320 /* U or V sampler */ 321 tex_samp.id = 1; 322 r600_set_tex_sampler(pScrn, accel_state->ib, &tex_samp); 323 324 /* U or V texture */ 325 tex_res.id = 2; 326 tex_res.format = FMT_8; 327 tex_res.w = accel_state->src_obj[0].width >> 1; 328 tex_res.h = accel_state->src_obj[0].height >> 1; 329 tex_res.pitch = RADEON_ALIGN(accel_state->src_obj[0].pitch >> 1, pPriv->hw_align); 330 tex_res.dst_sel_x = SQ_SEL_X; /* V or U */ 331 tex_res.dst_sel_y = SQ_SEL_1; 332 tex_res.dst_sel_z = SQ_SEL_1; 333 tex_res.dst_sel_w = SQ_SEL_1; 334 tex_res.interlaced = 0; 335 336 tex_res.base = accel_state->src_obj[0].offset + pPriv->planeu_offset; 337 tex_res.mip_base = accel_state->src_obj[0].offset + pPriv->planeu_offset; 338 tex_res.size = tex_res.pitch * (pPriv->h >> 1); 339 if (accel_state->src_obj[0].tiling_flags == 0) 340 tex_res.tile_mode = 1; 341 r600_set_tex_resource(pScrn, accel_state->ib, &tex_res, accel_state->src_obj[0].domain); 342 343 /* UV sampler */ 344 tex_samp.id = 2; 345 r600_set_tex_sampler(pScrn, accel_state->ib, &tex_samp); 346 break; 347 case FOURCC_UYVY: 348 case FOURCC_YUY2: 349 default: 350 accel_state->src_size[0] = accel_state->src_obj[0].pitch * pPriv->h; 351 352 /* Y texture */ 353 tex_res.id = 0; 354 tex_res.w = accel_state->src_obj[0].width; 355 tex_res.h = accel_state->src_obj[0].height; 356 tex_res.pitch = accel_state->src_obj[0].pitch >> 1; 357 tex_res.depth = 0; 358 tex_res.dim = SQ_TEX_DIM_2D; 359 tex_res.base = accel_state->src_obj[0].offset; 360 tex_res.mip_base = accel_state->src_obj[0].offset; 361 tex_res.size = accel_state->src_size[0]; 362 tex_res.bo = accel_state->src_obj[0].bo; 363 tex_res.mip_bo = accel_state->src_obj[0].bo; 364 365 tex_res.format = FMT_8_8; 366 if (pPriv->id == FOURCC_UYVY) 367 tex_res.dst_sel_x = SQ_SEL_Y; /* Y */ 368 else 369 tex_res.dst_sel_x = SQ_SEL_X; /* Y */ 370 tex_res.dst_sel_y = SQ_SEL_1; 371 tex_res.dst_sel_z = SQ_SEL_1; 372 tex_res.dst_sel_w = SQ_SEL_1; 373 374 tex_res.request_size = 1; 375 tex_res.base_level = 0; 376 tex_res.last_level = 0; 377 tex_res.perf_modulation = 0; 378 tex_res.interlaced = 0; 379 if (accel_state->src_obj[0].tiling_flags == 0) 380 tex_res.tile_mode = 1; 381 r600_set_tex_resource(pScrn, accel_state->ib, &tex_res, accel_state->src_obj[0].domain); 382 383 /* Y sampler */ 384 tex_samp.id = 0; 385 tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL; 386 tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL; 387 tex_samp.clamp_z = SQ_TEX_WRAP; 388 389 /* xxx: switch to bicubic */ 390 tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_BILINEAR; 391 tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_BILINEAR; 392 393 tex_samp.z_filter = SQ_TEX_Z_FILTER_NONE; 394 tex_samp.mip_filter = 0; /* no mipmap */ 395 r600_set_tex_sampler(pScrn, accel_state->ib, &tex_samp); 396 397 /* UV texture */ 398 tex_res.id = 1; 399 tex_res.format = FMT_8_8_8_8; 400 tex_res.w = accel_state->src_obj[0].width >> 1; 401 tex_res.h = accel_state->src_obj[0].height; 402 tex_res.pitch = accel_state->src_obj[0].pitch >> 2; 403 if (pPriv->id == FOURCC_UYVY) { 404 tex_res.dst_sel_x = SQ_SEL_X; /* V */ 405 tex_res.dst_sel_y = SQ_SEL_Z; /* U */ 406 } else { 407 tex_res.dst_sel_x = SQ_SEL_Y; /* V */ 408 tex_res.dst_sel_y = SQ_SEL_W; /* U */ 409 } 410 tex_res.dst_sel_z = SQ_SEL_1; 411 tex_res.dst_sel_w = SQ_SEL_1; 412 tex_res.interlaced = 0; 413 414 tex_res.base = accel_state->src_obj[0].offset; 415 tex_res.mip_base = accel_state->src_obj[0].offset; 416 tex_res.size = accel_state->src_size[0]; 417 if (accel_state->src_obj[0].tiling_flags == 0) 418 tex_res.tile_mode = 1; 419 r600_set_tex_resource(pScrn, accel_state->ib, &tex_res, accel_state->src_obj[0].domain); 420 421 /* UV sampler */ 422 tex_samp.id = 1; 423 r600_set_tex_sampler(pScrn, accel_state->ib, &tex_samp); 424 break; 425 } 426 427 cb_conf.id = 0; 428 cb_conf.w = accel_state->dst_obj.pitch; 429 cb_conf.h = accel_state->dst_obj.height; 430 cb_conf.base = accel_state->dst_obj.offset; 431 cb_conf.bo = accel_state->dst_obj.bo; 432 433 switch (accel_state->dst_obj.bpp) { 434 case 16: 435 if (pPixmap->drawable.depth == 15) { 436 cb_conf.format = COLOR_1_5_5_5; 437 cb_conf.comp_swap = 1; /* ARGB */ 438 } else { 439 cb_conf.format = COLOR_5_6_5; 440 cb_conf.comp_swap = 2; /* RGB */ 441 } 442#if X_BYTE_ORDER == X_BIG_ENDIAN 443 cb_conf.endian = ENDIAN_8IN16; 444#endif 445 break; 446 case 32: 447 cb_conf.format = COLOR_8_8_8_8; 448 cb_conf.comp_swap = 1; /* ARGB */ 449#if X_BYTE_ORDER == X_BIG_ENDIAN 450 cb_conf.endian = ENDIAN_8IN32; 451#endif 452 break; 453 default: 454 return; 455 } 456 457 cb_conf.source_format = 1; 458 cb_conf.blend_clamp = 1; 459 cb_conf.pmask = 0xf; 460 cb_conf.rop = 3; 461 if (accel_state->dst_obj.tiling_flags == 0) 462 cb_conf.array_mode = 1; 463 r600_set_render_target(pScrn, accel_state->ib, &cb_conf, accel_state->dst_obj.domain); 464 465 r600_set_spi(pScrn, accel_state->ib, (1 - 1), 1); 466 467 vs_alu_consts[0] = 1.0 / pPriv->w; 468 vs_alu_consts[1] = 1.0 / pPriv->h; 469 vs_alu_consts[2] = 0.0; 470 vs_alu_consts[3] = 0.0; 471 472 /* VS alu constants */ 473 r600_set_alu_consts(pScrn, accel_state->ib, SQ_ALU_CONSTANT_vs, 474 sizeof(vs_alu_consts) / SQ_ALU_CONSTANT_offset, vs_alu_consts); 475 476 if (pPriv->vsync) { 477 xf86CrtcPtr crtc; 478 if (pPriv->desired_crtc) 479 crtc = pPriv->desired_crtc; 480 else 481 crtc = radeon_pick_best_crtc(pScrn, 482 pPriv->drw_x, 483 pPriv->drw_x + pPriv->dst_w, 484 pPriv->drw_y, 485 pPriv->drw_y + pPriv->dst_h); 486 if (crtc) 487 r600_cp_wait_vline_sync(pScrn, accel_state->ib, pPixmap, 488 crtc, 489 pPriv->drw_y - crtc->y, 490 (pPriv->drw_y - crtc->y) + pPriv->dst_h); 491 } 492 493 while (nBox--) { 494 int srcX, srcY, srcw, srch; 495 int dstX, dstY, dstw, dsth; 496 float *vb; 497 498 499 dstX = pBox->x1 + dstxoff; 500 dstY = pBox->y1 + dstyoff; 501 dstw = pBox->x2 - pBox->x1; 502 dsth = pBox->y2 - pBox->y1; 503 504 srcX = pPriv->src_x; 505 srcX += ((pBox->x1 - pPriv->drw_x) * 506 pPriv->src_w) / pPriv->dst_w; 507 srcY = pPriv->src_y; 508 srcY += ((pBox->y1 - pPriv->drw_y) * 509 pPriv->src_h) / pPriv->dst_h; 510 511 srcw = (pPriv->src_w * dstw) / pPriv->dst_w; 512 srch = (pPriv->src_h * dsth) / pPriv->dst_h; 513 514 vb = radeon_vbo_space(pScrn, &accel_state->vbo, 16); 515 516 vb[0] = (float)dstX; 517 vb[1] = (float)dstY; 518 vb[2] = (float)srcX; 519 vb[3] = (float)srcY; 520 521 vb[4] = (float)dstX; 522 vb[5] = (float)(dstY + dsth); 523 vb[6] = (float)srcX; 524 vb[7] = (float)(srcY + srch); 525 526 vb[8] = (float)(dstX + dstw); 527 vb[9] = (float)(dstY + dsth); 528 vb[10] = (float)(srcX + srcw); 529 vb[11] = (float)(srcY + srch); 530 531 radeon_vbo_commit(pScrn, &accel_state->vbo); 532 533 pBox++; 534 } 535 536 r600_finish_op(pScrn, 16); 537 538 DamageDamageRegion(pPriv->pDraw, &pPriv->clip); 539} 540