1
\$\begingroup\$

I am trying to create multiple textures, and only several of them change every few frames. I don't want to have to copy in the whole array via SetResourceArray for just a few textures that change, which brings me to my quesiton: Does SetResourceArray copy the data into the GPU?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

It will most likely call a flush and then copy the stuff to the gpu since you are updating textures. I Cant say that IT IS like this, since DX never gives details about what their drivers do. But since it is the Effect framework it might also do so that it calls the PSSetShaderResourcer(), and then sets all of them at the same time.

But if you want to update a pair of textures each frame, consider having a smaller buffer for those explicitly. Otherwise calling UpdateResource per each might give you a desired effect for less performance loss.

\$\endgroup\$
3
  • \$\begingroup\$ What do you mean by UpdateResource? \$\endgroup\$ Jan 9, 2014 at 9:15
  • \$\begingroup\$ Sorry, i meant UpdateSubresource. Here is a link to the call. msdn.microsoft.com/en-us/library/windows/desktop/… \$\endgroup\$
    – Tordin
    Jan 9, 2014 at 10:14
  • 1
    \$\begingroup\$ And as you see on the page, it do copy stuff to the gpu ( which it has to do ( \$\endgroup\$
    – Tordin
    Jan 9, 2014 at 10:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .