+ snprintf(drvid->DeviceName, sizeof(drvid->DeviceName),
+ "Gallium 0.4 with %s", ctx->hal->get_vendor(ctx->hal));
+ strncpy(drvid->Description, ctx->hal->get_name(ctx->hal),
+ sizeof(drvid->Description));
+
+ if (override_vendorid > 0) {
+ found = FALSE;
+ /* fill in device_id and card name for fake vendor */
+ for (i = 0; i < sizeof(fallback_cards)/sizeof(fallback_cards[0]); i++) {
+ if (fallback_cards[i].vendor_id == override_vendorid) {
+ DBG("Faking card '%s' vendor 0x%04x, device 0x%04x\n",
+ fallback_cards[i].name,
+ fallback_cards[i].vendor_id,
+ fallback_cards[i].device_id);
+ drvid->VendorId = fallback_cards[i].vendor_id;
+ drvid->DeviceId = fallback_cards[i].device_id;
+ strncpy(drvid->Description, fallback_cards[i].name,
+ sizeof(drvid->Description));
+ found = TRUE;
+ break;
+ }
+ }
+ if (!found) {
+ DBG("Unknown fake vendor 0x%04x! Using detected vendor !\n", override_vendorid);
+ }
+ }
+ /* choose fall-back vendor if necessary to allow
+ * the following functions to return sane results */
+ d3d_match_vendor_id(drvid, fallback_cards[0].vendor_id, fallback_cards[0].device_id, fallback_cards[0].name);
+ /* fill in driver name and version info */
+ d3d_fill_driver_version(drvid);
+ /* override Description field with Windows like names */
+ d3d_fill_cardname(drvid);
+
+ /* this driver isn't WHQL certified */
+ drvid->WHQLLevel = 0;