d3drm: Validate that the transformation is affine in d3drm_frame3_AddTransform().
Signed-off-by: Jeff Smith <whydoubt@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c41b4c2c54
commit
5309648553
|
@ -974,6 +974,9 @@ static HRESULT WINAPI d3drm_frame3_AddTransform(IDirect3DRMFrame3 *iface,
|
|||
|
||||
TRACE("iface %p, type %#x, matrix %p.\n", iface, type, matrix);
|
||||
|
||||
if (m->_14 != 0.0f || m->_24 != 0.0f || m->_34 != 0.0f || m->_44 != 1.0f)
|
||||
return D3DRMERR_BADVALUE;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case D3DRMCOMBINE_REPLACE:
|
||||
|
|
|
@ -2821,6 +2821,10 @@ static void test_frame_transform(void)
|
|||
0.0f, 0.0f, 2.0f, 0.0f,
|
||||
3.0f, 3.0f, 3.0f, 1.0f, 1);
|
||||
|
||||
add_matrix[3][3] = 2.0f;
|
||||
hr = IDirect3DRMFrame_AddTransform(frame, D3DRMCOMBINE_REPLACE, add_matrix);
|
||||
ok(hr == D3DRMERR_BADVALUE, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
IDirect3DRMFrame_Release(frame);
|
||||
IDirect3DRM_Release(d3drm);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue