On Thu, Sep 9, 2021 at 7:58 AM Nikolay Sivov <nsivov(a)codeweavers.com> wrote:
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d3d10/effect.c | 23 ++++++++++++----------- dlls/d3d10/tests/effect.c | 36 ++++++++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 21 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index f8e7674ae1a..4807136f670 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -2045,6 +2045,9 @@ static HRESULT parse_fx10_numeric_variable(const char *data, size_t data_size, return hr; }
+ if (v->flag & D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT) + v->explicit_bind_point = v->buffer_offset; + return S_OK; }
@@ -3967,7 +3970,7 @@ static struct ID3D10EffectType * STDMETHODCALLTYPE d3d10_effect_variable_GetType static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_GetDesc(ID3D10EffectVariable *iface, D3D10_EFFECT_VARIABLE_DESC *desc) { - struct d3d10_effect_variable *This = impl_from_ID3D10EffectVariable(iface); + struct d3d10_effect_variable *v = impl_from_ID3D10EffectVariable(iface);
TRACE("iface %p, desc %p\n", iface, desc);
@@ -3985,16 +3988,14 @@ static HRESULT STDMETHODCALLTYPE d3d10_effect_variable_GetDesc(ID3D10EffectVaria
/* FIXME: This isn't correct. Anonymous shaders let desc->ExplicitBindPoint untouched, but normal shaders set it! */ memset(desc, 0, sizeof(*desc)); - desc->Name = This->name; - desc->Semantic = This->semantic; - desc->Flags = This->flag; - desc->Annotations = This->annotation_count; - desc->BufferOffset = This->buffer_offset; - - if (This->flag & D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT) - { - desc->ExplicitBindPoint = This->buffer_offset; - } + desc->Name = v->name; + desc->Semantic = v->semantic; + desc->Flags = v->flag; + desc->Annotations = v->annotation_count; + desc->BufferOffset = v->buffer_offset; + + if (v->flag & D3D10_EFFECT_VARIABLE_EXPLICIT_BIND_POINT) + desc->ExplicitBindPoint = v->explicit_bind_point;
return S_OK; }
Incidentally, what is that FIXME at the top of the hunk? Any idea what's trying to say?