mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests/shader-runner: Pass uniforms to vertex shaders in d3d9 and d3d11.
This commit is contained in:
parent
1690b0b554
commit
fda08de61d
Notes:
Alexandre Julliard
2024-03-11 23:06:28 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/694
@ -620,6 +620,7 @@ static bool d3d11_runner_draw(struct shader_runner *r,
|
|||||||
{
|
{
|
||||||
cb = create_buffer(device, D3D11_BIND_CONSTANT_BUFFER,
|
cb = create_buffer(device, D3D11_BIND_CONSTANT_BUFFER,
|
||||||
runner->r.uniform_count * sizeof(*runner->r.uniforms), 0, runner->r.uniforms);
|
runner->r.uniform_count * sizeof(*runner->r.uniforms), 0, runner->r.uniforms);
|
||||||
|
ID3D11DeviceContext_VSSetConstantBuffers(context, 0, 1, &cb);
|
||||||
ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &cb);
|
ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,6 +345,10 @@ static bool d3d9_runner_draw(struct shader_runner *r,
|
|||||||
|
|
||||||
if (runner->r.uniform_count)
|
if (runner->r.uniform_count)
|
||||||
{
|
{
|
||||||
|
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0,
|
||||||
|
(const float *)runner->r.uniforms, runner->r.uniform_count / 4);
|
||||||
|
ok(hr == D3D_OK, "Failed to set uniforms, hr %#lx.\n", hr);
|
||||||
|
|
||||||
hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 0,
|
hr = IDirect3DDevice9_SetPixelShaderConstantF(device, 0,
|
||||||
(const float *)runner->r.uniforms, runner->r.uniform_count / 4);
|
(const float *)runner->r.uniforms, runner->r.uniform_count / 4);
|
||||||
ok(hr == D3D_OK, "Failed to set uniforms, hr %#lx.\n", hr);
|
ok(hr == D3D_OK, "Failed to set uniforms, hr %#lx.\n", hr);
|
||||||
|
Loading…
Reference in New Issue
Block a user