Attention is currently required from: Sunny Sachanandani.
Geoff Lang would like Sunny Sachanandani to review this change.
DrDC: Opt out of the display level share groups.
DrDC shares textures between contexts using other mechanisms
(AHardwareBuffer). Leaving DrDC contexts in the global texture share
group causes potential threading errors.
Bug: chromium:1268830, chromium:1268389
Change-Id: I89f15bc13886b7d92f28ce2e081ae6b829d490ce
---
M ui/gl/gl_context_egl.cc
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/ui/gl/gl_context_egl.cc b/ui/gl/gl_context_egl.cc
index 480af29..5a1795d 100644
--- a/ui/gl/gl_context_egl.cc
+++ b/ui/gl/gl_context_egl.cc
@@ -210,7 +210,12 @@
}
}
- if (GLSurfaceEGL::IsDisplayTextureShareGroupSupported()) {
+ // Opt into a display-level texture share group if it is supported and this
+ // context is going to be used on the main GPU thread. DrDC does not require
+ // sharing textures with other contexts through this mechanism.
+ if (GLSurfaceEGL::IsDisplayTextureShareGroupSupported() &&
+ attribs.angle_context_virtualization_group_number ==
+ AngleContextVirtualizationGroup::kDefault) {
context_attributes.push_back(EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE);
context_attributes.push_back(
attribs.global_texture_share_group ? EGL_TRUE : EGL_FALSE);
@@ -218,7 +223,9 @@
DCHECK(!attribs.global_texture_share_group);
}
- if (GLSurfaceEGL::IsDisplaySemaphoreShareGroupSupported()) {
+ if (GLSurfaceEGL::IsDisplaySemaphoreShareGroupSupported() &&
+ attribs.angle_context_virtualization_group_number ==
+ AngleContextVirtualizationGroup::kDefault) {
context_attributes.push_back(EGL_DISPLAY_SEMAPHORE_SHARE_GROUP_ANGLE);
context_attributes.push_back(
attribs.global_semaphore_share_group ? EGL_TRUE : EGL_FALSE);
To view, visit change 3313716. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Sunny Sachanandani.
1 comment:
Patchset:
Sunny: PTAL.
Vikas is still doing some manual verification.
To view, visit change 3313716. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Geoff Lang.
Patch set 1:Code-Review +1
1 comment:
Patchset:
lgtm
To view, visit change 3313716. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Geoff Lang.
2 comments:
File ui/gl/gl_context_egl.cc:
Patch Set #1, Line 223: DCHECK(!attribs.global_texture_share_group);
We are hitting this DCHECK when initializing DrDc thread context since it is always set to true for passthrough here - https://source.chromium.org/chromium/chromium/src/+/main:gpu/command_buffer/service/service_utils.cc;drc=e44f41c9d443684e62a7ebb41b644d95c86ad702;l=62
We should modify the code to :
if (GLSurfaceEGL::IsDisplayTextureShareGroupSupported()) {
if(attribs.angle_context_virtualization_group_number ==
AngleContextVirtualizationGroup::kDefault) {
context_attributes.push_back(EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE);
context_attributes.push_back(
attribs.global_texture_share_group ? EGL_TRUE : EGL_FALSE);
}
} else {
DCHECK(!attribs.global_texture_share_group);
}Patch Set #1, Line 233: DCHECK(!attribs.global_semaphore_share_group);
needs same fix as above
To view, visit change 3313716. To unsubscribe, or for help writing mail filters, visit settings.
Geoff Lang abandoned this change.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |