Bug 1236091. Move validate checks inside of null checks. r=jgilbert
We trigger this during deqp/functional/gles3/framebufferblit.html
This commit is contained in:
@@ -118,18 +118,15 @@ WebGL2Context::BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mBoundReadFramebuffer->ValidateAndInitAttachments("blitFramebuffer's READ_FRAMEBUFFER") ||
|
|
||||||
!mBoundDrawFramebuffer->ValidateAndInitAttachments("blitFramebuffer's DRAW_FRAMEBUFFER"))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
GLsizei srcSamples;
|
GLsizei srcSamples;
|
||||||
const webgl::FormatInfo* srcColorFormat = nullptr;
|
const webgl::FormatInfo* srcColorFormat = nullptr;
|
||||||
const webgl::FormatInfo* srcDepthFormat = nullptr;
|
const webgl::FormatInfo* srcDepthFormat = nullptr;
|
||||||
const webgl::FormatInfo* srcStencilFormat = nullptr;
|
const webgl::FormatInfo* srcStencilFormat = nullptr;
|
||||||
|
|
||||||
if (mBoundReadFramebuffer) {
|
if (mBoundReadFramebuffer) {
|
||||||
|
if (!mBoundReadFramebuffer->ValidateAndInitAttachments("blitFramebuffer's READ_FRAMEBUFFER"))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!GetFBInfoForBlit(mBoundReadFramebuffer, "READ_FRAMEBUFFER", &srcSamples,
|
if (!GetFBInfoForBlit(mBoundReadFramebuffer, "READ_FRAMEBUFFER", &srcSamples,
|
||||||
&srcColorFormat, &srcDepthFormat, &srcStencilFormat))
|
&srcColorFormat, &srcDepthFormat, &srcStencilFormat))
|
||||||
{
|
{
|
||||||
@@ -148,6 +145,9 @@ WebGL2Context::BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY
|
|||||||
const webgl::FormatInfo* dstStencilFormat = nullptr;
|
const webgl::FormatInfo* dstStencilFormat = nullptr;
|
||||||
|
|
||||||
if (mBoundDrawFramebuffer) {
|
if (mBoundDrawFramebuffer) {
|
||||||
|
if (!mBoundDrawFramebuffer->ValidateAndInitAttachments("blitFramebuffer's DRAW_FRAMEBUFFER"))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!GetFBInfoForBlit(mBoundDrawFramebuffer, "DRAW_FRAMEBUFFER", &dstSamples,
|
if (!GetFBInfoForBlit(mBoundDrawFramebuffer, "DRAW_FRAMEBUFFER", &dstSamples,
|
||||||
&dstColorFormat, &dstDepthFormat, &dstStencilFormat))
|
&dstColorFormat, &dstDepthFormat, &dstStencilFormat))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user