mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1110120 - Remove use of UniquePtr for XFB and UB tracking.; r=smaug
This commit is contained in:
parent
7928e6f748
commit
c252976203
@ -141,15 +141,11 @@ WebGLContext::InitWebGL2()
|
||||
gl->GetUIntegerv(LOCAL_GL_MAX_UNIFORM_BUFFER_BINDINGS,
|
||||
&mGLMaxUniformBufferBindings);
|
||||
|
||||
mBoundTransformFeedbackBuffers =
|
||||
MakeUnique<WebGLRefPtr<WebGLBuffer>[]>(mGLMaxTransformFeedbackSeparateAttribs);
|
||||
mBoundUniformBuffers =
|
||||
MakeUnique<WebGLRefPtr<WebGLBuffer>[]>(mGLMaxUniformBufferBindings);
|
||||
mBoundTransformFeedbackBuffers.SetLength(mGLMaxTransformFeedbackSeparateAttribs);
|
||||
mBoundUniformBuffers.SetLength(mGLMaxUniformBufferBindings);
|
||||
|
||||
mDefaultTransformFeedback = new WebGLTransformFeedback(this, 0);
|
||||
mBoundTransformFeedback = mDefaultTransformFeedback;
|
||||
auto xfBuffers = new WebGLRefPtr<WebGLBuffer>[mGLMaxTransformFeedbackSeparateAttribs];
|
||||
mBoundTransformFeedbackBuffers.reset(xfBuffers);
|
||||
|
||||
mBypassShaderValidation = true;
|
||||
|
||||
|
@ -342,14 +342,8 @@ WebGLContext::DestroyResourcesAndContext()
|
||||
mBoundTransformFeedback = nullptr;
|
||||
mDefaultTransformFeedback = nullptr;
|
||||
|
||||
if (mBoundTransformFeedbackBuffers) {
|
||||
for (GLuint i = 0; i < mGLMaxTransformFeedbackSeparateAttribs; i++) {
|
||||
mBoundTransformFeedbackBuffers[i] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
for (GLuint i = 0; i < mGLMaxUniformBufferBindings; i++)
|
||||
mBoundUniformBuffers[i] = nullptr;
|
||||
mBoundTransformFeedbackBuffers.Clear();
|
||||
mBoundUniformBuffers.Clear();
|
||||
|
||||
while (!mTextures.isEmpty())
|
||||
mTextures.getLast()->DeleteOnce();
|
||||
|
@ -926,8 +926,8 @@ protected:
|
||||
WebGLRefPtr<WebGLBuffer> mBoundTransformFeedbackBuffer;
|
||||
WebGLRefPtr<WebGLBuffer> mBoundUniformBuffer;
|
||||
|
||||
UniquePtr<WebGLRefPtr<WebGLBuffer>[]> mBoundUniformBuffers;
|
||||
UniquePtr<WebGLRefPtr<WebGLBuffer>[]> mBoundTransformFeedbackBuffers;
|
||||
nsTArray<WebGLRefPtr<WebGLBuffer>> mBoundUniformBuffers;
|
||||
nsTArray<WebGLRefPtr<WebGLBuffer>> mBoundTransformFeedbackBuffers;
|
||||
|
||||
WebGLRefPtr<WebGLBuffer>& GetBufferSlotByTarget(GLenum target);
|
||||
WebGLRefPtr<WebGLBuffer>& GetBufferSlotByTargetIndexed(GLenum target,
|
||||
|
Loading…
Reference in New Issue
Block a user