Commit dfe8b779 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Abort on invalid instructions in shader_get_registers_used().

parent df6540ed
......@@ -2429,7 +2429,7 @@ static void test_unsupported_shaders(void)
hr = IDirect3DDevice9Ex_CreatePixelShader(device, ps_3_224, &ps);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9Ex_CreatePixelShader(device, ps_2_0_boolint, &ps);
todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
if (ps)
IDirect3DPixelShader9_Release(ps);
......
......@@ -6528,7 +6528,7 @@ float4 main(const float4 color : COLOR) : SV_TARGET
hr = IDirect3DDevice9_CreatePixelShader(device, ps_3_224, &ps);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_CreatePixelShader(device, ps_2_0_boolint, &ps);
todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
if (ps)
IDirect3DPixelShader9_Release(ps);
......
......@@ -933,8 +933,8 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
/* Unhandled opcode, and its parameters. */
if (ins.handler_idx == WINED3DSIH_TABLE_SIZE)
{
TRACE("Skipping unrecognized instruction.\n");
continue;
WARN("Encountered unrecognised or invalid instruction.\n");
return WINED3DERR_INVALIDCALL;
}
/* Handle declarations. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment