Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ResourceDataReader block pool #11

Open
carmineos opened this issue Dec 25, 2020 · 0 comments
Open

Fix ResourceDataReader block pool #11

carmineos opened this issue Dec 25, 2020 · 0 comments

Comments

@carmineos
Copy link
Owner

carmineos commented Dec 25, 2020

The ResourceDataReader block pool currently will create a duplicated block if you read a derived type after a base type at the same position.

Considering 81e55a0 :
Reading the shader parameters first will add the Texture Data blocks to the pool.
If the ShaderGroup has an embedded texture dictionary it will also read blocks of type TextureDX11 (which derives from Texture ) which are the same blocks and so they are at the same position in the resource.
At this point it will create a duplicated object as the cached one is not of type TextureDX11 but a base Texture. The block pool should replace the block with the most derived one but also somehow update all the blocks which referenced to the old one to now reference the replaced one.

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

No branches or pull requests

1 participant