SaschaWillems / vulkan.gpuinfo.org

Front-End and Back-End for the Vulkan Hardware Database
https://vulkan.gpuinfo.org
GNU Affero General Public License v3.0
23 stars 4 forks source link

Report listings with filters ignores the filter #90

Closed spnda closed 3 months ago

spnda commented 3 months ago

For example, https://vulkan.gpuinfo.org/listreports.php?property=subgroupSize&value=8&platform=all&core=1.1

In the example above, all reports should be listed with a subgroupSize of 8, but it instead lists all reports in the database. It shows all devices with an apiVersion of 1.1 or higher but ignores the property filter. From some testing I couldn't find any property that did work, which seems to indicate a general bug in listreports.php.

spnda commented 3 months ago

Ah, I found the bug.

For the internal reports.php endpoint, the filter map only contains a filter value for the 'coreproperty' key. However, the displaycoreproperty.php site redirects using the 'property' key in the URL. Changing the original URL to use ?coreproperty=subgroupSize instead gives the results as expected.

To fix this, I think this line should be changed: https://github.com/SaschaWillems/vulkan.gpuinfo.org/blob/de6ef465e6265acd08e4c1f0cacbbe2caa02f24e/listreports.php#L296

to instead just use '<?= $coreproperty ?>', (tbh not sure about the syntax as I have no clue about PHP) as that is a variable that was cached above which contains the value from property or coreproperty. However, I have no idea how I'd even begin to test if these changes internally would have the desired effect. Another option would be to have the other site redirect correctly, though, again, no idea what is best. Seems like a regression caused by 8ae290de37f0c9a6783e9ae57fbe5a2d9391caa8.