SaschaWillems / opengles.gpuinfo.org

Web front-end for the OpenGL ES hardware capability database
GNU Affero General Public License v3.0
5 stars 4 forks source link

Missing counts of zero on GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS #7

Closed greggman closed 2 months ago

greggman commented 2 months ago

If I go here

https://opengles.gpuinfo.org/displaycapability.php?name=GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS&esversion=31

Screenshot 2024-06-12 at 11 53 24

But I look at individual reports I see for example this pixel 6 device

https://opengles.gpuinfo.org/displayreport.php?id=7426

Which lists

Screenshot 2024-06-12 at 11 55 34

It seems like the graph is missing counts of 0?

greggman commented 2 months ago

I have close to 0 experience with SQL but I see this line

https://github.com/SaschaWillems/opengles.gpuinfo.org/blob/6ae6d19980628a8b7cf839ba2362994e4e00bf80/displaycapability.php#L72C1-L73C1

    $result = DB::$connection->prepare("SELECT `$name` as value, count(0) as reports from $tablename where `$name` > 0 group by 1 order by 2 desc");

Which looks like it's incorrectly excluding entries with counts of 0?

greggman commented 2 months ago

It's not just that particular capability of course but as an example, this is what the graph should arguably look like for GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS

chart-i

Showing that ~44% of OpenGL ES 3.1+ devices have a limit of 0 vertex shader storage blocks.

value reports
0 1507
4 1333
8 374
12 39
16 69
32 2
35 15
60 4
64 21
2048 1
SaschaWillems commented 2 months ago

Excluding zero values was a deliberate choice back then. Usually zero means that feature is simply not supported, so I'm unsure if removing that constraint would make sense. What would be the use case for having the no. of unsupporting reports listed here? Do you want/need it to get the full picture?

greggman commented 2 months ago

IIUC the point of the graph is to tell you what you can use. You're writing an OpenGL ES 3.1 app, you want to know how many devices can support something. In this particular case, a concrete example, people write a compute shader based particle system. They then want to pass those particle position to a vertex shader as a storage block. According to the existing graphs it looks like they're in luck, all the 3.1 devices in the graph support using at least 4 storage blocks in a vertex shader. But, in reality, 44% of 3.1 devices do not support using storage blocks in a vertex shader as they report 0.

SaschaWillems commented 2 months ago

Makes sense. I have pushed an update to the database that removes this constraint and also displays n/a reports. n/a means reports where this value is not available (=null in the database). For the capability you linked too it'll now look like this:

image

Let me know if that works for you.

Note: Filtering reports for that "n/a" value doesn't work yet, will add that later.

greggman commented 2 months ago

Thanks Sascha!

I'm not sure adding the N/A values is useful. If a device is supporting OpenGL ES 3.1 then there no such thing as this data not being available. So, just guessing that N/A is when someone used an older version of the app to generate a report so the values are missing?

In which case, those reports don't really add to the useful info because with a correct report that device would have had values for the capability and it could be in any one of the actual slots.

Maybe that's what you meant by "filtering for that n/a value doesn't work yet"?

SaschaWillems commented 2 months ago

Makes sense. Removed the null values, so the chart should now look like in your mockup. Let me know if you spot any problems.

greggman commented 2 months ago

Thank you! 🙏