New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 916273 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
OOO until 2019-01-24
Closed: Dec 19
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Warn on glClear(0)

Project Member Reported by jdarpinian@chromium.org, Dec 18

Issue description

We should warn if the user calls glClear and doesn't specify one of the valid clear bits. This is a really easy mistake to make in WebGL because any typo in the enum passed to clear will make it an undefined value which is coerced to 0 without any warning.

We could also think about warning if there are invalid bits set, which would catch classic cases like glClear(GL_DEPTH) (instead of the intended glClear(GL_DEPTH_BUFFER_BIT)).
 
Inspired by this bug in a WebGL conformance test: https://github.com/KhronosGroup/WebGL/pull/2760
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4fedf19dd8567a99769a3da28f923351a8d7ffda

commit 4fedf19dd8567a99769a3da28f923351a8d7ffda
Author: Kenneth Russell <kbr@chromium.org>
Date: Wed Dec 19 07:17:08 2018

Warn on WebGLRenderingContext.clear() if no buffers set to clear.

Bug:  916273 
Change-Id: I71c9983c9464827a2c9254bc6c88de152bbbb253
Reviewed-on: https://chromium-review.googlesource.com/c/1383355
Reviewed-by: James Darpinian <jdarpinian@chromium.org>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617753}
[modify] https://crrev.com/4fedf19dd8567a99769a3da28f923351a8d7ffda/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc

Owner: kbr@chromium.org
Status: Fixed (was: Untriaged)

Sign in to add a comment