|
|
|
|
|
|
|
|
dest, x, y, w, h, pixpitch, color); |
|
|
dest, x, y, w, h, pixpitch, color); |
|
|
|
|
|
|
|
|
/* Fallback? */ |
|
|
/* Fallback? */ |
|
|
if (FALSE) { |
|
|
|
|
|
|
|
|
if (!pipe->screen->is_format_supported(pipe->screen, dest->format, |
|
|
|
|
|
PIPE_TEXTURE_2D, PIPE_TEXTURE_USAGE_RENDER_TARGET, 0)) { |
|
|
fallback: |
|
|
fallback: |
|
|
debug_printf("r300: Falling back on surface clear..."); |
|
|
|
|
|
|
|
|
debug_printf("r300: Falling back on surface clear...\n"); |
|
|
util_surface_fill(pipe, dest, x, y, w, h, color); |
|
|
util_surface_fill(pipe, dest, x, y, w, h, color); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ((srctex->buffer == desttex->buffer) && |
|
|
if ((srctex->buffer == desttex->buffer) && |
|
|
((destx < srcx + w) || (srcx < destx + w)) && |
|
|
((destx < srcx + w) || (srcx < destx + w)) && |
|
|
((desty < srcy + h) || (srcy < desty + h))) { |
|
|
((desty < srcy + h) || (srcy < desty + h))) { |
|
|
|
|
|
goto fallback; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!pipe->screen->is_format_supported(pipe->screen, src->format, |
|
|
|
|
|
PIPE_TEXTURE_2D, PIPE_TEXTURE_USAGE_SAMPLER, 0) || |
|
|
|
|
|
!pipe->screen->is_format_supported(pipe->screen, dest->format, |
|
|
|
|
|
PIPE_TEXTURE_2D, PIPE_TEXTURE_USAGE_RENDER_TARGET, 0)) { |
|
|
fallback: |
|
|
fallback: |
|
|
debug_printf("r300: Falling back on surface_copy\n"); |
|
|
debug_printf("r300: Falling back on surface_copy\n"); |
|
|
util_surface_copy(pipe, FALSE, dest, destx, desty, src, |
|
|
util_surface_copy(pipe, FALSE, dest, destx, desty, src, |
|
|
srcx, srcy, w, h); |
|
|
srcx, srcy, w, h); |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* Add our target BOs to the list. */ |
|
|
/* Add our target BOs to the list. */ |