mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 613350 - Pass 2 more WebGL draw-test - r=vladimir a=joe
This commit is contained in:
parent
9a5d41bb65
commit
cf89e4601d
@ -1047,6 +1047,10 @@ WebGLContext::DrawArrays(GLenum mode, WebGLint first, WebGLsizei count)
|
||||
if (first < 0 || count < 0)
|
||||
return ErrorInvalidValue("DrawArrays: negative first or count");
|
||||
|
||||
// If count is 0, there's nothing to do.
|
||||
if (count == 0)
|
||||
return NS_OK;
|
||||
|
||||
// If there is no current program, this is silently ignored.
|
||||
// Any checks below this depend on a program being available.
|
||||
if (!mCurrentProgram)
|
||||
@ -1060,10 +1064,6 @@ WebGLContext::DrawArrays(GLenum mode, WebGLint first, WebGLsizei count)
|
||||
if (!ValidateBuffers(checked_firstPlusCount.value()))
|
||||
return ErrorInvalidOperation("DrawArrays: bound vertex attribute buffers do not have sufficient size for given first and count");
|
||||
|
||||
// If count is 0, there's nothing to do.
|
||||
if (count == 0)
|
||||
return NS_OK;
|
||||
|
||||
MakeContextCurrent();
|
||||
|
||||
if (mBoundFramebuffer && !mBoundFramebuffer->CheckAndInitializeRenderbuffers())
|
||||
@ -1091,6 +1091,10 @@ WebGLContext::DrawElements(WebGLenum mode, WebGLsizei count, WebGLenum type, Web
|
||||
if (count < 0 || byteOffset < 0)
|
||||
return ErrorInvalidValue("DrawElements: negative count or offset");
|
||||
|
||||
// If count is 0, there's nothing to do.
|
||||
if (count == 0)
|
||||
return NS_OK;
|
||||
|
||||
CheckedUint32 checked_byteCount;
|
||||
|
||||
if (type == LOCAL_GL_UNSIGNED_SHORT) {
|
||||
@ -1143,10 +1147,6 @@ WebGLContext::DrawElements(WebGLenum mode, WebGLsizei count, WebGLenum type, Web
|
||||
"size for given indices from the bound element array");
|
||||
}
|
||||
|
||||
// If count is 0, there's nothing to do.
|
||||
if (count == 0)
|
||||
return NS_OK;
|
||||
|
||||
MakeContextCurrent();
|
||||
|
||||
if (mBoundFramebuffer && !mBoundFramebuffer->CheckAndInitializeRenderbuffers())
|
||||
|
Loading…
Reference in New Issue
Block a user