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

Issue 635816 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 631934



Sign in to add a comment

TexSubImage3D should not modify the data outside of the sub-region it defined.

Project Member Reported by yunchao...@intel.com, Aug 9 2016

Issue description

However, Chromium will clear the whole 3D/2D_ARRAY texture if that texture is not cleared when call into TexSubImage3D. This behavior clears all pixels, including the pixels outside of the sub-region that TexSubImage3D defined. 

I wrote a test case in WebGL 2 CTS to expose this issue: https://github.com/KhronosGroup/WebGL/pull/1958. I will submit patch to fix this bug in Chromium later.

I found this issue when I wrote this patch: https://codereview.chromium.org/2208733002/. If it is not a standalone issue, I will fix the issue in the same patch.

 
Zhenyao and Ken, I have one question about clear the uncleared texture. 

As you know, on command buffer service side, we have a class TextureManager to manage the texture related information. In TextureManager, we have complicated code to set/get the cleared rect for a particular mipmap level for 2D texture. 
But for 3D texture, we just simply clear the entire texture. So I wonder do we also need to upgrade the code to clear a small rect for a specific level/layer for 3D texture? In this CL: https://codereview.chromium.org/2208733002/. I tried to follow the design and add LayerInfo to LevelInfo to clear a small rect for a specific layer of a mipmap level for 3D texture. 
But I am not sure whether this logic is necessary. 
Why it is necessary for 2D/3D texture to clear a small rect? For instance, If a specific level of the texture is 4*4, and we only read a 2*2 rect from fbo by CopyTex{Sub}Image2D to the texture, then we just clear the 2*2 rect. If we read another 2*2 next to the previous rect, we will clear this 2*2 rect, and combine the cleared rect to 2*4. why don't we clear the entire mipmap level (4*4) at the first time, and don't need to care about the cleared rect in following operations? In addition, we don't need so many complicated code to manage the cleared rect.
 
I guess that we can initialize as small part as possible for texture. So we can upload a small bunch of data and save the memory bandwidth and improve the perf for some cases. If this is true, should we clear a small part only for 3D texture, instead of clearing the entire 3D texture? You know, a 3D texture may be very big, need to upload lots of data (zeros).

Any comments?

Status: WontFix (was: Assigned)
I misunderstand the code in Chromium. Close this issue. 

Sign in to add a comment