@@ -40,6 +40,7 @@ std::string GetGLHardwareVendorName( glHardwareVendor_t hardwareVendor )
4040 " Unknown" ,
4141 " Software rasterizer" ,
4242 " API Translator" ,
43+ " Apple" ,
4344 " Arm" ,
4445 " AMD/ATI" ,
4546 " Broadcom" ,
@@ -65,6 +66,7 @@ std::string GetGLDriverVendorName( glDriverVendor_t driverVendor )
6566{
6667 static const std::string driverVendorNames[] = {
6768 " Unknown" ,
69+ " Apple" ,
6870 " AMD/ATI" ,
6971 " Intel" ,
7072 " Mesa" ,
@@ -129,6 +131,33 @@ void DetectGLVendors(
129131 return ;
130132 }
131133
134+ static const std::string appleVendors[] = {
135+ " Apple" ,
136+ " Apple Inc." ,
137+ " Apple Computer, Inc." ,
138+ };
139+
140+ for ( auto & s : appleVendors )
141+ {
142+ if ( vendorString == s )
143+ {
144+ driverVendor = glDriverVendor_t::APPLE;
145+ break ;
146+ }
147+ }
148+
149+ if ( driverVendor == glDriverVendor_t::APPLE )
150+ {
151+ if ( rendererString == " Apple Software Renderer" )
152+ {
153+ hardwareVendor = glHardwareVendor_t::SOFTWARE;
154+ return ;
155+ }
156+
157+ hardwareVendor = glHardwareVendor_t::APPLE;
158+ return ;
159+ }
160+
132161 // This vendor string is used by at least two different Intel drivers.
133162 if ( vendorString == " Intel Corporation" )
134163 {
@@ -225,6 +254,7 @@ void DetectGLVendors(
225254 /* Those substrings at the beginning of a renderer string are assumed to be unambiguous about
226255 the hardware or underlying technology. */
227256 static const std::pair<std::string, glHardwareVendor_t> rendererStartStringHardware[] = {
257+ { " Apple " , glHardwareVendor_t::APPLE },
228258 { " ATI " , glHardwareVendor_t::ATI },
229259 { " AMD " , glHardwareVendor_t::ATI },
230260 { " i915 " , glHardwareVendor_t::INTEL },
0 commit comments