glColorMask cache is not appropriately updated in command buffer. |
|||
Issue descriptionContextState caches the values last passed to glColorMask to avoid calling it unnecessarily. This relies on the assumption that any time glColorMask is actually called with different values, the cache is updated. Unfortunately, this is not currently the case. https://cs.chromium.org/search/?q=glcolormask+file:gpu&sq=package:chromium&type=cs To give a single example, gles2_cmd_copy_tex_image.cc updates glColorMask without going through the cache. https://cs.chromium.org/chromium/src/gpu/command_buffer/service/gles2_cmd_copy_tex_image.cc?q=glcolormask+file:gpu&sq=package:chromium&l=234&dr=C
,
Oct 21 2016
At this point, do you think it's easier just to get rid of the cache?
,
Oct 21 2016
In theory any internal use of the color mask should be recovered after the use. In this sense, the cache would just remain the same.
,
Oct 21 2016
Right, the problem is not the cache (which is there for virtual context switching), but that some functionality is implemented that changes the color mask to something different than what is in the command buffer context, but doesn't restore it to the command buffer context value. Regardless of the cache, you can probably expose a bug around this, within a single context.
,
Oct 21 2016
Actually all that code restores the color mask to the cached state (GLES2DecoderImpl::RestoreGlobalState would do this) at the end of the respective functions, so the behavior is valid AFAICT.
,
Oct 21 2016
Ah, I missed that. Thanks for pointing it out. |
|||
►
Sign in to add a comment |
|||
Comment 1 by piman@chromium.org
, Oct 21 2016