Closed GoogleCodeExporter closed 9 years ago
Are you, by any chance, trying to set an array of bools? That's a known issue
that
we're working on. Otherwise, it's something new.
Original comment by Mike.Popoloski
on 18 Sep 2008 at 7:21
I'm setting an array of Vector4.
:P
Original comment by bool...@gmail.com
on 18 Sep 2008 at 7:26
Can you give us more information? What exactly is going wrong? Are you getting
an
exception?
Original comment by Mike.Popoloski
on 18 Sep 2008 at 7:58
Here is a sketch of what is happening.
I've omitted the obvious code and am showing you the key sequence that produces
the
crash.
Vector4[] myTempV4 = new Vector4[MaxNumberLights];
EffectHandle eh0 = myEffect.GetParameter(null, "LightDirArray");
...
_effect.SetValue( eh0, myTempV4 );
...
BaseEffect::SetValue( EffectHandle^ parameter, array<T>^ values )
...
InternalPointer->SetValue( handle, pinnedData, sizeof(T) * values->Length );
!! thows a
D3DERR_INVALIDCALL: Invalid call (0x8876086c )
..
I hope this illustrates the problem for you. If you want me to put together a
unit
test it might take me a bit longer.
:P
Original comment by bool...@gmail.com
on 18 Sep 2008 at 8:31
Could you try using the debug runtimes and see if you get any other information
out
of them? I say this because the included sample game Asteroids makes use of
SetValue
with an array of Vector4's and it works perfectly.
Original comment by Mike.Popoloski
on 19 Sep 2008 at 3:32
[deleted comment]
Using the Asteroid example I'm able to get the same error that I'm seeing in my
project. If you set MaxInstance in VectorModel.cs to a number lower than 20
(the max
number set in the shader code) then it will throw the same exception. I have a
varying amount of vectors that will be set and I'm creating the arrays
dynamically.
Since the array will be equal to or smaller than the maximum size allowed is
there
any reason that this should not work?
:Patrick
Original comment by bool...@gmail.com
on 19 Sep 2008 at 9:08
We're checking with the DX team to see if this is a bug in SetValue. In the mean
time, I would suggest you simply use a properly sized array and fill the extra
members with garbage.
Original comment by Mike.Popoloski
on 27 Sep 2008 at 4:16
OK, I believe this issue has been fixed.
Original comment by Mike.Popoloski
on 6 Nov 2008 at 11:07
Original issue reported on code.google.com by
bool...@gmail.com
on 18 Sep 2008 at 7:14