mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
intel: Add support for blitting 6 byte-per-pixel formats.
The next commit introduces what is apparently our first one, which tripped over this in glReadPixels. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
028c11e8e3
commit
645b610b62
1 changed files with 14 additions and 7 deletions
|
|
@ -151,15 +151,22 @@ intelEmitCopyBlit(struct intel_context *intel,
|
|||
if (src_pitch % 4 != 0 || dst_pitch % 4 != 0)
|
||||
return false;
|
||||
|
||||
/* For big formats (such as floating point), do the copy using 32bpp and
|
||||
* multiply the coordinates.
|
||||
/* For big formats (such as floating point), do the copy using 16 or 32bpp
|
||||
* and multiply the coordinates.
|
||||
*/
|
||||
if (cpp > 4) {
|
||||
assert(cpp % 4 == 0);
|
||||
dst_x *= cpp / 4;
|
||||
dst_x2 *= cpp / 4;
|
||||
src_x *= cpp / 4;
|
||||
cpp = 4;
|
||||
if (cpp % 4 == 2) {
|
||||
dst_x *= cpp / 2;
|
||||
dst_x2 *= cpp / 2;
|
||||
src_x *= cpp / 2;
|
||||
cpp = 2;
|
||||
} else {
|
||||
assert(cpp % 4 == 0);
|
||||
dst_x *= cpp / 4;
|
||||
dst_x2 *= cpp / 4;
|
||||
src_x *= cpp / 4;
|
||||
cpp = 4;
|
||||
}
|
||||
}
|
||||
|
||||
BR13 = br13_for_cpp(cpp) | translate_raster_op(logic_op) << 16;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue