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

[Texture2DArray] Fix glTexStorage3D/glTexImage3D condition #1222

Open
wants to merge 1 commit into
base: new_master
Choose a base branch
from

Conversation

madsbuvi
Copy link

@madsbuvi madsbuvi commented Apr 23, 2023

When generateAndAssignTextureObject() returns a re-used texture object with _allocated set to true, and texStorageSizedInternalFormat != 0, Texture2DArray calls glTexImage3D with this texture object bound. This is an error because in this case Texture2DArray has already called glTexStorage3D on this texture object the first time this re-used TextureObject was used.

This PR proposes a fix for this issue. This code is based on the corresponding code in Texture2D.cpp

edit: I think !934 was an attempt at fixing this, but that fix doesn't work for Texture2DArray because the check against _allocated is in the wrong place.

…ng applied to a texture that already had glTexStorage3D applied.
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

Successfully merging this pull request may close these issues.

1 participant