- Timestamp:
- Oct 29, 2019 10:34:03 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/3D/mesa/mesa-17.3.9/src/gallium/state_trackers/nine/nine_state.c
r79768 r81576 1351 1351 blit.scissor_enable = FALSE; 1352 1352 1353 #ifdef VBOX_WITH_MESA3D_NINE_SVGA 1354 /* Flip Y because the state tracker uses the D3D texture coords: 1355 * top,left=0,0; bottom,right = 1,1. 1356 * While the blit draws a quad using the source as texture and sets 1357 * the texcoords for destination vertices using the OpenGL coordinates: 1358 * bottom,left = 0,0; top,right = 1,1. 1359 */ 1360 { 1361 struct pipe_blit_info b = blit; 1362 1363 b.dst.box.y = b.dst.resource->height0 - b.dst.box.y - b.dst.box.height; 1364 1365 b.src.box.y = b.src.resource->height0 - b.src.box.y; 1366 b.src.box.height = -b.src.box.height; 1367 1368 context->pipe->blit(context->pipe, &b); 1369 } 1370 #else 1353 1371 context->pipe->blit(context->pipe, &blit); 1372 #endif 1354 1373 } 1355 1374 … … 2499 2518 2500 2519 DBG("Clearing (%u..%u)x(%u..%u)\n", x1, x2, y1, y2); 2520 #ifdef VBOX_WITH_MESA3D_NINE_SVGA 2521 /* Flip Y because the nine state tracker uses the D3D coords: 2522 * top,left=0,0; bottom,right = 1,1. 2523 * While the clear_render_target draws a quad and sets the texcoords 2524 * for the destination vertices using the OpenGL coordinates: 2525 * bottom,left = 0,0; top,right = 1,1. 2526 */ 2527 unsigned const height = y2 - y1; 2528 y1 = cbuf->height - y1 - height; 2529 pipe->clear_render_target(pipe, cbuf, &rgba, 2530 x1, y1, x2 - x1, height, false); 2531 #else 2501 2532 pipe->clear_render_target(pipe, cbuf, &rgba, 2502 2533 x1, y1, x2 - x1, y2 - y1, false); 2534 #endif 2503 2535 } 2504 2536 } … … 2526 2558 zsbuf = NineSurface9_GetSurface(zsbuf_surf, 0); 2527 2559 assert(zsbuf); 2560 2561 #ifdef VBOX_WITH_MESA3D_NINE_SVGA 2562 /* Flip Y because the nine state tracker uses the D3D coords: 2563 * top,left=0,0; bottom,right = 1,1. 2564 * While the clear_depth_stencil draws a quad and sets the texcoords 2565 * for the destination vertices using the OpenGL coordinates: 2566 * bottom,left = 0,0; top,right = 1,1. 2567 */ 2568 unsigned const height = y2 - y1; 2569 y1 = zsbuf->height - y1 - height; 2570 pipe->clear_depth_stencil(pipe, zsbuf, bufs, Z, Stencil, 2571 x1, y1, x2 - x1, height, false); 2572 #else 2528 2573 pipe->clear_depth_stencil(pipe, zsbuf, bufs, Z, Stencil, 2529 2574 x1, y1, x2 - x1, y2 - y1, false); 2575 #endif 2530 2576 } 2531 2577 return; … … 2667 2713 (void) src; 2668 2714 2715 #ifdef VBOX_WITH_MESA3D_NINE_SVGA 2716 /* This seems to work correctly and does not require Y flip. */ 2717 #endif 2669 2718 context->pipe->resource_copy_region(context->pipe, 2670 2719 dst_res, dst_level,
Note:
See TracChangeset
for help on using the changeset viewer.