On Fri, Feb 28, 2020 at 7:52 PM Connor McAdams <conmanx360(a)gmail.com> wrote:
Implement GetFloat/GetFloatArray, GetInt/GetIntArray, and GetBool/GetBoolArray methods for the scalar effect variable interface.
Signed-off-by: Connor McAdams <conmanx360(a)gmail.com> --- dlls/d3d10/effect.c | 84 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 12 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 42311bd1fe..182ba12004 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -4345,6 +4345,48 @@ static void write_variable_array_to_buffer(struct d3d10_effect_variable *variabl variable->buffer->u.buffer.changed = TRUE; }
+static void read_variable_from_buffer(struct d3d10_effect_variable *variable, void *data, + D3D_SHADER_VARIABLE_TYPE out_type) +{ + BYTE *buf = variable->buffer->u.buffer.local_buffer + variable->buffer_offset; + + write_variable(data, out_type, buf, variable->type->basetype, + variable->type->column_count); +}
I find the variable names a bit confusing here. Maybe src / dst? Maybe it becomes clear enough after write_variable() is renamed, not sure.