WIP: intel: Fix/108088: fbo blit limits

Open Sergii Romantsov requested to merge GL/mesa:fix/108088_fbo_blit_limits into main

Fix is based on MR !551 (so MR 551 has to be accepted firstly)

Blorp blitting uses floats for better precision. But still its not enough for some tests. This series avoids usage of floats in API. Instead integers are used. Precision is saved as for doubles: introduced new parameter scale that significantly affects precision. That helps for many test do not fail with integers.

Avoided blitting 0-sized sources or destinations. Additionaly it may cause segfaults for i965.

Usage of position on boundary limits may cause invalid blitting or segfaults. Assume that a size of framebuffer is 160*160 We have a read-buffer and write-buffer. In general: reading of pixels of any region-size and writing them into region-size that greater or equal to 160 should give us the same results (whole area of write-buffer should be filled by color of read-buffer). That is satisfied except we are using some big pixel-values (dstX1, dstY1) starting from 0x7ffffff. I haven't found any restrictions in minimum/maximum values for parameters (dstX0, dstY0) and (dstX1, dstY1), they are integers so looks like they could be any valid integer.

Added handling of cases when one of source or destination rectangles are significantly greater than other. Additionally is handled cases with INT_MIN.

CI passed for i965, anv and iris: https://mesa-ci.01.org/global_logic/builds/130/group/63a9f0ea7bb98050796b649e85481845

Edited by Jordan Justen

Merge request reports