mesa/st: use compute pbo download for readpixels
this massively improves (>100%) ReadPixels perf in a number of cases Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29841>
This commit is contained in:

committed by
Marge Bot

parent
ef0a156670
commit
6f8e6fb99c
@@ -435,6 +435,9 @@ st_ReadPixels(struct gl_context *ctx, GLint x, GLint y,
|
||||
st_validate_state(st, ST_PIPELINE_UPDATE_FB_STATE_MASK);
|
||||
st_flush_bitmap_cache(st);
|
||||
|
||||
if (rb->TexImage && st->force_compute_based_texture_transfer)
|
||||
goto fallback;
|
||||
|
||||
if (!st->prefer_blit_based_texture_transfer) {
|
||||
goto fallback;
|
||||
}
|
||||
@@ -565,5 +568,9 @@ st_ReadPixels(struct gl_context *ctx, GLint x, GLint y,
|
||||
return;
|
||||
|
||||
fallback:
|
||||
if (rb->TexImage && (st->allow_compute_based_texture_transfer || st->force_compute_based_texture_transfer)) {
|
||||
if (st_GetTexSubImage_shader(ctx, x, y, 0, width, height, 1, format, type, pixels, rb->TexImage))
|
||||
return;
|
||||
}
|
||||
_mesa_readpixels(ctx, x, y, width, height, format, type, pack, pixels);
|
||||
}
|
||||
|
Reference in New Issue
Block a user