On Tue Jun 10 10:01:40 2025 +0000, Nikolay Sivov wrote:
Important thing this isn't testing is using such bitmaps for rendering. If 2DArray should work, we should have a test for e.g. 3 elements initialized to different color, and used with DrawBitmap(). This would be a short test.
I added tests for rendering such bitmaps. The results are a bit strange.
On Windows, DrawBitmap() with such bitmaps created from CreateBitmapFromDxgiSurface() with subresource surfaces renders black. For example, see [draw_bitmap_from_dxgi_surface.txt](/uploads/da66fbd5c8ff33486fd63b38ac25b2d1/draw_bitmap_from_dxgi_surface.txt). DrawBitmap() with such bitmaps created from CreateSharedBitmap() with subresource surfaces does work on Windows. So, CreateBitmapFromDxgiSurface() on Windows doesn't create an SRV?
On Wine, DrawBitmap() with bitmaps created from subresource surfaces with more than one subresource doesn't work. The color channels are all black. It looks like DrawBitmap() failed somehow. I checked d2d_resource_get_srv_desc(), and it seems fine. Thus, the problem must lie somewhere else. I've marked the rendering tests as todo_wine for now.