[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    [PATCH v5 3/5] d3d10: Implement vector effect variable set methods.
From:       Connor McAdams <conmanx360 () gmail ! com>
Date:       2020-02-28 18:51:46
Message-ID: 20200228185148.11383-3-conmanx360 () gmail ! com
[Download RAW message or body]

Implement SetFloatVector/SetFloatVectorArray,
SetIntVector/SetIntVectorArray, and SetBoolVector/SetBoolVectorArray
methods for the vector effect variable interface.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
---
 dlls/d3d10/effect.c | 47 +++++++++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 12 deletions(-)

diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
index 182ba12004..1fbcc632e2 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -4731,6 +4731,11 @@ static const struct ID3D10EffectScalarVariableVtbl \
d3d10_effect_scalar_variable_  
 /* ID3D10EffectVariable methods */
 
+static inline struct d3d10_effect_variable \
*impl_from_ID3D10EffectVectorVariable(ID3D10EffectVectorVariable *iface) +{
+    return CONTAINING_RECORD(iface, struct d3d10_effect_variable, \
ID3D10EffectVariable_iface); +}
+
 static BOOL STDMETHODCALLTYPE \
d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable *iface)  {
     TRACE("iface %p\n", iface);
@@ -4887,25 +4892,34 @@ static HRESULT STDMETHODCALLTYPE \
d3d10_effect_vector_variable_GetRawValue(ID3D10  static HRESULT STDMETHODCALLTYPE \
d3d10_effect_vector_variable_SetBoolVector(ID3D10EffectVectorVariable *iface,  BOOL \
*value)  {
-    FIXME("iface %p, value %p stub!\n", iface, value);
+    struct d3d10_effect_variable *effect_var = \
impl_from_ID3D10EffectVectorVariable(iface);  
-    return E_NOTIMPL;
+    TRACE("iface %p, value %p.\n", iface, value);
+    write_variable_to_buffer(effect_var, value, D3D10_SVT_BOOL);
+
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE \
d3d10_effect_vector_variable_SetIntVector(ID3D10EffectVectorVariable *iface,  int \
*value)  {
-    FIXME("iface %p, value %p stub!\n", iface, value);
+    struct d3d10_effect_variable *effect_var = \
impl_from_ID3D10EffectVectorVariable(iface);  
-    return E_NOTIMPL;
+    TRACE("iface %p, value %p.\n", iface, value);
+    write_variable_to_buffer(effect_var, value, D3D10_SVT_INT);
+
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE \
d3d10_effect_vector_variable_SetFloatVector(ID3D10EffectVectorVariable *iface,  float \
*value)  {
-    FIXME("iface %p, value %p stub!\n", iface, value);
+    struct d3d10_effect_variable *effect_var = \
impl_from_ID3D10EffectVectorVariable(iface);  
-    return E_NOTIMPL;
+    TRACE("iface %p, value %p.\n", iface, value);
+    write_variable_to_buffer(effect_var, value, D3D10_SVT_FLOAT);
+
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE \
d3d10_effect_vector_variable_GetBoolVector(ID3D10EffectVectorVariable *iface, @@ \
-4935,25 +4949,34 @@ static HRESULT STDMETHODCALLTYPE \
d3d10_effect_vector_variable_GetFloatVector(ID3  static HRESULT STDMETHODCALLTYPE \
d3d10_effect_vector_variable_SetBoolVectorArray(ID3D10EffectVectorVariable *iface,  \
BOOL *values, UINT offset, UINT count)  {
-    FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, \
count); +    struct d3d10_effect_variable *effect_var = \
impl_from_ID3D10EffectVectorVariable(iface);  
-    return E_NOTIMPL;
+    TRACE("iface %p, values %p, offset %u, count %u.\n", iface, values, offset, \
count); +    write_variable_array_to_buffer(effect_var, values, D3D10_SVT_BOOL, \
offset, count); +
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE \
d3d10_effect_vector_variable_SetIntVectorArray(ID3D10EffectVectorVariable *iface,  \
int *values, UINT offset, UINT count)  {
-    FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, \
count); +    struct d3d10_effect_variable *effect_var = \
impl_from_ID3D10EffectVectorVariable(iface);  
-    return E_NOTIMPL;
+    TRACE("iface %p, values %p, offset %u, count %u.\n", iface, values, offset, \
count); +    write_variable_array_to_buffer(effect_var, values, D3D10_SVT_INT, \
offset, count); +
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE \
d3d10_effect_vector_variable_SetFloatVectorArray(ID3D10EffectVectorVariable *iface,  \
float *values, UINT offset, UINT count)  {
-    FIXME("iface %p, values %p, offset %u, count %u stub!\n", iface, values, offset, \
count); +    struct d3d10_effect_variable *effect_var = \
impl_from_ID3D10EffectVectorVariable(iface);  
-    return E_NOTIMPL;
+    TRACE("iface %p, values %p, offset %u, count %u.\n", iface, values, offset, \
count); +    write_variable_array_to_buffer(effect_var, values, D3D10_SVT_FLOAT, \
offset, count); +
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE \
                d3d10_effect_vector_variable_GetBoolVectorArray(ID3D10EffectVectorVariable \
                *iface,
-- 
2.20.1


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic