|
|
DescriptionMake invalidateFramebuffer no-op for DEPTH_STENCIL attachment
Due to potential performance issues chrome should just make
invalidateFramebuffer call a no-op if the attachment is in
DEPTH_STENCIL format and only one part is intended to be
invalidated.
BUG=628496
TEST=deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Committed: https://crrev.com/ce7e217303925cfec9b453ff745e9ebb5f120d95
Cr-Commit-Position: refs/heads/master@{#406821}
Patch Set 1 #Patch Set 2 : Add depth_cleared_ and stencil_cleared_ for class texture and renderbuffer. #
Total comments: 10
Patch Set 3 : Add depth_cleared_ and stencil_cleared_ for class texture and renderbuffer. #Patch Set 4 : Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment #
Total comments: 2
Patch Set 5 : Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment #
Total comments: 2
Patch Set 6 : Fix bugs found by Ken #
Total comments: 5
Patch Set 7 : Use full email address in TODO #
Messages
Total messages: 92 (43 generated)
Description was changed from ========== Add depth_cleared_ and stencil_cleared_ for class texture and renderbuffer. Textures and renderbuffers in format DEPTH_STENCIL contain both depth and stencil information. Without this patch we can only mark the texture and renderbuffer as a whole, which may wrongly clear the part that should not be cleared. We should have two flags to mark if the specific part of the texture or renderbuffer is cleared, then we can just clear the unclear part of the texture or renderbuffer. All the cases in WebGL 2 comformance test deqp/functional/gles3/fboinvalidate/whole.html can pass with this patch. BUG=deqp/functional/gles3/fboinvalidate/whole.html should pass but fail ========== to ========== Add depth_cleared_ and stencil_cleared_ for class texture and renderbuffer. Textures and renderbuffers in format DEPTH_STENCIL contain both depth and stencil information. Without this patch we can only mark the texture and renderbuffer as a whole, which may wrongly clear the part that should not be cleared. We should have two flags to mark if the specific part of the texture or renderbuffer is cleared, then we can just clear the unclear part of the texture or renderbuffer. All the cases in WebGL 2 comformance test deqp/functional/gles3/fboinvalidate/whole.html can pass with this patch. BUG=deqp/functional/gles3/fboinvalidate/whole.html should pass but fail CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Description was changed from ========== Add depth_cleared_ and stencil_cleared_ for class texture and renderbuffer. Textures and renderbuffers in format DEPTH_STENCIL contain both depth and stencil information. Without this patch we can only mark the texture and renderbuffer as a whole, which may wrongly clear the part that should not be cleared. We should have two flags to mark if the specific part of the texture or renderbuffer is cleared, then we can just clear the unclear part of the texture or renderbuffer. All the cases in WebGL 2 comformance test deqp/functional/gles3/fboinvalidate/whole.html can pass with this patch. BUG=deqp/functional/gles3/fboinvalidate/whole.html should pass but fail CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Add depth_cleared_ and stencil_cleared_ for class texture and renderbuffer. Textures and renderbuffers in format DEPTH_STENCIL contain both depth and stencil information. Without this patch we can only mark the texture and renderbuffer as a whole, which may wrongly clear the part that should not be cleared. We should have two flags to mark if the specific part of the texture or renderbuffer is cleared, then we can just clear the unclear part of the texture or renderbuffer. All the cases in WebGL 2 comformance test deqp/functional/gles3/fboinvalidate/whole.html can pass with this patch. BUG= TEST=https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 All the tests should pass CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel ==========
jiawei.shao@intel.com changed reviewers: + kbr@chromium.org, qiankun.miao@intel.com, yunchao.he@intel.com, zmo@chromium.org
PTAL. Thanks!
Please format description by "edit issue" on top-left. Current implementation can fix bugs in InvalidateFramebuffer for specific format DEPTH_STENCIL. It's better you can unify the code for Color/Depth/Stencil buffers. What's your opinion ken&zmo? https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... File gpu/command_buffer/service/framebuffer_manager.cc (right): https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/framebuffer_manager.cc:577: } else if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) { What about move the else branch out of MarkAttachmentAsCleared, i.e. to the caller of MarkAttachmentAsCleared. https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:11217: if (have_stencil && !texture->IsLevelCleared(target, level, new line after && https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... File gpu/command_buffer/service/renderbuffer_manager.h (right): https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/renderbuffer_manager.h:51: if (!is_depth_stencil_) Can this path be reached in your current implementation? https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/renderbuffer_manager.h:57: // Should not be reached Maybe" ? : " is better. Use NOTREACHED(); if keep current implementation. And the last return is useless. https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... File gpu/command_buffer/service/texture_manager.cc (right): https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/texture_manager.cc:817: if (info.format != GL_DEPTH_STENCIL) Will this be true in any conditions? I think only DEPTH/STENCIL attachment can execute this path in your current implementation. https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/texture_manager.cc:822: // SetLevelCleared(target, level, cleared); remove unused code. https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/texture_manager.cc:832: stencil_cleared_ = !cleared; Should depth_cleared_ be updated in if branch? stencil_cleared_ already equals !cleared. The assignment doesn't change anything. https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/texture_manager.cc:847: depth_cleared_ = !cleared; Same here. https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/texture_manager.cc:1457: GLenum attachment) const { ASSERT(attachment == GL_DEPTH_ATTACHMENT || attachment == GL_STENCIL_ATTACHMENT); https://codereview.chromium.org/2149523002/diff/20001/gpu/command_buffer/serv... gpu/command_buffer/service/texture_manager.cc:1472: return info.cleared_rect == gfx::Rect(info.width, info.height); change to return attachment == GL_DEPTH_ATTACHMEN ? depth_cleared_ : stencil_cleared_.
Description was changed from ========== Add depth_cleared_ and stencil_cleared_ for class texture and renderbuffer. Textures and renderbuffers in format DEPTH_STENCIL contain both depth and stencil information. Without this patch we can only mark the texture and renderbuffer as a whole, which may wrongly clear the part that should not be cleared. We should have two flags to mark if the specific part of the texture or renderbuffer is cleared, then we can just clear the unclear part of the texture or renderbuffer. All the cases in WebGL 2 comformance test deqp/functional/gles3/fboinvalidate/whole.html can pass with this patch. BUG= TEST=https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 All the tests should pass CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Add depth_cleared_ and stencil_cleared_ for class texture and renderbuffer. Textures and renderbuffers in format DEPTH_STENCIL contain both depth and stencil information. Without this patch we can only mark the texture and renderbuffer as a whole, which may wrongly clear the part that should not be cleared. We should add two flags to mark if the specific part of the texture or renderbuffer is cleared, then we will be able to just clear the unclear part of the texture or renderbuffer. All the cases in WebGL 2 comformance test deqp/functional/gles3/fboinvalidate/whole.html can pass with this patch. BUG= TEST=https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel ==========
jiawei: please fix the try-bot failure. kbr, zmo: can you give a glance at this patch and give some comments if it's in right direction?
First, let me clarify this is a bug when we initialize uninitialized DEPTH_STENCIL resources? In a high level (without looking too much details into the CL), what are the situations that we ended up clear DEPTH without STENCIL or vice versa? On top of my head, it is only the cases where you attach a DEPTH_STENCIL to only DEPTH_ATTACHMENT or STENCIL_ATTACHMENT, but not both. Is that the case? If yes, then we simply need to fix that in ClearUnclearedAttachment() function, which is much less intrusive. But if I miss the point, please help me understand.
On 2016/07/14 22:48:14, Zhenyao Mo wrote: > First, let me clarify this is a bug when we initialize uninitialized > DEPTH_STENCIL resources? > > In a high level (without looking too much details into the CL), what are the > situations that we ended up clear DEPTH without STENCIL or vice versa? On top of > my head, it is only the cases where you attach a DEPTH_STENCIL to only > DEPTH_ATTACHMENT or STENCIL_ATTACHMENT, but not both. Is that the case? If > yes, then we simply need to fix that in ClearUnclearedAttachment() function, > which is much less intrusive. > > But if I miss the point, please help me understand. Is the issue that InvalidateFramebuffer can invalidate just one of DEPTH or STENCIL for a DEPTH_STENCIL framebuffer attachment, and the other one is required to be preserved? A couple of points: 1) Please file a bug, block it on Issue 295792, and reference it from the issue description. I've just requested Editbugs access for you, but if you can't conveniently file the bug, please ask Qiankun or Yunchao to do it. 2) As Qiankun points out, please fix the trybot failures before sending out for review. If the tests aren't passing then the code might need to change significantly before they can pass, so reviews by others may be wasted. Thanks.
On 2016/07/15 01:01:11, Ken Russell wrote: > On 2016/07/14 22:48:14, Zhenyao Mo wrote: > > First, let me clarify this is a bug when we initialize uninitialized > > DEPTH_STENCIL resources? > > > > In a high level (without looking too much details into the CL), what are the > > situations that we ended up clear DEPTH without STENCIL or vice versa? On top > of > > my head, it is only the cases where you attach a DEPTH_STENCIL to only > > DEPTH_ATTACHMENT or STENCIL_ATTACHMENT, but not both. Is that the case? If > > yes, then we simply need to fix that in ClearUnclearedAttachment() function, > > which is much less intrusive. > > > > But if I miss the point, please help me understand. > > Is the issue that InvalidateFramebuffer can invalidate just one of DEPTH or > STENCIL for a DEPTH_STENCIL framebuffer attachment, and the other one is > required to be preserved? > > A couple of points: > > 1) Please file a bug, block it on Issue 295792, and reference it from the issue > description. I've just requested Editbugs access for you, but if you can't > conveniently file the bug, please ask Qiankun or Yunchao to do it. > > 2) As Qiankun points out, please fix the trybot failures before sending out for > review. If the tests aren't passing then the code might need to change > significantly before they can pass, so reviews by others may be wasted. > > Thanks. I am very sorry to miss this…… Sorry to disturb all of you…… I will pay much attention on it.
The CQ bit was checked by jiawei.shao@intel.com
The CQ bit was unchecked by jiawei.shao@intel.com
On 2016/07/14 22:48:14, Zhenyao Mo wrote: > First, let me clarify this is a bug when we initialize uninitialized > DEPTH_STENCIL resources? > > In a high level (without looking too much details into the CL), what are the > situations that we ended up clear DEPTH without STENCIL or vice versa? On top of > my head, it is only the cases where you attach a DEPTH_STENCIL to only > DEPTH_ATTACHMENT or STENCIL_ATTACHMENT, but not both. Is that the case? If > yes, then we simply need to fix that in ClearUnclearedAttachment() function, > which is much less intrusive. > > But if I miss the point, please help me understand. OK. Here is all my investigation on this issue. I hope it can make some help to you. Let me use texture as an example, and the situation of renderbuffer is same. The bug I find is that in the previous implementation, we can only mark a texture cleared or uncleared as a whole, as there is only one variable cleared_ in the texture object. You can pay attention on the function InvalidateFramebufferImpl() in gles2_cmd_decoder.cc, which is the implementation of WebGL API invalidateFramebuffer(). This function calls framebuffer->MarkAttachmentAsCleared(), which is intended to mark the specific attachment of the framebuffer cleared or uncleared. The class TextureAttachment represents a specific attachment of a framebuffer, and it wraps the texture attached to the framebuffer. There is a pointer-like variable called texture_ref which points to the texture. The texture with format DEPTH_STENCIL should be attached to both DEPTH_ATTACHMENT and STENCIL_ATTACHMENT in the same framebuffer when you use textures with this format as depth and stencil attachments, so texture_refs in both depth TextureAttachment and stencil TextureAttachment point to the same texture with format DEPTH_STENCIL. You can verify this fact by checking the address of texture_ref->texture() in these two TextureAttachment objects. The structure of the framebuffer in this situation is as follows: DEPTH_ATTACHMENT STENCIL_ATTACHMENT | | TextureAttachment TextureAttachment \ / \ / Texture in format DEPTH_STENCIL When framebuffer->MarkAttachmentAsCleared() is called, function SetCleared() in the specific TextureAttachment object is called, and finally function SetLevelCleared() in the Texture object is called by TextureManager to update cleared_ in the Texture object. In the failed case invalidate.whole.unbind_read_stencil, only STENCIL_ATTACHMENT of the framebuffer should be invalidated and cleared, and information in DEPTH_ATTACHMENT should be kept. But in current implementation, when you intend to mark STENCIL_ATTACHMENT, you can only call the function SetLevelCleared() to mark the Texture as a whole by updating the variable cleared_. This can be proved after you call framebuffer->MarkAttachmentAsCleared(..., STENCIL_BUFFER), you can call framebuffer -> HasUnclearedAttachment(DEPTH_ATTACHMENT) and framebuffer->HasUnclearedAttachment(STENCIL_ATTACHMENT), and the return values will be both true because the variable cleared_ in the Texture object is true. It is not enough just to fix ClearUnclearedAttachment(). You can see function() DoDrawArrays() or DoDrawElements() in gles2_cmd_decoder.cc. Before really calling glDrawElements() this function will call ClearUnclearedTextures() at first to make sure there is no uncertain values in all textures. ClearUnclearedTextures() checks all the textures and call texture_manager()->ClearRenderableLevels(), which will finally call the function ClearLevel() in gles2_cmd_decoder.cc. In the previous implementation, the function ClearLevel() will just clear every part of the texture by glClear(GL_DEPTH_BUTTER_BIT | GL_STENCIL_BUFFER_BIT). In the situation before, as the texture has been marked as uncleared, ClearLevel() is called to clear the texture, so the depth part, which should not be cleared, is cleared too. So I think the root cause of the bug is that in the previous implementation Textures with format DEPTH_STENCIL fail to describe the state when only a part of the texture is uncleared, and another part is cleared, so I am trying to fix this issue.
On 2016/07/15 01:20:26, Jiawei wrote: > On 2016/07/14 22:48:14, Zhenyao Mo wrote: > > First, let me clarify this is a bug when we initialize uninitialized > > DEPTH_STENCIL resources? > > > > In a high level (without looking too much details into the CL), what are the > > situations that we ended up clear DEPTH without STENCIL or vice versa? On top > of > > my head, it is only the cases where you attach a DEPTH_STENCIL to only > > DEPTH_ATTACHMENT or STENCIL_ATTACHMENT, but not both. Is that the case? If > > yes, then we simply need to fix that in ClearUnclearedAttachment() function, > > which is much less intrusive. > > > > But if I miss the point, please help me understand. > > OK. Here is all my investigation on this issue. I hope it can make some help to > you. > > Let me use texture as an example, and the situation of renderbuffer is same. The > bug I find is that in the previous implementation, we can only mark a texture > cleared or uncleared as a whole, as there is only one variable cleared_ in the > texture object. > > You can pay attention on the function InvalidateFramebufferImpl() in > gles2_cmd_decoder.cc, which is the implementation of WebGL API > invalidateFramebuffer(). This function calls > framebuffer->MarkAttachmentAsCleared(), which is intended to mark the specific > attachment of the framebuffer cleared or uncleared. > > The class TextureAttachment represents a specific attachment of a framebuffer, > and it wraps the texture attached to the framebuffer. There is a pointer-like > variable called texture_ref which points to the texture. The texture with format > DEPTH_STENCIL should be attached to both DEPTH_ATTACHMENT and STENCIL_ATTACHMENT > in the same framebuffer when you use textures with this format as depth and > stencil attachments, so texture_refs in both depth TextureAttachment and stencil > TextureAttachment point to the same texture with format DEPTH_STENCIL. You can > verify this fact by checking the address of texture_ref->texture() in these two > TextureAttachment objects. The structure of the framebuffer in this situation is > as follows: > > DEPTH_ATTACHMENT STENCIL_ATTACHMENT > | | > TextureAttachment TextureAttachment > \ / > \ / > Texture in format DEPTH_STENCIL > > When framebuffer->MarkAttachmentAsCleared() is called, function SetCleared() in > the specific TextureAttachment object is called, and finally function > SetLevelCleared() in the Texture object is called by TextureManager to update > cleared_ in the Texture object. > > In the failed case invalidate.whole.unbind_read_stencil, only STENCIL_ATTACHMENT > of the framebuffer should be invalidated and cleared, and information in > DEPTH_ATTACHMENT should be kept. But in current implementation, when you intend > to mark STENCIL_ATTACHMENT, you can only call the function SetLevelCleared() to > mark the Texture as a whole by updating the variable cleared_. This can be > proved after you call framebuffer->MarkAttachmentAsCleared(..., STENCIL_BUFFER), > you can call framebuffer -> HasUnclearedAttachment(DEPTH_ATTACHMENT) and > framebuffer->HasUnclearedAttachment(STENCIL_ATTACHMENT), and the return values > will be both true because the variable cleared_ in the Texture object is true. > > It is not enough just to fix ClearUnclearedAttachment(). You can see function() > DoDrawArrays() or DoDrawElements() in gles2_cmd_decoder.cc. Before really > calling glDrawElements() this function will call ClearUnclearedTextures() at > first to make sure there is no uncertain values in all textures. > ClearUnclearedTextures() checks all the textures and call > texture_manager()->ClearRenderableLevels(), which will finally call the function > ClearLevel() in gles2_cmd_decoder.cc. In the previous implementation, the > function ClearLevel() will just clear every part of the texture by > glClear(GL_DEPTH_BUTTER_BIT | GL_STENCIL_BUFFER_BIT). In the situation before, > as the texture has been marked as uncleared, ClearLevel() is called to clear the > texture, so the depth part, which should not be cleared, is cleared too. > > So I think the root cause of the bug is that in the previous implementation > Textures with format DEPTH_STENCIL fail to describe the state when only a part > of the texture is uncleared, and another part is cleared, so I am trying to fix > this issue. Thanks for the detailed explanation. I understand now. So there are only two situations that we might have an uncleared image. 1) it's allocated, but not initialized (texImage with null data, renderbuffer) 2) we invalidate it So for 1), we will never clear depth without clearing stencil (or vice versa), so no need to worry about it. for 2), yes, the current implementation is buggy and I still think avoid InvalidateFramebuffer to the lower driver when we have DEPTH_STENCIL image and we only invalidate depth or stencil bit. Please let me know if you think this might work.
On 2016/07/15 01:12:18, Jiawei wrote: > On 2016/07/15 01:01:11, Ken Russell wrote: > > On 2016/07/14 22:48:14, Zhenyao Mo wrote: > > > First, let me clarify this is a bug when we initialize uninitialized > > > DEPTH_STENCIL resources? > > > > > > In a high level (without looking too much details into the CL), what are the > > > situations that we ended up clear DEPTH without STENCIL or vice versa? On > top > > of > > > my head, it is only the cases where you attach a DEPTH_STENCIL to only > > > DEPTH_ATTACHMENT or STENCIL_ATTACHMENT, but not both. Is that the case? If > > > yes, then we simply need to fix that in ClearUnclearedAttachment() function, > > > which is much less intrusive. > > > > > > But if I miss the point, please help me understand. > > > > Is the issue that InvalidateFramebuffer can invalidate just one of DEPTH or > > STENCIL for a DEPTH_STENCIL framebuffer attachment, and the other one is > > required to be preserved? > > > > A couple of points: > > > > 1) Please file a bug, block it on Issue 295792, and reference it from the > issue > > description. I've just requested Editbugs access for you, but if you can't > > conveniently file the bug, please ask Qiankun or Yunchao to do it. > > > > 2) As Qiankun points out, please fix the trybot failures before sending out > for > > review. If the tests aren't passing then the code might need to change > > significantly before they can pass, so reviews by others may be wasted. > > > > Thanks. > > I am very sorry to miss this…… Sorry to disturb all of you…… I will pay much > attention on it. If Ken's right, then to me a much simpler solution is not to send down the call to the driver if the format is DEPTH_STENCIL and we only try to invalidate DEPTH or STENCIL.
On 2016/07/15 01:26:25, Zhenyao Mo wrote: > On 2016/07/15 01:20:26, Jiawei wrote: > > On 2016/07/14 22:48:14, Zhenyao Mo wrote: > > > First, let me clarify this is a bug when we initialize uninitialized > > > DEPTH_STENCIL resources? > > > > > > In a high level (without looking too much details into the CL), what are the > > > situations that we ended up clear DEPTH without STENCIL or vice versa? On > top > > of > > > my head, it is only the cases where you attach a DEPTH_STENCIL to only > > > DEPTH_ATTACHMENT or STENCIL_ATTACHMENT, but not both. Is that the case? If > > > yes, then we simply need to fix that in ClearUnclearedAttachment() function, > > > which is much less intrusive. > > > > > > But if I miss the point, please help me understand. > > > > OK. Here is all my investigation on this issue. I hope it can make some help > to > > you. > > > > Let me use texture as an example, and the situation of renderbuffer is same. > The > > bug I find is that in the previous implementation, we can only mark a texture > > cleared or uncleared as a whole, as there is only one variable cleared_ in the > > texture object. > > > > You can pay attention on the function InvalidateFramebufferImpl() in > > gles2_cmd_decoder.cc, which is the implementation of WebGL API > > invalidateFramebuffer(). This function calls > > framebuffer->MarkAttachmentAsCleared(), which is intended to mark the specific > > attachment of the framebuffer cleared or uncleared. > > > > The class TextureAttachment represents a specific attachment of a framebuffer, > > and it wraps the texture attached to the framebuffer. There is a pointer-like > > variable called texture_ref which points to the texture. The texture with > format > > DEPTH_STENCIL should be attached to both DEPTH_ATTACHMENT and > STENCIL_ATTACHMENT > > in the same framebuffer when you use textures with this format as depth and > > stencil attachments, so texture_refs in both depth TextureAttachment and > stencil > > TextureAttachment point to the same texture with format DEPTH_STENCIL. You can > > verify this fact by checking the address of texture_ref->texture() in these > two > > TextureAttachment objects. The structure of the framebuffer in this situation > is > > as follows: > > > > DEPTH_ATTACHMENT STENCIL_ATTACHMENT > > | | > > TextureAttachment TextureAttachment > > \ / > > \ / > > Texture in format DEPTH_STENCIL > > > > When framebuffer->MarkAttachmentAsCleared() is called, function SetCleared() > in > > the specific TextureAttachment object is called, and finally function > > SetLevelCleared() in the Texture object is called by TextureManager to update > > cleared_ in the Texture object. > > > > In the failed case invalidate.whole.unbind_read_stencil, only > STENCIL_ATTACHMENT > > of the framebuffer should be invalidated and cleared, and information in > > DEPTH_ATTACHMENT should be kept. But in current implementation, when you > intend > > to mark STENCIL_ATTACHMENT, you can only call the function SetLevelCleared() > to > > mark the Texture as a whole by updating the variable cleared_. This can be > > proved after you call framebuffer->MarkAttachmentAsCleared(..., > STENCIL_BUFFER), > > you can call framebuffer -> HasUnclearedAttachment(DEPTH_ATTACHMENT) and > > framebuffer->HasUnclearedAttachment(STENCIL_ATTACHMENT), and the return values > > will be both true because the variable cleared_ in the Texture object is true. > > > > It is not enough just to fix ClearUnclearedAttachment(). You can see > function() > > DoDrawArrays() or DoDrawElements() in gles2_cmd_decoder.cc. Before really > > calling glDrawElements() this function will call ClearUnclearedTextures() at > > first to make sure there is no uncertain values in all textures. > > ClearUnclearedTextures() checks all the textures and call > > texture_manager()->ClearRenderableLevels(), which will finally call the > function > > ClearLevel() in gles2_cmd_decoder.cc. In the previous implementation, the > > function ClearLevel() will just clear every part of the texture by > > glClear(GL_DEPTH_BUTTER_BIT | GL_STENCIL_BUFFER_BIT). In the situation before, > > as the texture has been marked as uncleared, ClearLevel() is called to clear > the > > texture, so the depth part, which should not be cleared, is cleared too. > > > > So I think the root cause of the bug is that in the previous implementation > > Textures with format DEPTH_STENCIL fail to describe the state when only a part > > of the texture is uncleared, and another part is cleared, so I am trying to > fix > > this issue. > > Thanks for the detailed explanation. I understand now. So there are only two > situations that we might have an uncleared image. 1) it's allocated, but not > initialized (texImage with null data, renderbuffer) 2) we invalidate it > > So for 1), we will never clear depth without clearing stencil (or vice versa), > so no need to worry about it. > > for 2), yes, the current implementation is buggy and I still think avoid > InvalidateFramebuffer to the lower driver when we have DEPTH_STENCIL image and > we only invalidate depth or stencil bit. > > Please let me know if you think this might work. For 2), I think the driver can do the right thing to deal with DEPTH_STENCIL image. You can prove that by commenting the code that marks the attachment as cleared in invalidateFramebufferImpl(), tests in fboinvalidate can pass, but when you try to draw the invalidated attachment, you can see there is uncertain information in the texture. I fully agree with you and I think we can use glClears to implement invalidateFramebuffer() instead of calling drivers. Maybe we can also use this way to implement invalidateSubFramebuffer() which is still an empty function now. Thanks for your advice. I will try it in this way.
On 2016/07/15 01:45:23, Jiawei wrote: > On 2016/07/15 01:26:25, Zhenyao Mo wrote: > > On 2016/07/15 01:20:26, Jiawei wrote: > > > On 2016/07/14 22:48:14, Zhenyao Mo wrote: > > > > First, let me clarify this is a bug when we initialize uninitialized > > > > DEPTH_STENCIL resources? > > > > > > > > In a high level (without looking too much details into the CL), what are > the > > > > situations that we ended up clear DEPTH without STENCIL or vice versa? On > > top > > > of > > > > my head, it is only the cases where you attach a DEPTH_STENCIL to only > > > > DEPTH_ATTACHMENT or STENCIL_ATTACHMENT, but not both. Is that the case? > If > > > > yes, then we simply need to fix that in ClearUnclearedAttachment() > function, > > > > which is much less intrusive. > > > > > > > > But if I miss the point, please help me understand. > > > > > > OK. Here is all my investigation on this issue. I hope it can make some help > > to > > > you. > > > > > > Let me use texture as an example, and the situation of renderbuffer is same. > > The > > > bug I find is that in the previous implementation, we can only mark a > texture > > > cleared or uncleared as a whole, as there is only one variable cleared_ in > the > > > texture object. > > > > > > You can pay attention on the function InvalidateFramebufferImpl() in > > > gles2_cmd_decoder.cc, which is the implementation of WebGL API > > > invalidateFramebuffer(). This function calls > > > framebuffer->MarkAttachmentAsCleared(), which is intended to mark the > specific > > > attachment of the framebuffer cleared or uncleared. > > > > > > The class TextureAttachment represents a specific attachment of a > framebuffer, > > > and it wraps the texture attached to the framebuffer. There is a > pointer-like > > > variable called texture_ref which points to the texture. The texture with > > format > > > DEPTH_STENCIL should be attached to both DEPTH_ATTACHMENT and > > STENCIL_ATTACHMENT > > > in the same framebuffer when you use textures with this format as depth and > > > stencil attachments, so texture_refs in both depth TextureAttachment and > > stencil > > > TextureAttachment point to the same texture with format DEPTH_STENCIL. You > can > > > verify this fact by checking the address of texture_ref->texture() in these > > two > > > TextureAttachment objects. The structure of the framebuffer in this > situation > > is > > > as follows: > > > > > > DEPTH_ATTACHMENT STENCIL_ATTACHMENT > > > | | > > > TextureAttachment TextureAttachment > > > \ / > > > \ / > > > Texture in format DEPTH_STENCIL > > > > > > When framebuffer->MarkAttachmentAsCleared() is called, function SetCleared() > > in > > > the specific TextureAttachment object is called, and finally function > > > SetLevelCleared() in the Texture object is called by TextureManager to > update > > > cleared_ in the Texture object. > > > > > > In the failed case invalidate.whole.unbind_read_stencil, only > > STENCIL_ATTACHMENT > > > of the framebuffer should be invalidated and cleared, and information in > > > DEPTH_ATTACHMENT should be kept. But in current implementation, when you > > intend > > > to mark STENCIL_ATTACHMENT, you can only call the function SetLevelCleared() > > to > > > mark the Texture as a whole by updating the variable cleared_. This can be > > > proved after you call framebuffer->MarkAttachmentAsCleared(..., > > STENCIL_BUFFER), > > > you can call framebuffer -> HasUnclearedAttachment(DEPTH_ATTACHMENT) and > > > framebuffer->HasUnclearedAttachment(STENCIL_ATTACHMENT), and the return > values > > > will be both true because the variable cleared_ in the Texture object is > true. > > > > > > It is not enough just to fix ClearUnclearedAttachment(). You can see > > function() > > > DoDrawArrays() or DoDrawElements() in gles2_cmd_decoder.cc. Before really > > > calling glDrawElements() this function will call ClearUnclearedTextures() at > > > first to make sure there is no uncertain values in all textures. > > > ClearUnclearedTextures() checks all the textures and call > > > texture_manager()->ClearRenderableLevels(), which will finally call the > > function > > > ClearLevel() in gles2_cmd_decoder.cc. In the previous implementation, the > > > function ClearLevel() will just clear every part of the texture by > > > glClear(GL_DEPTH_BUTTER_BIT | GL_STENCIL_BUFFER_BIT). In the situation > before, > > > as the texture has been marked as uncleared, ClearLevel() is called to clear > > the > > > texture, so the depth part, which should not be cleared, is cleared too. > > > > > > So I think the root cause of the bug is that in the previous implementation > > > Textures with format DEPTH_STENCIL fail to describe the state when only a > part > > > of the texture is uncleared, and another part is cleared, so I am trying to > > fix > > > this issue. > > > > Thanks for the detailed explanation. I understand now. So there are only two > > situations that we might have an uncleared image. 1) it's allocated, but not > > initialized (texImage with null data, renderbuffer) 2) we invalidate it > > > > So for 1), we will never clear depth without clearing stencil (or vice versa), > > so no need to worry about it. > > > > for 2), yes, the current implementation is buggy and I still think avoid > > InvalidateFramebuffer to the lower driver when we have DEPTH_STENCIL image and > > we only invalidate depth or stencil bit. > > > > Please let me know if you think this might work. > > For 2), I think the driver can do the right thing to deal with DEPTH_STENCIL > image. You can prove that by commenting the code that marks the attachment as > cleared in invalidateFramebufferImpl(), tests in fboinvalidate can pass, but > when you try to draw the invalidated attachment, you can see there is uncertain > information in the texture. > I fully agree with you and I think we can use glClears to implement > invalidateFramebuffer() instead of calling drivers. Maybe we can also use this > way to implement invalidateSubFramebuffer() which is still an empty function > now. > > Thanks for your advice. I will try it in this way. I don't think we should do clear. It's actually go against the idea of InvalidateFramebuffer, which allows drivers to optimize. It's OK for previous contents from the same context to stay, no need to clear them. We only concerned about undefiend behavior, where potentially some vram from other contexts could sneak in and leak sensitive information. I think just leaving the above InvalidateFramebuffer case and InvalidateSubFramebuffer as no-op is acceptable. It is also spec compliant, because Spec says undefined contents, and leaving image unchanged is one of the undefined behavior.
On 2016/07/15 01:51:43, Zhenyao Mo wrote: > On 2016/07/15 01:45:23, Jiawei wrote: > > On 2016/07/15 01:26:25, Zhenyao Mo wrote: > > > On 2016/07/15 01:20:26, Jiawei wrote: > > > > On 2016/07/14 22:48:14, Zhenyao Mo wrote: > > > > > First, let me clarify this is a bug when we initialize uninitialized > > > > > DEPTH_STENCIL resources? > > > > > > > > > > In a high level (without looking too much details into the CL), what are > > the > > > > > situations that we ended up clear DEPTH without STENCIL or vice versa? > On > > > top > > > > of > > > > > my head, it is only the cases where you attach a DEPTH_STENCIL to only > > > > > DEPTH_ATTACHMENT or STENCIL_ATTACHMENT, but not both. Is that the case? > > > If > > > > > yes, then we simply need to fix that in ClearUnclearedAttachment() > > function, > > > > > which is much less intrusive. > > > > > > > > > > But if I miss the point, please help me understand. > > > > > > > > OK. Here is all my investigation on this issue. I hope it can make some > help > > > to > > > > you. > > > > > > > > Let me use texture as an example, and the situation of renderbuffer is > same. > > > The > > > > bug I find is that in the previous implementation, we can only mark a > > texture > > > > cleared or uncleared as a whole, as there is only one variable cleared_ in > > the > > > > texture object. > > > > > > > > You can pay attention on the function InvalidateFramebufferImpl() in > > > > gles2_cmd_decoder.cc, which is the implementation of WebGL API > > > > invalidateFramebuffer(). This function calls > > > > framebuffer->MarkAttachmentAsCleared(), which is intended to mark the > > specific > > > > attachment of the framebuffer cleared or uncleared. > > > > > > > > The class TextureAttachment represents a specific attachment of a > > framebuffer, > > > > and it wraps the texture attached to the framebuffer. There is a > > pointer-like > > > > variable called texture_ref which points to the texture. The texture with > > > format > > > > DEPTH_STENCIL should be attached to both DEPTH_ATTACHMENT and > > > STENCIL_ATTACHMENT > > > > in the same framebuffer when you use textures with this format as depth > and > > > > stencil attachments, so texture_refs in both depth TextureAttachment and > > > stencil > > > > TextureAttachment point to the same texture with format DEPTH_STENCIL. You > > can > > > > verify this fact by checking the address of texture_ref->texture() in > these > > > two > > > > TextureAttachment objects. The structure of the framebuffer in this > > situation > > > is > > > > as follows: > > > > > > > > DEPTH_ATTACHMENT STENCIL_ATTACHMENT > > > > | | > > > > TextureAttachment TextureAttachment > > > > \ / > > > > \ / > > > > Texture in format DEPTH_STENCIL > > > > > > > > When framebuffer->MarkAttachmentAsCleared() is called, function > SetCleared() > > > in > > > > the specific TextureAttachment object is called, and finally function > > > > SetLevelCleared() in the Texture object is called by TextureManager to > > update > > > > cleared_ in the Texture object. > > > > > > > > In the failed case invalidate.whole.unbind_read_stencil, only > > > STENCIL_ATTACHMENT > > > > of the framebuffer should be invalidated and cleared, and information in > > > > DEPTH_ATTACHMENT should be kept. But in current implementation, when you > > > intend > > > > to mark STENCIL_ATTACHMENT, you can only call the function > SetLevelCleared() > > > to > > > > mark the Texture as a whole by updating the variable cleared_. This can be > > > > proved after you call framebuffer->MarkAttachmentAsCleared(..., > > > STENCIL_BUFFER), > > > > you can call framebuffer -> HasUnclearedAttachment(DEPTH_ATTACHMENT) and > > > > framebuffer->HasUnclearedAttachment(STENCIL_ATTACHMENT), and the return > > values > > > > will be both true because the variable cleared_ in the Texture object is > > true. > > > > > > > > It is not enough just to fix ClearUnclearedAttachment(). You can see > > > function() > > > > DoDrawArrays() or DoDrawElements() in gles2_cmd_decoder.cc. Before really > > > > calling glDrawElements() this function will call ClearUnclearedTextures() > at > > > > first to make sure there is no uncertain values in all textures. > > > > ClearUnclearedTextures() checks all the textures and call > > > > texture_manager()->ClearRenderableLevels(), which will finally call the > > > function > > > > ClearLevel() in gles2_cmd_decoder.cc. In the previous implementation, the > > > > function ClearLevel() will just clear every part of the texture by > > > > glClear(GL_DEPTH_BUTTER_BIT | GL_STENCIL_BUFFER_BIT). In the situation > > before, > > > > as the texture has been marked as uncleared, ClearLevel() is called to > clear > > > the > > > > texture, so the depth part, which should not be cleared, is cleared too. > > > > > > > > So I think the root cause of the bug is that in the previous > implementation > > > > Textures with format DEPTH_STENCIL fail to describe the state when only a > > part > > > > of the texture is uncleared, and another part is cleared, so I am trying > to > > > fix > > > > this issue. > > > > > > Thanks for the detailed explanation. I understand now. So there are only > two > > > situations that we might have an uncleared image. 1) it's allocated, but not > > > initialized (texImage with null data, renderbuffer) 2) we invalidate it > > > > > > So for 1), we will never clear depth without clearing stencil (or vice > versa), > > > so no need to worry about it. > > > > > > for 2), yes, the current implementation is buggy and I still think avoid > > > InvalidateFramebuffer to the lower driver when we have DEPTH_STENCIL image > and > > > we only invalidate depth or stencil bit. > > > > > > Please let me know if you think this might work. > > > > For 2), I think the driver can do the right thing to deal with DEPTH_STENCIL > > image. You can prove that by commenting the code that marks the attachment as > > cleared in invalidateFramebufferImpl(), tests in fboinvalidate can pass, but > > when you try to draw the invalidated attachment, you can see there is > uncertain > > information in the texture. > > I fully agree with you and I think we can use glClears to implement > > invalidateFramebuffer() instead of calling drivers. Maybe we can also use this > > way to implement invalidateSubFramebuffer() which is still an empty function > > now. > > > > Thanks for your advice. I will try it in this way. > > I don't think we should do clear. It's actually go against the idea of > InvalidateFramebuffer, which allows drivers to optimize. It's OK for previous > contents from the same context to stay, no need to clear them. We only > concerned about undefiend behavior, where potentially some vram from other > contexts could sneak in and leak sensitive information. I think just leaving > the above InvalidateFramebuffer case and InvalidateSubFramebuffer as no-op is > acceptable. It is also spec compliant, because Spec says undefined contents, > and leaving image unchanged is one of the undefined behavior. But besides fboinvalidate case, I still think it unacceptable that when the format of the texture is DEPTH_STENCIL, after you call framebuffer->MarkAttachmentAsCleared(...,STENCIL_BUFFER), you call framebuffer -> HasUnclearedAttachment(DEPTH_ATTACHMENT) and framebuffer->HasUnclearedAttachment(STENCIL_ATTACHMENT), and the return values will be both true as the variable cleared_ in the Texture object is false. I think we still need to deal with this situation since it may cause some other potential failures.
On 2016/07/15 01:51:43, Zhenyao Mo wrote: > On 2016/07/15 01:45:23, Jiawei wrote: > > On 2016/07/15 01:26:25, Zhenyao Mo wrote: > > > On 2016/07/15 01:20:26, Jiawei wrote: > > > > On 2016/07/14 22:48:14, Zhenyao Mo wrote: > > > > > First, let me clarify this is a bug when we initialize uninitialized > > > > > DEPTH_STENCIL resources? > > > > > > > > > > In a high level (without looking too much details into the CL), what are > > the > > > > > situations that we ended up clear DEPTH without STENCIL or vice versa? > On > > > top > > > > of > > > > > my head, it is only the cases where you attach a DEPTH_STENCIL to only > > > > > DEPTH_ATTACHMENT or STENCIL_ATTACHMENT, but not both. Is that the case? > > > If > > > > > yes, then we simply need to fix that in ClearUnclearedAttachment() > > function, > > > > > which is much less intrusive. > > > > > > > > > > But if I miss the point, please help me understand. > > > > > > > > OK. Here is all my investigation on this issue. I hope it can make some > help > > > to > > > > you. > > > > > > > > Let me use texture as an example, and the situation of renderbuffer is > same. > > > The > > > > bug I find is that in the previous implementation, we can only mark a > > texture > > > > cleared or uncleared as a whole, as there is only one variable cleared_ in > > the > > > > texture object. > > > > > > > > You can pay attention on the function InvalidateFramebufferImpl() in > > > > gles2_cmd_decoder.cc, which is the implementation of WebGL API > > > > invalidateFramebuffer(). This function calls > > > > framebuffer->MarkAttachmentAsCleared(), which is intended to mark the > > specific > > > > attachment of the framebuffer cleared or uncleared. > > > > > > > > The class TextureAttachment represents a specific attachment of a > > framebuffer, > > > > and it wraps the texture attached to the framebuffer. There is a > > pointer-like > > > > variable called texture_ref which points to the texture. The texture with > > > format > > > > DEPTH_STENCIL should be attached to both DEPTH_ATTACHMENT and > > > STENCIL_ATTACHMENT > > > > in the same framebuffer when you use textures with this format as depth > and > > > > stencil attachments, so texture_refs in both depth TextureAttachment and > > > stencil > > > > TextureAttachment point to the same texture with format DEPTH_STENCIL. You > > can > > > > verify this fact by checking the address of texture_ref->texture() in > these > > > two > > > > TextureAttachment objects. The structure of the framebuffer in this > > situation > > > is > > > > as follows: > > > > > > > > DEPTH_ATTACHMENT STENCIL_ATTACHMENT > > > > | | > > > > TextureAttachment TextureAttachment > > > > \ / > > > > \ / > > > > Texture in format DEPTH_STENCIL > > > > > > > > When framebuffer->MarkAttachmentAsCleared() is called, function > SetCleared() > > > in > > > > the specific TextureAttachment object is called, and finally function > > > > SetLevelCleared() in the Texture object is called by TextureManager to > > update > > > > cleared_ in the Texture object. > > > > > > > > In the failed case invalidate.whole.unbind_read_stencil, only > > > STENCIL_ATTACHMENT > > > > of the framebuffer should be invalidated and cleared, and information in > > > > DEPTH_ATTACHMENT should be kept. But in current implementation, when you > > > intend > > > > to mark STENCIL_ATTACHMENT, you can only call the function > SetLevelCleared() > > > to > > > > mark the Texture as a whole by updating the variable cleared_. This can be > > > > proved after you call framebuffer->MarkAttachmentAsCleared(..., > > > STENCIL_BUFFER), > > > > you can call framebuffer -> HasUnclearedAttachment(DEPTH_ATTACHMENT) and > > > > framebuffer->HasUnclearedAttachment(STENCIL_ATTACHMENT), and the return > > values > > > > will be both true because the variable cleared_ in the Texture object is > > true. > > > > > > > > It is not enough just to fix ClearUnclearedAttachment(). You can see > > > function() > > > > DoDrawArrays() or DoDrawElements() in gles2_cmd_decoder.cc. Before really > > > > calling glDrawElements() this function will call ClearUnclearedTextures() > at > > > > first to make sure there is no uncertain values in all textures. > > > > ClearUnclearedTextures() checks all the textures and call > > > > texture_manager()->ClearRenderableLevels(), which will finally call the > > > function > > > > ClearLevel() in gles2_cmd_decoder.cc. In the previous implementation, the > > > > function ClearLevel() will just clear every part of the texture by > > > > glClear(GL_DEPTH_BUTTER_BIT | GL_STENCIL_BUFFER_BIT). In the situation > > before, > > > > as the texture has been marked as uncleared, ClearLevel() is called to > clear > > > the > > > > texture, so the depth part, which should not be cleared, is cleared too. > > > > > > > > So I think the root cause of the bug is that in the previous > implementation > > > > Textures with format DEPTH_STENCIL fail to describe the state when only a > > part > > > > of the texture is uncleared, and another part is cleared, so I am trying > to > > > fix > > > > this issue. > > > > > > Thanks for the detailed explanation. I understand now. So there are only > two > > > situations that we might have an uncleared image. 1) it's allocated, but not > > > initialized (texImage with null data, renderbuffer) 2) we invalidate it > > > > > > So for 1), we will never clear depth without clearing stencil (or vice > versa), > > > so no need to worry about it. > > > > > > for 2), yes, the current implementation is buggy and I still think avoid > > > InvalidateFramebuffer to the lower driver when we have DEPTH_STENCIL image > and > > > we only invalidate depth or stencil bit. > > > > > > Please let me know if you think this might work. > > > > For 2), I think the driver can do the right thing to deal with DEPTH_STENCIL > > image. You can prove that by commenting the code that marks the attachment as > > cleared in invalidateFramebufferImpl(), tests in fboinvalidate can pass, but > > when you try to draw the invalidated attachment, you can see there is > uncertain > > information in the texture. > > I fully agree with you and I think we can use glClears to implement > > invalidateFramebuffer() instead of calling drivers. Maybe we can also use this > > way to implement invalidateSubFramebuffer() which is still an empty function > > now. > > > > Thanks for your advice. I will try it in this way. > > I don't think we should do clear. It's actually go against the idea of > InvalidateFramebuffer, which allows drivers to optimize. It's OK for previous > contents from the same context to stay, no need to clear them. We only > concerned about undefiend behavior, where potentially some vram from other > contexts could sneak in and leak sensitive information. I think just leaving > the above InvalidateFramebuffer case and InvalidateSubFramebuffer as no-op is > acceptable. It is also spec compliant, because Spec says undefined contents, > and leaving image unchanged is one of the undefined behavior. I agree with Mo's assessment that Chrome should just make the InvalidateFramebuffer call a no-op if the renderbuffer attachment is DEPTH_STENCIL and the invalidate call would invalidate only one, but not both, of those attachments. This is legal according to both the ES 3.0 specification as well as the WebGL 2.0 specification, which has stricter language: https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.29 . We can advise developers that if they want to use InvalidateFramebuffer and get best performance, they should invalidate both DEPTH and STENCIL attachments at the same time. We've seen performance problems in the past on some GPUs in clearing just the DEPTH or STENCIL portion of a packed DEPTH_STENCIL framebuffer attachment. See http://crbug.com/584807 . I assume the same performance issues would be present in real drivers when invalidating one, but not both, of these attachments.
On 2016/07/15 02:00:29, Jiawei wrote: > But besides fboinvalidate case, I still think it unacceptable that when the > format of the texture is DEPTH_STENCIL, after you call > framebuffer->MarkAttachmentAsCleared(...,STENCIL_BUFFER), you call framebuffer > -> HasUnclearedAttachment(DEPTH_ATTACHMENT) and > framebuffer->HasUnclearedAttachment(STENCIL_ATTACHMENT), and the return values > will be both true as the variable cleared_ in the Texture object is false. > > I think we still need to deal with this situation since it may cause some other > potential failures. Is there any situation where this can happen aside from calling InvalidateFramebuffer?
On 2016/07/15 02:02:00, Ken Russell wrote: > On 2016/07/15 01:51:43, Zhenyao Mo wrote: > > On 2016/07/15 01:45:23, Jiawei wrote: > > > On 2016/07/15 01:26:25, Zhenyao Mo wrote: > > > > On 2016/07/15 01:20:26, Jiawei wrote: > > > > > On 2016/07/14 22:48:14, Zhenyao Mo wrote: > > > > > > First, let me clarify this is a bug when we initialize uninitialized > > > > > > DEPTH_STENCIL resources? > > > > > > > > > > > > In a high level (without looking too much details into the CL), what > are > > > the > > > > > > situations that we ended up clear DEPTH without STENCIL or vice versa? > > On > > > > top > > > > > of > > > > > > my head, it is only the cases where you attach a DEPTH_STENCIL to only > > > > > > DEPTH_ATTACHMENT or STENCIL_ATTACHMENT, but not both. Is that the > case? > > > > > If > > > > > > yes, then we simply need to fix that in ClearUnclearedAttachment() > > > function, > > > > > > which is much less intrusive. > > > > > > > > > > > > But if I miss the point, please help me understand. > > > > > > > > > > OK. Here is all my investigation on this issue. I hope it can make some > > help > > > > to > > > > > you. > > > > > > > > > > Let me use texture as an example, and the situation of renderbuffer is > > same. > > > > The > > > > > bug I find is that in the previous implementation, we can only mark a > > > texture > > > > > cleared or uncleared as a whole, as there is only one variable cleared_ > in > > > the > > > > > texture object. > > > > > > > > > > You can pay attention on the function InvalidateFramebufferImpl() in > > > > > gles2_cmd_decoder.cc, which is the implementation of WebGL API > > > > > invalidateFramebuffer(). This function calls > > > > > framebuffer->MarkAttachmentAsCleared(), which is intended to mark the > > > specific > > > > > attachment of the framebuffer cleared or uncleared. > > > > > > > > > > The class TextureAttachment represents a specific attachment of a > > > framebuffer, > > > > > and it wraps the texture attached to the framebuffer. There is a > > > pointer-like > > > > > variable called texture_ref which points to the texture. The texture > with > > > > format > > > > > DEPTH_STENCIL should be attached to both DEPTH_ATTACHMENT and > > > > STENCIL_ATTACHMENT > > > > > in the same framebuffer when you use textures with this format as depth > > and > > > > > stencil attachments, so texture_refs in both depth TextureAttachment and > > > > stencil > > > > > TextureAttachment point to the same texture with format DEPTH_STENCIL. > You > > > can > > > > > verify this fact by checking the address of texture_ref->texture() in > > these > > > > two > > > > > TextureAttachment objects. The structure of the framebuffer in this > > > situation > > > > is > > > > > as follows: > > > > > > > > > > DEPTH_ATTACHMENT STENCIL_ATTACHMENT > > > > > | | > > > > > TextureAttachment TextureAttachment > > > > > \ / > > > > > \ / > > > > > Texture in format DEPTH_STENCIL > > > > > > > > > > When framebuffer->MarkAttachmentAsCleared() is called, function > > SetCleared() > > > > in > > > > > the specific TextureAttachment object is called, and finally function > > > > > SetLevelCleared() in the Texture object is called by TextureManager to > > > update > > > > > cleared_ in the Texture object. > > > > > > > > > > In the failed case invalidate.whole.unbind_read_stencil, only > > > > STENCIL_ATTACHMENT > > > > > of the framebuffer should be invalidated and cleared, and information in > > > > > DEPTH_ATTACHMENT should be kept. But in current implementation, when you > > > > intend > > > > > to mark STENCIL_ATTACHMENT, you can only call the function > > SetLevelCleared() > > > > to > > > > > mark the Texture as a whole by updating the variable cleared_. This can > be > > > > > proved after you call framebuffer->MarkAttachmentAsCleared(..., > > > > STENCIL_BUFFER), > > > > > you can call framebuffer -> HasUnclearedAttachment(DEPTH_ATTACHMENT) and > > > > > framebuffer->HasUnclearedAttachment(STENCIL_ATTACHMENT), and the return > > > values > > > > > will be both true because the variable cleared_ in the Texture object is > > > true. > > > > > > > > > > It is not enough just to fix ClearUnclearedAttachment(). You can see > > > > function() > > > > > DoDrawArrays() or DoDrawElements() in gles2_cmd_decoder.cc. Before > really > > > > > calling glDrawElements() this function will call > ClearUnclearedTextures() > > at > > > > > first to make sure there is no uncertain values in all textures. > > > > > ClearUnclearedTextures() checks all the textures and call > > > > > texture_manager()->ClearRenderableLevels(), which will finally call the > > > > function > > > > > ClearLevel() in gles2_cmd_decoder.cc. In the previous implementation, > the > > > > > function ClearLevel() will just clear every part of the texture by > > > > > glClear(GL_DEPTH_BUTTER_BIT | GL_STENCIL_BUFFER_BIT). In the situation > > > before, > > > > > as the texture has been marked as uncleared, ClearLevel() is called to > > clear > > > > the > > > > > texture, so the depth part, which should not be cleared, is cleared too. > > > > > > > > > > So I think the root cause of the bug is that in the previous > > implementation > > > > > Textures with format DEPTH_STENCIL fail to describe the state when only > a > > > part > > > > > of the texture is uncleared, and another part is cleared, so I am trying > > to > > > > fix > > > > > this issue. > > > > > > > > Thanks for the detailed explanation. I understand now. So there are only > > two > > > > situations that we might have an uncleared image. 1) it's allocated, but > not > > > > initialized (texImage with null data, renderbuffer) 2) we invalidate it > > > > > > > > So for 1), we will never clear depth without clearing stencil (or vice > > versa), > > > > so no need to worry about it. > > > > > > > > for 2), yes, the current implementation is buggy and I still think avoid > > > > InvalidateFramebuffer to the lower driver when we have DEPTH_STENCIL image > > and > > > > we only invalidate depth or stencil bit. > > > > > > > > Please let me know if you think this might work. > > > > > > For 2), I think the driver can do the right thing to deal with DEPTH_STENCIL > > > image. You can prove that by commenting the code that marks the attachment > as > > > cleared in invalidateFramebufferImpl(), tests in fboinvalidate can pass, but > > > when you try to draw the invalidated attachment, you can see there is > > uncertain > > > information in the texture. > > > I fully agree with you and I think we can use glClears to implement > > > invalidateFramebuffer() instead of calling drivers. Maybe we can also use > this > > > way to implement invalidateSubFramebuffer() which is still an empty function > > > now. > > > > > > Thanks for your advice. I will try it in this way. > > > > I don't think we should do clear. It's actually go against the idea of > > InvalidateFramebuffer, which allows drivers to optimize. It's OK for previous > > contents from the same context to stay, no need to clear them. We only > > concerned about undefiend behavior, where potentially some vram from other > > contexts could sneak in and leak sensitive information. I think just leaving > > the above InvalidateFramebuffer case and InvalidateSubFramebuffer as no-op is > > acceptable. It is also spec compliant, because Spec says undefined contents, > > and leaving image unchanged is one of the undefined behavior. > > I agree with Mo's assessment that Chrome should just make the > InvalidateFramebuffer call a no-op if the renderbuffer attachment is > DEPTH_STENCIL and the invalidate call would invalidate only one, but not both, > of those attachments. This is legal according to both the ES 3.0 specification > as well as the WebGL 2.0 specification, which has stricter language: > https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.29 . > > We can advise developers that if they want to use InvalidateFramebuffer and get > best performance, they should invalidate both DEPTH and STENCIL attachments at > the same time. > > We've seen performance problems in the past on some GPUs in clearing just the > DEPTH or STENCIL portion of a packed DEPTH_STENCIL framebuffer attachment. See > http://crbug.com/584807 . I assume the same performance issues would be present > in real drivers when invalidating one, but not both, of these attachments. Jiawei, let's have a deeper offline investigation and discussion about this CL, in order to have a good understand about this issue.
On 2016/07/15 02:04:03, Ken Russell wrote: > On 2016/07/15 02:00:29, Jiawei wrote: > > But besides fboinvalidate case, I still think it unacceptable that when the > > format of the texture is DEPTH_STENCIL, after you call > > framebuffer->MarkAttachmentAsCleared(...,STENCIL_BUFFER), you call framebuffer > > -> HasUnclearedAttachment(DEPTH_ATTACHMENT) and > > framebuffer->HasUnclearedAttachment(STENCIL_ATTACHMENT), and the return values > > will be both true as the variable cleared_ in the Texture object is false. > > > > I think we still need to deal with this situation since it may cause some > other > > potential failures. > > Is there any situation where this can happen aside from calling > InvalidateFramebuffer? Once we fix this, there will be no path leading to it. Even if a user calls Clear(DEPTH_BIT) or Clear(STENCIL_BIT), we still clear all uncleared attachments first before calling the user issued Clear. The current InvalidateFramebuffer is the only path that could lead to it, and this CL should fix that problem.
The CQ bit was checked by jiawei.shao@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of description without "master." prefix is deprecated: tryserver.chromium.linux tryserver.chromium.mac tryserver.chromium.win For more details, see http://crbug.com/617627.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: No L-G-T-M from a valid reviewer yet. CQ run can only be started by full committers or once the patch has received an L-G-T-M from a full committer. Even if an L-G-T-M may have been provided, it was from a non-committer, _not_ a full super star committer. See http://www.chromium.org/getting-involved/become-a-committer Note that this has nothing to do with OWNERS files.
Description was changed from ========== Add depth_cleared_ and stencil_cleared_ for class texture and renderbuffer. Textures and renderbuffers in format DEPTH_STENCIL contain both depth and stencil information. Without this patch we can only mark the texture and renderbuffer as a whole, which may wrongly clear the part that should not be cleared. We should add two flags to mark if the specific part of the texture or renderbuffer is cleared, then we will be able to just clear the unclear part of the texture or renderbuffer. All the cases in WebGL 2 comformance test deqp/functional/gles3/fboinvalidate/whole.html can pass with this patch. BUG= TEST=https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make the invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. In SPEC it is acceptable for WebGL 2.0 implementations to make invalidateFramebuffer or invalidateSubFramebuffer a no-op. This patch can also fix bugs in the current implementation of invalidateFramebuffer. BUG=628496 TEST = https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make the invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. In SPEC it is acceptable for WebGL 2.0 implementations to make invalidateFramebuffer or invalidateSubFramebuffer a no-op. This patch can also fix bugs in the current implementation of invalidateFramebuffer. BUG=628496 TEST = https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make the invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST = https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel ==========
The CQ bit was checked by jiawei.shao@intel.com
The CQ bit was checked by jiawei.shao@intel.com
The CQ bit was unchecked by jiawei.shao@intel.com
The CQ bit was unchecked by jiawei.shao@intel.com
The CQ bit was checked by jiawei.shao@intel.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of description without "master." prefix is deprecated: tryserver.chromium.linux tryserver.chromium.mac tryserver.chromium.win For more details, see http://crbug.com/617627.
The CQ bit was unchecked by commit-bot@chromium.org
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full committers or once the patch has received an L-G-T-M from a full committer. Even if an L-G-T-M may have been provided, it was from a non-committer, _not_ a full super star committer. See http://www.chromium.org/getting-involved/become-a-committer Note that this has nothing to do with OWNERS files.
The CQ bit was unchecked by jiawei.shao@intel.com
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make the invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST = https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make the invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST = https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make the invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST = https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make the invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST = https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make the invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST = https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make the invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST=https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make the invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST=https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make the invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST= https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Hi Ken & Mo, Could you help to review it now? It only deals with DEPTH_STENCIL format and keeps other formats as-is. Jiawei, please fix some formatting issues. https://codereview.chromium.org/2149523002/diff/60001/gpu/command_buffer/serv... File gpu/command_buffer/service/framebuffer_manager.cc (right): https://codereview.chromium.org/2149523002/diff/60001/gpu/command_buffer/serv... gpu/command_buffer/service/framebuffer_manager.cc:413: GL_DEPTH_STENCIL; 4 space indent. https://codereview.chromium.org/2149523002/diff/60001/gpu/command_buffer/serv... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/2149523002/diff/60001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:5668: framebuffer->HasDepthStencilFormatAttachment( 4 space indent.
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make the invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST= https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST= https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST= https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST= https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST= https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST= https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST= https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST= https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST= https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/fboinv... CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST=deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ==========
On 2016/07/18 04:50:09, qiankun wrote: > Hi Ken & Mo, > Could you help to review it now? It only deals with DEPTH_STENCIL format and > keeps other formats as-is. > > Jiawei, please fix some formatting issues. > > https://codereview.chromium.org/2149523002/diff/60001/gpu/command_buffer/serv... > File gpu/command_buffer/service/framebuffer_manager.cc (right): > > https://codereview.chromium.org/2149523002/diff/60001/gpu/command_buffer/serv... > gpu/command_buffer/service/framebuffer_manager.cc:413: GL_DEPTH_STENCIL; > 4 space indent. > > https://codereview.chromium.org/2149523002/diff/60001/gpu/command_buffer/serv... > File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): > > https://codereview.chromium.org/2149523002/diff/60001/gpu/command_buffer/serv... > gpu/command_buffer/service/gles2_cmd_decoder.cc:5668: > framebuffer->HasDepthStencilFormatAttachment( > 4 space indent. lgtm once the indent issues are fixed.
On 2016/07/18 05:48:07, Zhenyao Mo wrote: > On 2016/07/18 04:50:09, qiankun wrote: > > Hi Ken & Mo, > > Could you help to review it now? It only deals with DEPTH_STENCIL format and > > keeps other formats as-is. > > > > Jiawei, please fix some formatting issues. > > > > > https://codereview.chromium.org/2149523002/diff/60001/gpu/command_buffer/serv... > > File gpu/command_buffer/service/framebuffer_manager.cc (right): > > > > > https://codereview.chromium.org/2149523002/diff/60001/gpu/command_buffer/serv... > > gpu/command_buffer/service/framebuffer_manager.cc:413: GL_DEPTH_STENCIL; > > 4 space indent. > > > > > https://codereview.chromium.org/2149523002/diff/60001/gpu/command_buffer/serv... > > File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): > > > > > https://codereview.chromium.org/2149523002/diff/60001/gpu/command_buffer/serv... > > gpu/command_buffer/service/gles2_cmd_decoder.cc:5668: > > framebuffer->HasDepthStencilFormatAttachment( > > 4 space indent. > > lgtm once the indent issues are fixed. The indent issues are fixed. Ken, could you take another look?
https://codereview.chromium.org/2149523002/diff/80001/gpu/command_buffer/serv... File gpu/command_buffer/service/framebuffer_manager.cc (right): https://codereview.chromium.org/2149523002/diff/80001/gpu/command_buffer/serv... gpu/command_buffer/service/framebuffer_manager.cc:538: // TODO: when the texture or the renderbuffer in format DEPTH_STENCIL, mark This TODO needs an owner; see https://google.github.io/styleguide/cppguide.html#TODO_Comments . Please either add yourself or zmo. Thanks. https://codereview.chromium.org/2149523002/diff/80001/gpu/command_buffer/serv... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/2149523002/diff/80001/gpu/command_buffer/serv... gpu/command_buffer/service/gles2_cmd_decoder.cc:5773: if (attachments[i] == GL_DEPTH_STENCIL_ATTACHMENT) { This looks wrong. It's referencing the attachments array, but count is the length of the validated_attachments array, which might be less. A unit test is needed for this change, in framebuffer_manager_unittest.cc.
The CQ bit was checked by jiawei.shao@intel.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of description without "master." prefix is deprecated: tryserver.chromium.mac tryserver.chromium.linux For more details, see http://crbug.com/617627.
The CQ bit was unchecked by zmo@chromium.org
Sorry I unchecked commit button. Please address kbr's comments first.
On 2016/07/19 02:58:19, Zhenyao Mo wrote: > Sorry I unchecked commit button. Please address kbr's comments first. Sorry I clicked the buttom wrongly...... Sorry to disturb all of you.
On 2016/07/18 18:34:20, Ken Russell wrote: > https://codereview.chromium.org/2149523002/diff/80001/gpu/command_buffer/serv... > File gpu/command_buffer/service/framebuffer_manager.cc (right): > > https://codereview.chromium.org/2149523002/diff/80001/gpu/command_buffer/serv... > gpu/command_buffer/service/framebuffer_manager.cc:538: // TODO: when the texture > or the renderbuffer in format DEPTH_STENCIL, mark > This TODO needs an owner; see > https://google.github.io/styleguide/cppguide.html#TODO_Comments . Please either > add yourself or zmo. Thanks. > > https://codereview.chromium.org/2149523002/diff/80001/gpu/command_buffer/serv... > File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): > > https://codereview.chromium.org/2149523002/diff/80001/gpu/command_buffer/serv... > gpu/command_buffer/service/gles2_cmd_decoder.cc:5773: if (attachments[i] == > GL_DEPTH_STENCIL_ATTACHMENT) { > This looks wrong. It's referencing the attachments array, but count is the > length of the validated_attachments array, which might be less. > > A unit test is needed for this change, in framebuffer_manager_unittest.cc. I found the unit test for InvalidateFramebuffer is defined in gles2_cmd_decoder_unittest_framebuffer.cc. Do you mean I should just add tests to test the added function in framebuffer_manager?
On 2016/07/19 11:46:16, Jiawei wrote: > On 2016/07/18 18:34:20, Ken Russell wrote: > > > https://codereview.chromium.org/2149523002/diff/80001/gpu/command_buffer/serv... > > File gpu/command_buffer/service/framebuffer_manager.cc (right): > > > > > https://codereview.chromium.org/2149523002/diff/80001/gpu/command_buffer/serv... > > gpu/command_buffer/service/framebuffer_manager.cc:538: // TODO: when the > texture > > or the renderbuffer in format DEPTH_STENCIL, mark > > This TODO needs an owner; see > > https://google.github.io/styleguide/cppguide.html#TODO_Comments . Please > either > > add yourself or zmo. Thanks. > > > > > https://codereview.chromium.org/2149523002/diff/80001/gpu/command_buffer/serv... > > File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): > > > > > https://codereview.chromium.org/2149523002/diff/80001/gpu/command_buffer/serv... > > gpu/command_buffer/service/gles2_cmd_decoder.cc:5773: if (attachments[i] == > > GL_DEPTH_STENCIL_ATTACHMENT) { > > This looks wrong. It's referencing the attachments array, but count is the > > length of the validated_attachments array, which might be less. > > > > A unit test is needed for this change, in framebuffer_manager_unittest.cc. > > I found the unit test for InvalidateFramebuffer is defined in > gles2_cmd_decoder_unittest_framebuffer.cc. Do you mean I should just add tests > to test the added function in framebuffer_manager? Thanks Ken for finding this bug in this CL. Basically your CL does not fix the WebGL failing test at all. At least you should verify the CL fixes the bug you try to fix. A unittest should be added to gles2_cmd_decoder_unittest_framebuffer.cc where you should create a framebuffer, a renderbuffer with DEPTH_STENCIL format, and set it as cleared. Then trigger an invalidateFramebuffer(DEPTH) call, and make sure 1) the GL's invalidateFramebuffer is not called 2) the renderbuffer remains cleared(). If you need help writing this test, just fix the bug in this CL first, then I can help with writing the unittest.
jiawei, per offline discussion with kbr, please fix the bug and get the conformance test to pass. Let's land the CL without the unittest since we are pushing for getting all conformance tests to pass before Siggraph and for someone who never wrote a unittest in command buffer, it's not trivia task and might take some time. After this CL lands, either I can help you with writing this test (could point you to a few examples you can learn from), or I can write this test, whichever you prefer.
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. This patch can also fix bugs in the former implementation of invalidateFramebuffer. BUG=628496 TEST=deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. BUG=628496 TEST=deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ==========
On 2016/07/19 20:48:19, Zhenyao Mo wrote: > jiawei, per offline discussion with kbr, please fix the bug and get the > conformance test to pass. > > Let's land the CL without the unittest since we are pushing for getting all > conformance tests to pass before Siggraph and for someone who never wrote a > unittest in command buffer, it's not trivia task and might take some time. After > this CL lands, either I can help you with writing this test (could point you to > a few examples you can learn from), or I can write this test, whichever you > prefer. Thanks a lot! I test this patch on Linux Mesa and NVidia and verify that all fboinvalidate tests can pass on both platforms now.
lgtm Please wait and let kbr take another look
https://codereview.chromium.org/2149523002/diff/100001/gpu/command_buffer/ser... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/2149523002/diff/100001/gpu/command_buffer/ser... gpu/command_buffer/service/gles2_cmd_decoder.cc:7040: framebuffer->AttachRenderbuffer(attachment, renderbuffer); If attachment is GL_DEPTH_STENCIL_ATTACHMENT, framebuffer will attach renderbuffer to GL_DEPTH_STENCIL_ATTACHMENT here. has_depth_stencil_format check in line 5682 will fail though framebuffer has attachment in depth_stencil format.
https://codereview.chromium.org/2149523002/diff/100001/gpu/command_buffer/ser... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/2149523002/diff/100001/gpu/command_buffer/ser... gpu/command_buffer/service/gles2_cmd_decoder.cc:7040: framebuffer->AttachRenderbuffer(attachment, renderbuffer); On 2016/07/20 18:54:57, qiankun wrote: > If attachment is GL_DEPTH_STENCIL_ATTACHMENT, framebuffer will attach > renderbuffer to GL_DEPTH_STENCIL_ATTACHMENT here. has_depth_stencil_format check > in line 5682 will fail though framebuffer has attachment in depth_stencil > format. Actually I think somewhere before reaching here, we already split DEPTH_STENCIL into DEPTH and STENCIL. We should DCHECK in AttachRenderbuffer or AttachTexture to make sure of that, but that's for another CL. Let me dig a bit and find the code.
https://codereview.chromium.org/2149523002/diff/100001/gpu/command_buffer/ser... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/2149523002/diff/100001/gpu/command_buffer/ser... gpu/command_buffer/service/gles2_cmd_decoder.cc:7040: framebuffer->AttachRenderbuffer(attachment, renderbuffer); On 2016/07/20 19:08:20, Zhenyao Mo wrote: > On 2016/07/20 18:54:57, qiankun wrote: > > If attachment is GL_DEPTH_STENCIL_ATTACHMENT, framebuffer will attach > > renderbuffer to GL_DEPTH_STENCIL_ATTACHMENT here. has_depth_stencil_format > check > > in line 5682 will fail though framebuffer has attachment in depth_stencil > > format. > > Actually I think somewhere before reaching here, we already split DEPTH_STENCIL > into DEPTH and STENCIL. We should DCHECK in AttachRenderbuffer or AttachTexture > to make sure of that, but that's for another CL. Let me dig a bit and find the > code. Yeah, see GLES2DecoderImpl::DoFramebufferRenderbuffer
On 2016/07/20 19:09:51, Zhenyao Mo wrote: > https://codereview.chromium.org/2149523002/diff/100001/gpu/command_buffer/ser... > File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): > > https://codereview.chromium.org/2149523002/diff/100001/gpu/command_buffer/ser... > gpu/command_buffer/service/gles2_cmd_decoder.cc:7040: > framebuffer->AttachRenderbuffer(attachment, renderbuffer); > On 2016/07/20 19:08:20, Zhenyao Mo wrote: > > On 2016/07/20 18:54:57, qiankun wrote: > > > If attachment is GL_DEPTH_STENCIL_ATTACHMENT, framebuffer will attach > > > renderbuffer to GL_DEPTH_STENCIL_ATTACHMENT here. has_depth_stencil_format > > check > > > in line 5682 will fail though framebuffer has attachment in depth_stencil > > > format. > > > > Actually I think somewhere before reaching here, we already split > DEPTH_STENCIL > > into DEPTH and STENCIL. We should DCHECK in AttachRenderbuffer or > AttachTexture > > to make sure of that, but that's for another CL. Let me dig a bit and find > the > > code. > > Yeah, see GLES2DecoderImpl::DoFramebufferRenderbuffer But this call "framebuffer->AttachRenderbuffer(attachment, renderbuffer);" in GLES2DecoderImpl::DoFramebufferRenderbuffer doesn't split into DEPTH and STENCIL for DEPTH_STENCIL. That's what I talked about.
https://codereview.chromium.org/2149523002/diff/100001/gpu/command_buffer/ser... File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/2149523002/diff/100001/gpu/command_buffer/ser... gpu/command_buffer/service/gles2_cmd_decoder.cc:7040: framebuffer->AttachRenderbuffer(attachment, renderbuffer); On 2016/07/20 19:09:51, Zhenyao Mo wrote: > On 2016/07/20 19:08:20, Zhenyao Mo wrote: > > On 2016/07/20 18:54:57, qiankun wrote: > > > If attachment is GL_DEPTH_STENCIL_ATTACHMENT, framebuffer will attach > > > renderbuffer to GL_DEPTH_STENCIL_ATTACHMENT here. has_depth_stencil_format > > check > > > in line 5682 will fail though framebuffer has attachment in depth_stencil > > > format. > > > > Actually I think somewhere before reaching here, we already split > DEPTH_STENCIL > > into DEPTH and STENCIL. We should DCHECK in AttachRenderbuffer or > AttachTexture > > to make sure of that, but that's for another CL. Let me dig a bit and find > the > > code. > > Yeah, see GLES2DecoderImpl::DoFramebufferRenderbuffer You are correct. On blink side, we only split DEPTH_STENCIL into DEPTH and STENCIL if it's WebGL2. Here we should split, and add a DCHECK in Framebuffer, making sure DEPTH_STENCIL never reaches there.
Sorry for the delay re-reviewing -- LGTM. https://codereview.chromium.org/2149523002/diff/100001/gpu/command_buffer/ser... File gpu/command_buffer/service/framebuffer_manager.cc (right): https://codereview.chromium.org/2149523002/diff/100001/gpu/command_buffer/ser... gpu/command_buffer/service/framebuffer_manager.cc:574: // TODO(Jiawei): when the texture or the renderbuffer in format Use full email address please.
The CQ bit was checked by jiawei.shao@intel.com
The patchset sent to the CQ was uploaded after l-g-t-m from kbr@chromium.org, zmo@chromium.org Link to the patchset: https://codereview.chromium.org/2149523002/#ps120001 (title: "Use full email address in TODO")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of description without "master." prefix is deprecated: tryserver.chromium.mac tryserver.chromium.linux For more details, see http://crbug.com/617627.
The CQ bit was unchecked by jiawei.shao@intel.com
The CQ bit was checked by jiawei.shao@intel.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of description without "master." prefix is deprecated: tryserver.chromium.mac tryserver.chromium.linux For more details, see http://crbug.com/617627.
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. BUG=628496 TEST=deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel; tryserver.chromium.mac:mac_optional_gpu_tests_rel; tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. BUG=628496 TEST=deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel; master.tryserver.chromium.mac:mac_optional_gpu_tests_rel; master.tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of description without "master." prefix is deprecated: master.tryserver.chromium.mac For more details, see http://crbug.com/617627.
The CQ bit was unchecked by qiankun.miao@intel.com
The CQ bit was checked by qiankun.miao@intel.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of description without "master." prefix is deprecated: master.tryserver.chromium.mac For more details, see http://crbug.com/617627.
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. BUG=628496 TEST=deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel; master.tryserver.chromium.mac:mac_optional_gpu_tests_rel; master.tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. BUG=628496 TEST=deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ==========
The CQ bit was unchecked by qiankun.miao@intel.com
The CQ bit was checked by qiankun.miao@intel.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. BUG=628496 TEST=deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. BUG=628496 TEST=deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ==========
Message was sent while issue was closed.
Committed patchset #7 (id:120001)
Message was sent while issue was closed.
Description was changed from ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. BUG=628496 TEST=deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel ========== to ========== Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment Due to potential performance issues chrome should just make invalidateFramebuffer call a no-op if the attachment is in DEPTH_STENCIL format and only one part is intended to be invalidated. BUG=628496 TEST=deqp/functional/gles3/fboinvalidate/whole.html?webglVersion=2&quiet=0 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/ce7e217303925cfec9b453ff745e9ebb5f120d95 Cr-Commit-Position: refs/heads/master@{#406821} ==========
Message was sent while issue was closed.
Patchset 7 (id:??) landed as https://crrev.com/ce7e217303925cfec9b453ff745e9ebb5f120d95 Cr-Commit-Position: refs/heads/master@{#406821} |