I managed to track this down quite a lot, but I don't know how to make any further progress debugging this. This is the C++ code that reproduces the problem:
And it renders like this on my Mac with Intel UHD Graphics 630:
Note the second square has the topmost row of pixels cut (yellow) and it displays a bottom row of pixels (cyan) that is outside of the 32x32 region specified as src coordinates. This only happens when the blitting to a position ending in .50, so it looks like a rounding problem somewhere.
This DOES NOT happen in the X axis, doesn't happen if rendering directly to the screen (without an intermediate render-to-texture) and doesn't happen if the dest position is any number not ending in exactly .50...
Can anyone try the above code and let me know if this is a problem with my hardware, or an actual bug in SDL_gpu? I'm quite lost here.
Hey @albertvaka, it's happening for me too. I'm on a 2019 Macbook Pro with Catalina 10.15.3 and it has two GPUs, but it's set to always use the AMD Radeon Pro 5500M.
I managed to track this down quite a lot, but I don't know how to make any further progress debugging this. This is the C++ code that reproduces the problem:
Where
redsquare.png
is the following image:And it renders like this on my Mac with Intel UHD Graphics 630:
Note the second square has the topmost row of pixels cut (yellow) and it displays a bottom row of pixels (cyan) that is outside of the 32x32 region specified as src coordinates. This only happens when the blitting to a position ending in
.50
, so it looks like a rounding problem somewhere.This DOES NOT happen in the X axis, doesn't happen if rendering directly to the screen (without an intermediate render-to-texture) and doesn't happen if the dest position is any number not ending in exactly
.50
...Can anyone try the above code and let me know if this is a problem with my hardware, or an actual bug in SDL_gpu? I'm quite lost here.