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

State caching do not account for implicitly unbound Buffer object #407

Open
okuoku opened this issue Jan 2, 2023 · 1 comment
Open

State caching do not account for implicitly unbound Buffer object #407

okuoku opened this issue Jan 2, 2023 · 1 comment
Labels

Comments

@okuoku
Copy link
Contributor

okuoku commented Jan 2, 2023

at: f5dda93
Found by: wined3d (GLSL backend) + google/angle@4a4ae72 (Vulkan backend) on Win32

When the client called glDeleteBuffers, target buffer might be implicitly unbound from any attach points. But since gl4es state cache do not handle such implicit unbinding of buffers, client can cause random crash. For example:

  1. Client generate buffer name with glGenBuffers (=> buffer name X)
  2. Client attach X to array buffer
  3. gl4es caches X inside its state cache
  4. Client delete buffer X with glDeleteBuffers
  5. Client generate buffer and server assigned same name X for the new object
  6. Client attach (newly created) buffer X
  7. gl4es ignores request since they thinks we have already attached buffer X
  8. Client try to draw something and server will crash since buffer is not bound to the binding point

Avoiding any use of caching okuoku@71ebbd6 fixes issue when ANGLE used as GLES backend of gl4es -- it seems (unfortunately) ANGLE quickly re-use object names.

@Mathias-Boulay
Copy link
Contributor

Just for completeness sake, @okuoku implicit handling commit helps with #381

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

No branches or pull requests

3 participants