bennycen / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

ResourceManager will happily re-allocate reserved handles #942

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. glBindTexture(GL_TEXTURE_2D, 1)
2. glGenTextures(1, &handle)
3. ASSERT(handle != 1)

We should use a more intelligent scheme for reserving some handles with 
implicit creation.

Original issue reported on code.google.com by jmad...@chromium.org on 10 Mar 2015 at 4:36

GoogleCodeExporter commented 9 years ago

Original comment by jmad...@chromium.org on 11 Mar 2015 at 3:35

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Jamie Madill <jmadill@chromium.org>
Commit : 28291c5a1b87d4ad659b8430faf877a40ebe5bf0

Code-Review  0 : Jamie Madill
Code-Review  +1: Brandon Jones
Code-Review  +2: Geoff Lang
Verified     0 : Brandon Jones, Geoff Lang
Verified     +1: Jamie Madill
Commit Queue   : Chumped
Change-Id      : Ib0cee2b40c3a0faaac32b22c986b824b7b2dddde
Reviewed-at    : https://chromium-review.googlesource.com/258900

Add an ImplFactory base class.

This class helps make mocking easier for unit tests.

Also update the back-end generator script.

BUG=angleproject:942

src/libANGLE/Framebuffer.h
src/libANGLE/renderer/FramebufferImpl.h
src/libANGLE/renderer/ImplFactory.h
src/libANGLE/renderer/Renderer.h
src/libANGLE/renderer/generate_new_renderer.py
src/libGLESv2.gypi

Original comment by bugdro...@chromium.org on 16 Mar 2015 at 2:59

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Jamie Madill <jmadill@chromium.org>
Commit : 48115b6fcfaa80ed3e496839f67db5c276a49fd5

Code-Review  0 : Jamie Madill
Code-Review  +2: Geoff Lang
Verified     0 : Geoff Lang
Verified     +1: Jamie Madill
Commit Queue   : Chumped
Change-Id      : Idf14a4e42148b379b64b129ab649a9222cf1fb52
Reviewed-at    : https://chromium-review.googlesource.com/258902

Use rx::ImplFactory in Framebuffer init.

BUG=angleproject:942

src/libANGLE/Framebuffer.cpp
src/libANGLE/Framebuffer.h

Original comment by bugdro...@chromium.org on 16 Mar 2015 at 5:33

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Jamie Madill <jmadill@chromium.org>
Commit : ae6495e50762c5f28b16ad671270f3cff19880ea

Code-Review  0 : Jamie Madill
Code-Review  +2: Geoff Lang
Verified     0 : Geoff Lang
Verified     +1: Jamie Madill
Commit Queue   : Chumped
Change-Id      : I24b9d0be550991845225141d6e7d5630383a8718
Reviewed-at    : https://chromium-review.googlesource.com/258901

Use rx::ImplFactory in ResourceManager.

This will make mocking easier for unit testing ResourceManager.

BUG=angleproject:942

src/libANGLE/ResourceManager.cpp
src/libANGLE/ResourceManager.h

Original comment by bugdro...@chromium.org on 16 Mar 2015 at 5:33

GoogleCodeExporter commented 9 years ago
Issue 223 has been merged into this issue.

Original comment by jmad...@chromium.org on 17 Mar 2015 at 8:36

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Jamie Madill <jmadill@chromium.org>
Commit : 61ce1a414e74f6a72a520d6adf59bff13aff03a0

Code-Review  0 : Brandon Jones, Geoff Lang
Code-Review  +2: Jamie Madill
Verified     0 : Brandon Jones, Geoff Lang
Verified     +1: Jamie Madill
Commit Queue   : Chumped
Change-Id      : I2e3f4c31b28cb86bd3699035f5d55568a2a1d7d5
Reviewed-at    : https://chromium-review.googlesource.com/258904

Fix ResourceManager create-on-bind reallocations.

We had a funny bug where the Handle Allocator would re-allocate
reserved handles after the app layer creates one with Bind rather
than using Gen. This affects Textures, Buffers and Renderbuffers.

Fix this by using a different allocation scheme. It should still
be fast on the "good" case (using Gen) and use tree lookups on the
bind case. Also add some unit tests.

BUG=angleproject:942

src/libANGLE/HandleAllocator.cpp
src/libANGLE/HandleAllocator.h
src/libANGLE/HandleAllocator_unittest.cpp
src/libANGLE/Renderbuffer.cpp
src/libANGLE/ResourceManager.cpp
src/libANGLE/ResourceManager.h
src/libANGLE/ResourceManager_unittest.cpp
src/tests/angle_unittests.gypi
src/tests/angle_unittests_utils.h

Original comment by bugdro...@chromium.org on 20 Mar 2015 at 5:21

GoogleCodeExporter commented 9 years ago

Original comment by jmad...@chromium.org on 20 Mar 2015 at 5:21

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Jamie Madill <jmadill@chromium.org>
Commit : bdd419f9f5b006e913606e7363125942c8ae06bc

Code-Review  0 : Jamie Madill, Zhenyao Mo
Code-Review  +2: Geoff Lang
Verified     0 : Geoff Lang, Zhenyao Mo
Verified     +1: Jamie Madill
Commit Queue   : Chumped
Change-Id      : I63ce608fcd6a11f92e2b5421f090551934e729ed
Reviewed-at    : https://chromium-review.googlesource.com/261591

Fix ResourceManager create-on-bind reallocations.

*re-land with build fix for Clang*

We had a funny bug where the Handle Allocator would re-allocate
reserved handles after the app layer creates one with Bind rather
than using Gen. This affects Textures, Buffers and Renderbuffers.

Fix this by using a different allocation scheme. It should still
be fast on the "good" case (using Gen) and use tree lookups on the
bind case. Also add some unit tests.

BUG=angleproject:942

src/libANGLE/HandleAllocator.cpp
src/libANGLE/HandleAllocator.h
src/libANGLE/HandleAllocator_unittest.cpp
src/libANGLE/Renderbuffer.cpp
src/libANGLE/ResourceManager.cpp
src/libANGLE/ResourceManager.h
src/libANGLE/ResourceManager_unittest.cpp
src/tests/angle_unittests.gypi
src/tests/angle_unittests_utils.h

Original comment by bugdro...@chromium.org on 20 Mar 2015 at 8:13