New issue
Advanced search Search tips

Issue 854817 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Jul 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Swiftshader ES2 doesn't expose correct glVertexAttribDivisor function

Project Member Reported by enne@chromium.org, Jun 20 2018

Issue description

gpu_info_collector.cc forces ES2 and then tries to detect what is supported.  One thing it does is to try to create a GrContext for OOP Raster, if requested.

If using swiftshader, this fails because the gl bindings don't include a valid fVertexAttribDivisor function: https://cs.chromium.org/chromium/src/third_party/skia/src/gpu/gl/GrGLInterface.cpp?q=grglinterface.cpp&sq=package:chromium&g=0&l=541

This is set from here: https://cs.chromium.org/chromium/src/ui/gl/gl_bindings_autogen_gl.cc?type=cs&g=0&l=2208

In the case of ES2, it looks like swiftshader says it provides both the GL_ANGLE_instanced_arrays and GL_EXT_instanced_arrays extensions, but does not expose glVertexAttribDivisorANGLE or glVertexAttribDivisorEXT.  It only looks like it exposes the unsuffixed glVertexAttribDivisor function: https://cs.chromium.org/chromium/src/third_party/swiftshader/src/OpenGL/libGLESv2/libGLESv2.cpp?type=cs&q=es2GetProcAddress&g=0&l=7135

If I change the gl_bindings_autogen.cc code to look for glVertexAttribDivisor, then it finds the function correctly.  However, this doesn't seem like the right solution.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 21 2018

The following revision refers to this bug:
  https://swiftshader.googlesource.com/SwiftShader.git/+/050ef946947a0281d6f22a6008efbb7c361f6728

commit 050ef946947a0281d6f22a6008efbb7c361f6728
Author: Adrienne Walker <enne@chromium.org>
Date: Thu Jun 21 17:35:45 2018

Expose suffixed versions of VertexAttribDivisor

BUG= chromium:854817 

Change-Id: Icd81848fbbf3691eca46c9582b3c053ba1b00353
Reviewed-on: https://swiftshader-review.googlesource.com/19528
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Adrienne Walker <enne@chromium.org>

[modify] https://crrev.com/050ef946947a0281d6f22a6008efbb7c361f6728/src/OpenGL/libGLESv2/libGLESv2.cpp

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 22 2018

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

commit 847108328fbb02e261c2efee5efa316c39dc0a69
Author: Nicolas Capens <capn@chromium.org>
Date: Fri Jun 22 18:18:55 2018

Roll SwiftShader 20eea3c..a9969b2

https://swiftshader.googlesource.com/SwiftShader.git/+log/20eea3c..a9969b2

BUG= chromium:854817 

TEST=bots

CQ_INCLUDE_TRYBOTS=luci.chromium.try:win_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_chromium_cfi_rel_ng;luci.chromium.try:android_optional_gpu_tests_rel

Change-Id: I13d0fab6a29ba96f13f0e74c07b011db36abbeed
Reviewed-on: https://chromium-review.googlesource.com/1112047
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Commit-Queue: Nicolas Capens <capn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569696}
[modify] https://crrev.com/847108328fbb02e261c2efee5efa316c39dc0a69/DEPS

Status: Fixed (was: Available)

Sign in to add a comment