[PATCH v4 4/6] d3d11/tests: Add tests for 2D texture RTVs.
Henri Verbeet
hverbeet at gmail.com
Tue Apr 26 05:21:02 CDT 2016
On 25 April 2016 at 12:25, Józef Kucia <jkucia at codeweavers.com> wrote:
> + hr = ID3D11Device_CreateBuffer(device, &buffer_desc, NULL, &context->ps_cb);
> + ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create constant buffer, hr %#x.\n", hr);
> + }
> +
> + ID3D11DeviceContext_PSSetShader(context->immediate_context, context->ps, NULL, 0);
> + ID3D11DeviceContext_PSSetConstantBuffers(context->immediate_context, 0, 1, &context->ps_cb);
> +
> + ID3D11DeviceContext_UpdateSubresource(context->immediate_context, (ID3D11Resource *)context->ps_cb, 0,
> + NULL, color, 0, 0);
There isn't anything wrong with doing it like this, but note that you
could also specify the initial contents when creating the buffer.
More information about the wine-devel
mailing list