Re: [PATCH v4 4/6] d3d11/tests: Add tests for 2D texture RTVs.
April 26, 2016
10:21 a.m.
On 25 April 2016 at 12:25, Józef Kucia <jkucia(a)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.
3622
Age (days ago)
3622
Last active (days ago)
0 comments
1 participants
participants (1)
-
Henri Verbeet