There seems to be a good amount of overlap between this test and test_texture(). Would it make sense to merge them? Also, I assume you'll add a d3d10core version of the test as well?
On 1 January 2016 at 18:08, Józef Kucia jkucia@codeweavers.com wrote:
- float miplevel[4] = {0};
A struct vec4 would perhaps be more appropriate. IIRC MSVC gets a bit unhappy about initializing floating-point variables with anything other than floating-point constants, so it would perhaps be better to use 0.0f here. However, ...
- buffer_desc.ByteWidth = sizeof(miplevel);
- buffer_desc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
- resource_data[0].pSysMem = &miplevel;
- hr = ID3D11Device_CreateBuffer(device, &buffer_desc, resource_data, &cb);
- ok(SUCCEEDED(hr), "Failed to create constant buffer, hr %#x.\n", hr);
...
*miplevel = test->miplevel;
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, miplevel, 0, 0);
... I don't think you should need to pass in initial data in the first place.