Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Effect incorrect offset #332

Closed
moshebitan opened this issue Apr 6, 2014 · 1 comment
Closed

Effect incorrect offset #332

moshebitan opened this issue Apr 6, 2014 · 1 comment
Labels

Comments

@moshebitan
Copy link

At the SharpDX.Toolkit.Graphics.Effect.cs file line 275 column 40, the offset ignores parameter.ElementCount.
This bug will cause consecutive Texture2D arrays to override each other

Code:
// Recalculate parameter resource index
if (!parameter.IsValueType)
{
parameter.Offset = resourceIndex++;
}
Should be:
// Recalculate parameter resource index
if (!parameter.IsValueType)
{
parameter.Offset = resourceIndex;
resourceIndex += parameter.ElementCount;
}

@ArtiomCiumac
Copy link
Contributor

Fixed. Thank you for reporting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants