mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-15 08:06:19 +00:00
Revert "Destroy backend implementation for Buffers"
This reverts commit b6a80b321e.
Reason for revert: dawn_end2end_tests are failing on the Chromium GPU FYI bots. Example here: https://ci.chromium.org/p/chromium/builders/ci/Win10%20FYI%20Release%20%28NVIDIA%29/4226
Original change's description:
> Destroy backend implementation for Buffers
>
> Destroy can be used to free the GPU memory associated with resources
> without waiting for javascript garbage collection to occur.
> The buffer is validated at submission to the queue.
> So any buffer that has been destroyed before submission, will then
> invalidate the submit and result in an error.
>
> Bug: dawn:46
> Change-Id: I40df56ce97baef01deea7552d7a6d40b558fc985
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5320
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Commit-Queue: Natasha Lee <natlee@microsoft.com>
TBR=cwallez@chromium.org,kainino@chromium.org,enga@chromium.org,rafael.cintron@microsoft.com,natlee@microsoft.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:46
Change-Id: Iadf37a8a6675c744207ec7daaa3fd2fde7da3714
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5480
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
8c1a90199a
commit
9bf529ec94
@@ -27,10 +27,6 @@ namespace dawn_native { namespace opengl {
|
||||
glBufferData(GL_ARRAY_BUFFER, GetSize(), nullptr, GL_STATIC_DRAW);
|
||||
}
|
||||
|
||||
Buffer::~Buffer() {
|
||||
DestroyImpl();
|
||||
}
|
||||
|
||||
GLuint Buffer::GetHandle() const {
|
||||
return mBuffer;
|
||||
}
|
||||
@@ -62,9 +58,4 @@ namespace dawn_native { namespace opengl {
|
||||
glUnmapBuffer(GL_ARRAY_BUFFER);
|
||||
}
|
||||
|
||||
void Buffer::DestroyImpl() {
|
||||
glDeleteBuffers(1, &mBuffer);
|
||||
mBuffer = 0;
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::opengl
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace dawn_native { namespace opengl {
|
||||
class Buffer : public BufferBase {
|
||||
public:
|
||||
Buffer(Device* device, const BufferDescriptor* descriptor);
|
||||
~Buffer();
|
||||
|
||||
GLuint GetHandle() const;
|
||||
|
||||
@@ -35,7 +34,6 @@ namespace dawn_native { namespace opengl {
|
||||
void MapReadAsyncImpl(uint32_t serial) override;
|
||||
void MapWriteAsyncImpl(uint32_t serial) override;
|
||||
void UnmapImpl() override;
|
||||
void DestroyImpl() override;
|
||||
|
||||
GLuint mBuffer = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user