[PATCH 6/8] d3d10core/tests: Add test for ClearDepthStencilView().

Józef Kucia joseph.kucia at gmail.com
Mon Mar 14 08:34:34 CDT 2016


On Mon, Mar 14, 2016 at 1:41 PM, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 14 March 2016 at 00:03, Józef Kucia <jkucia at 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.



More information about the wine-devel mailing list