Add additional driver validation for BCeNabler

This commit is contained in:
Billy Laws 2022-01-11 18:21:30 +00:00
parent bec42142cf
commit 97970e43e0
2 changed files with 4 additions and 3 deletions

View file

@ -24,8 +24,9 @@ enum adrenotools_bcn_type {
* @brief Checks the status of BCn support in the supplied driver
* @param major The major part of VkPhysicalDeviceProperties::driverVersion
* @param minor The minor part of VkPhysicalDeviceProperties::driverVersion
* @param vendorId VkPhysicalDeviceProperties::vendorId
*/
enum adrenotools_bcn_type adrenotools_get_bcn_type(uint32_t major, uint32_t minor);
enum adrenotools_bcn_type adrenotools_get_bcn_type(uint32_t major, uint32_t minor, uint32_t vendorId);
/**
* @brief Patches the Adreno graphics driver to enable support for BCn compressed formats

View file

@ -8,8 +8,8 @@
#include <adrenotools/bcenabler.h>
#include "gen/bcenabler_patch.h"
enum adrenotools_bcn_type adrenotools_get_bcn_type(uint32_t major, uint32_t minor) {
if (major != 512)
enum adrenotools_bcn_type adrenotools_get_bcn_type(uint32_t major, uint32_t minor, uint32_t vendorId) {
if (vendorId != 0x5143 || major != 512)
return ADRENOTOOLS_BCN_INCOMPATIBLE;
if (minor >= 514)