From: Zebediah Figura zfigura@codeweavers.com
There is no need to make the tests less restrictive in these cases. --- dlls/d3dx10_43/tests/d3dx10.c | 58 +++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-)
diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c index 78b615ffe25..4a54072151f 100644 --- a/dlls/d3dx10_43/tests/d3dx10.c +++ b/dlls/d3dx10_43/tests/d3dx10.c @@ -1721,7 +1721,7 @@ float4 main(float4 color : COLOR) : SV_TARGET for (i = 0; i < D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT; ++i) { hr = ID3D10Device_CreateBuffer(device, &buffer_desc, NULL, &cb[i]); - ok(SUCCEEDED(hr), "Failed to create buffer, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
buffer_desc.BindFlags = D3D10_BIND_VERTEX_BUFFER | D3D10_BIND_INDEX_BUFFER | D3D10_BIND_SHADER_RESOURCE; @@ -1729,7 +1729,7 @@ float4 main(float4 color : COLOR) : SV_TARGET for (i = 0; i < D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT; ++i) { hr = ID3D10Device_CreateBuffer(device, &buffer_desc, NULL, &buffer[i]); - ok(SUCCEEDED(hr), "Failed to create buffer, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
stride[i] = (i + 1) * 4; offset[i] = (i + 1) * 16; @@ -1740,7 +1740,7 @@ float4 main(float4 color : COLOR) : SV_TARGET for (i = 0; i < D3D10_SO_BUFFER_SLOT_COUNT; ++i) { hr = ID3D10Device_CreateBuffer(device, &buffer_desc, NULL, &so_buffer[i]); - ok(SUCCEEDED(hr), "Failed to create buffer, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
srv_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; @@ -1752,7 +1752,7 @@ float4 main(float4 color : COLOR) : SV_TARGET { hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)buffer[i % D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT], &srv_desc, &srv[i]); - ok(SUCCEEDED(hr), "Failed to create shader resource view, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
sampler_desc.Filter = D3D10_FILTER_MIN_MAG_MIP_LINEAR; @@ -1774,21 +1774,21 @@ float4 main(float4 color : COLOR) : SV_TARGET sampler_desc.MinLOD = (float)i;
hr = ID3D10Device_CreateSamplerState(device, &sampler_desc, &sampler[i]); - ok(SUCCEEDED(hr), "Failed to create sampler state, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
hr = ID3D10Device_CreateVertexShader(device, simple_vs, sizeof(simple_vs), &vs); - ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ID3D10Device_CreateGeometryShader(device, simple_gs, sizeof(simple_gs), &gs); - ok(SUCCEEDED(hr), "Failed to create geometry shader, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ID3D10Device_CreatePixelShader(device, simple_ps, sizeof(simple_ps), &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), simple_vs, sizeof(simple_vs), &input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
blend_desc.AlphaToCoverageEnable = FALSE; blend_desc.BlendEnable[0] = FALSE; @@ -1815,7 +1815,7 @@ float4 main(float4 color : COLOR) : SV_TARGET blend_desc.RenderTargetWriteMask[7] = D3D10_COLOR_WRITE_ENABLE_ALL;
hr = ID3D10Device_CreateBlendState(device, &blend_desc, &blend_state); - ok(SUCCEEDED(hr), "Failed to create blend state, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ds_desc.DepthEnable = TRUE; ds_desc.DepthWriteMask = D3D10_DEPTH_WRITE_MASK_ALL; @@ -1833,7 +1833,7 @@ float4 main(float4 color : COLOR) : SV_TARGET ds_desc.BackFace.StencilFunc = D3D10_COMPARISON_ALWAYS;
hr = ID3D10Device_CreateDepthStencilState(device, &ds_desc, &ds_state); - ok(SUCCEEDED(hr), "Failed to create depthstencil state, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
texture_desc.Width = 512; texture_desc.Height = 512; @@ -1850,23 +1850,23 @@ float4 main(float4 color : COLOR) : SV_TARGET for (i = 0; i < D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i) { hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &rt_texture[i]); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
texture_desc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT; texture_desc.BindFlags = D3D10_BIND_DEPTH_STENCIL;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &ds_texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i) { hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)rt_texture[i], NULL, &rtv[i]); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)ds_texture, NULL, &dsv); - ok(SUCCEEDED(hr), "Failed to create depthstencil view, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE; ++i) { @@ -1892,13 +1892,13 @@ float4 main(float4 color : COLOR) : SV_TARGET rs_desc.AntialiasedLineEnable = FALSE;
hr = ID3D10Device_CreateRasterizerState(device, &rs_desc, &rs_state); - ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
predicate_desc.Query = D3D10_QUERY_OCCLUSION_PREDICATE; predicate_desc.MiscFlags = 0;
hr = ID3D10Device_CreatePredicate(device, &predicate_desc, &predicate); - ok(SUCCEEDED(hr), "Failed to create predicate, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ID3D10Device_VSSetConstantBuffers(device, 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, cb); ID3D10Device_VSSetShaderResources(device, 0, D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT, srv); @@ -1937,7 +1937,7 @@ float4 main(float4 color : COLOR) : SV_TARGET ID3D10Device_SetPredication(device, predicate, TRUE);
hr = D3DX10UnsetAllDeviceObjects(device); - ok(SUCCEEDED(hr), "D3DX10UnsetAllDeviceObjects() failed, %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ID3D10Device_VSGetConstantBuffers(device, 0, D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT, tmp_buffer); for (i = 0; i < D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT; ++i) @@ -2204,7 +2204,7 @@ static void test_D3DX10CreateAsyncFileLoader(void) create_file(test_filename, test_data1, sizeof(test_data1), path);
hr = D3DX10CreateAsyncFileLoaderW(path, &loader); - ok(SUCCEEDED(hr), "Failed to create file loader, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = delete_file(test_filename); ok(ret, "DeleteFile() failed, ret %d, error %ld.\n", ret, GetLastError()); @@ -2216,11 +2216,11 @@ static void test_D3DX10CreateAsyncFileLoader(void) /* Create it again. */ create_file(test_filename, test_data1, sizeof(test_data1), NULL); hr = ID3DX10DataLoader_Load(loader); - ok(SUCCEEDED(hr), "Load() failed, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Already loaded. */ hr = ID3DX10DataLoader_Load(loader); - ok(SUCCEEDED(hr), "Load() failed, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = delete_file(test_filename); ok(ret, "DeleteFile() failed, ret %d, error %ld.\n", ret, GetLastError()); @@ -2232,7 +2232,7 @@ static void test_D3DX10CreateAsyncFileLoader(void) /* Decompress still works. */ ptr = NULL; hr = ID3DX10DataLoader_Decompress(loader, &ptr, &size); - ok(SUCCEEDED(hr), "Decompress() failed, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ptr != NULL, "Got unexpected ptr %p.\n", ptr); ok(size == sizeof(test_data1), "Got unexpected decompressed size.\n"); if (size == sizeof(test_data1)) @@ -2242,18 +2242,18 @@ static void test_D3DX10CreateAsyncFileLoader(void) create_file(test_filename, test_data2, sizeof(test_data2), NULL);
hr = ID3DX10DataLoader_Load(loader); - ok(SUCCEEDED(hr), "Load() failed, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ptr = NULL; hr = ID3DX10DataLoader_Decompress(loader, &ptr, &size); - ok(SUCCEEDED(hr), "Decompress() failed, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ptr != NULL, "Got unexpected ptr %p.\n", ptr); ok(size == sizeof(test_data2), "Got unexpected decompressed size.\n"); if (size == sizeof(test_data2)) ok(!memcmp(ptr, test_data2, size), "Got unexpected file data.\n");
hr = ID3DX10DataLoader_Destroy(loader); - ok(SUCCEEDED(hr), "Destroy() failed, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = delete_file(test_filename); ok(ret, "DeleteFile() failed, ret %d, error %ld.\n", ret, GetLastError()); @@ -4173,16 +4173,16 @@ static void test_sprite(void) texture_desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture1); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &texture2); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture1, NULL, &srv1); - ok(SUCCEEDED(hr), "Failed to create srv, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ID3D10Device_CreateShaderResourceView(device, (ID3D10Resource *)texture1, NULL, &srv2); - ok(SUCCEEDED(hr), "Failed to create srv, hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = D3DX10CreateSprite(device, 0, NULL); ok(hr == D3DERR_INVALIDCALL, "Unexpected hr %#lx.\n", hr);