File tree Expand file tree Collapse file tree 4 files changed +23
-1
lines changed Expand file tree Collapse file tree 4 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ SurfaceConfiguration {
85
85
- Added missing validation for ` BufferUsages ` mismatches when ` Features::MAPPABLE_PRIMARY_BUFFERS ` is not
86
86
enabled. By @imberflur in [ #3023 ] ( https://github.com/gfx-rs/wgpu/pull/3023 )
87
87
- Fixed ` CommandEncoder ` not being ` Send ` and ` Sync ` on web by @i509VCB in [ #3025 ] ( https://github.com/gfx-rs/wgpu/pull/3025 )
88
+ - Document meaning of ` vendor ` in ` AdapterInfo ` if the vendor has no PCI id.
88
89
89
90
#### Metal
90
91
- Add the missing ` msg_send![view, retain] ` call within ` from_view ` by @jinleili in [ #2976 ] ( https://github.com/gfx-rs/wgpu/pull/2976 )
@@ -98,6 +99,10 @@ SurfaceConfiguration {
98
99
and ` VUID-StandaloneSpirv-Flat-04744 ` . By @jimblandy in
99
100
[ #3008 ] ( https://github.com/gfx-rs/wgpu/pull/3008 )
100
101
102
+ #### Gles
103
+ - Report vendor id for Mesa and Apple GPUs. By @i509VCB [ #3036 ] ( https://github.com/gfx-rs/wgpu/pull/3036 )
104
+ - Report Apple M2 gpu as integrated. By @i509VCB [ #3036 ] ( https://github.com/gfx-rs/wgpu/pull/3036 )
105
+
101
106
### Changes
102
107
103
108
#### General
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ pub mod db {
8
8
pub mod amd {
9
9
pub const VENDOR : u32 = 0x1002 ;
10
10
}
11
+ pub mod apple {
12
+ pub const VENDOR : u32 = 0x106B ;
13
+ }
11
14
pub mod arm {
12
15
pub const VENDOR : u32 = 0x13B5 ;
13
16
}
@@ -22,6 +25,13 @@ pub mod db {
22
25
pub const DEVICE_KABY_LAKE_MASK : u32 = 0x5900 ;
23
26
pub const DEVICE_SKY_LAKE_MASK : u32 = 0x1900 ;
24
27
}
28
+ pub mod mesa {
29
+ // Mesa does not actually have a PCI vendor id.
30
+ //
31
+ // To match Vulkan, we use the VkVendorId for Mesa in the gles backend so that lavapipe (Vulkan) and
32
+ // llvmpipe (OpenGL) have the same vendor id.
33
+ pub const VENDOR : u32 = 0x10005 ;
34
+ }
25
35
pub mod nvidia {
26
36
pub const VENDOR : u32 = 0x10DE ;
27
37
}
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ impl super::Adapter {
122
122
"mali" ,
123
123
"intel" ,
124
124
"v3d" ,
125
- "apple m1" ,
125
+ "apple m" , // all apple m are integrated
126
126
] ;
127
127
let strings_that_imply_cpu = [ "mesa offscreen" , "swiftshader" , "llvmpipe" ] ;
128
128
@@ -160,6 +160,10 @@ impl super::Adapter {
160
160
db:: intel:: VENDOR
161
161
} else if vendor. contains ( "broadcom" ) {
162
162
db:: broadcom:: VENDOR
163
+ } else if vendor. contains ( "mesa" ) {
164
+ db:: mesa:: VENDOR
165
+ } else if vendor. contains ( "apple" ) {
166
+ db:: apple:: VENDOR
163
167
} else {
164
168
0
165
169
} ;
Original file line number Diff line number Diff line change @@ -1140,6 +1140,9 @@ pub struct AdapterInfo {
1140
1140
/// Adapter name
1141
1141
pub name : String ,
1142
1142
/// Vendor PCI id of the adapter
1143
+ ///
1144
+ /// If the vendor has no PCI id, then this value will be the backend's vendor id equivalent. On Vulkan,
1145
+ /// Mesa would have a vendor id equivalent to it's `VkVendorId` value.
1143
1146
pub vendor : usize ,
1144
1147
/// PCI id of the adapter
1145
1148
pub device : usize ,
You can’t perform that action at this time.
0 commit comments