14 Mar
2016
14 Mar
'16
1:34 p.m.
On Mon, Mar 14, 2016 at 1:41 PM, Henri Verbeet <hverbeet(a)gmail.com> wrote:
On 14 March 2016 at 00:03, Józef Kucia <jkucia(a)codeweavers.com> wrote:
+static float get_readback_float(struct texture_readback *rb, unsigned int x, unsigned int y) +{ + return rb->texture + ? ((float *)rb->mapped_texture.pData)[rb->mapped_texture.RowPitch * y / sizeof(float) + x] : NAN; +} Can the texture ever legitimately be NULL?
It can be NULL only when get_texture_readback() fails, in which case a test will fail anyway. It's inspired by surface_readback from d3d9 tests (which fails gracefully). So yeah, I should drop NULL check and don't introduce NAN unnecessarily.