Commit bd2abd84 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3d10/effect: Make it clear that buffers are always set one by one.

parent 4ded5f42
......@@ -659,6 +659,12 @@ static HRESULT get_fx10_shader_resources(struct d3d10_effect_variable *v, const
{
case D3D10_SIT_CBUFFER:
case D3D10_SIT_TBUFFER:
if (sr->bind_count != 1)
{
WARN("Unexpected bind count %u for a buffer %s.\n", bind_desc.BindCount,
debugstr_a(bind_desc.Name));
return E_UNEXPECTED;
}
sr->variable = d3d10_effect_get_buffer_by_name(v->effect, bind_desc.Name);
break;
......@@ -4019,17 +4025,17 @@ static void apply_shader_resources(ID3D10Device *device, struct ID3D10EffectShad
switch (v->type->basetype)
{
case D3D10_SVT_VERTEXSHADER:
ID3D10Device_VSSetConstantBuffers(device, sr->bind_point, sr->bind_count,
ID3D10Device_VSSetConstantBuffers(device, sr->bind_point, 1,
&rsrc_v->u.buffer.buffer);
break;
case D3D10_SVT_PIXELSHADER:
ID3D10Device_PSSetConstantBuffers(device, sr->bind_point, sr->bind_count,
ID3D10Device_PSSetConstantBuffers(device, sr->bind_point, 1,
&rsrc_v->u.buffer.buffer);
break;
case D3D10_SVT_GEOMETRYSHADER:
ID3D10Device_GSSetConstantBuffers(device, sr->bind_point, sr->bind_count,
ID3D10Device_GSSetConstantBuffers(device, sr->bind_point, 1,
&rsrc_v->u.buffer.buffer);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment