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

Dealing with invalid driver in term of Vulkan capabilities? #92

Open christophe-lunarg opened 3 months ago

christophe-lunarg commented 3 months ago

Some Vulkan implementation seems to report extension that are not published in vk.xml for exemple:

VP_VULKANINFO_AMD_Radeon_RX_6700_XT_2_0_299.json

This file was generated by vulkaninfo adn validated against the profiles schema (https://schema.khronos.org/vulkan/), I am getting:

Message:
Property 'VK_AMD_calibrated_timestamps' has not been defined and the schema does not allow additional properties.
Schema path:
https://schema.khronos.org/vulkan/profiles-0.8.2-280.json#/properties/capabilities/additionalProperties/properties/extensions/additionalProperties
Message:
Property 'VK_AMD_gpa_interface' has not been defined and the schema does not allow additional properties.
Schema path:
https://schema.khronos.org/vulkan/profiles-0.8.2-280.json#/properties/capabilities/additionalProperties/properties/extensions/additionalProperties

I am wondering how you deal with this, it seems a terrible practice not following the Vulkan group convension which will cause some issues with software using these reports as we can't rely on the Vulkan Header version for capabilities.

Would it be possible to mark such report as invalid on gpuinfo.org to avoid some trouble to Vulkan developers? Do you have other case of "invalid" reports? I would be curious about this.

SaschaWillems commented 3 months ago

Sorry, I completely misinterpreted this. I thought it was an issue with the profiles generated from my database, but it isn't.

I generate profiles on the fly, and every time you download a profile a run a pretty involved script (almost 800 lines) that actually checks the report against the schema file. So for e.g. extensions I check if an extension reported by the device is available in the schema, and if not I skip it:

    private function readExtensions() {
        $this->extensions = [];
        $stmnt = DB::$connection->prepare("SELECT name, specversion from deviceextensions de join extensions e on de.extensionid = e.id where reportid = :reportid");
        $stmnt->execute([":reportid" => $this->reportid]);
        $schema_extension_list = $this->json_schema["properties"]["capabilities"]["additionalProperties"]["properties"]["extensions"]["properties"];
        while ($row = $stmnt->fetch(PDO::FETCH_ASSOC)) {
            // Skip extensions that are not defined in the current schema
            if (!key_exists($row['name'], $schema_extension_list)) {
                continue;
            }
            $this->extensions[$row['name']] = intval($row['specversion']);
        }
    }

See https://github.com/SaschaWillems/vulkan.gpuinfo.org/blob/c02c158de690d1e9dbcec83fea3517b1ba232d79/api/v3/getprofile.php#L516C3-L528C6

I do this for all information contained on the profile json, not only extensions.