On 28 April 2010 14:29, Roderick Colenbrander <thunderbird2k(a)gmail.com> wrote:
> + /* Early sort out of cases where no render target is used */
> + if (!dstSwapchain && !srcSwapchain
> + && src_surface != device->render_targets[0]
> + && dst_surface != device->render_targets[0])
> + {
> + if (fbo_blit_supported(&device->adapter->gl_info, BLIT_OP_BLIT,
> + &src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format_desc,
> + &dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format_desc))
> + {
> + stretch_rect_fbo(device, src_surface, &src_rect, dst_surface, &dst_rect, Filter);
> + return WINED3D_OK;
> + }
> +
> + TRACE("No surface is render target, not using hardware blit.\n");
> + return WINED3DERR_INVALIDCALL;
> + }
> +
You might as well try FBO blits first, before doing most of the other
checks. That's how it's eventually supposed to work anyway, and you
could remove the other strecth_rect_fbo() calls in that case. That
does depend on fbo_blit_supported() working properly, of course.