mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-30 10:03:58 +01:00
Fix SPIR-V global binding check, add GLES 320 support (#333)
This commit is contained in:
1 parent
6bb40ce27b
commit
583f218c9d
3 files changed
+11
-7
No files matched your search
@@ -822,8 +822,8 @@ impl Writer {
|
||||
}
|
||||
}
|
||||
|
||||
match global_variable.binding.clone().unwrap() {
|
||||
crate::Binding::Location(location) => {
|
||||
match global_variable.binding {
|
||||
Some(crate::Binding::Location(location)) => {
|
||||
self.annotations
|
||||
.push(super::instructions::instruction_decorate(
|
||||
id,
|
||||
@@ -831,7 +831,7 @@ impl Writer {
|
||||
&[location],
|
||||
));
|
||||
}
|
||||
crate::Binding::Resource { group, binding } => {
|
||||
Some(crate::Binding::Resource { group, binding }) => {
|
||||
self.annotations
|
||||
.push(super::instructions::instruction_decorate(
|
||||
id,
|
||||
@@ -845,7 +845,7 @@ impl Writer {
|
||||
&[binding],
|
||||
));
|
||||
}
|
||||
crate::Binding::BuiltIn(built_in) => {
|
||||
Some(crate::Binding::BuiltIn(built_in)) => {
|
||||
let built_in = match built_in {
|
||||
crate::BuiltIn::BaseInstance => spirv::BuiltIn::BaseInstance,
|
||||
crate::BuiltIn::BaseVertex => spirv::BuiltIn::BaseVertex,
|
||||
@@ -872,6 +872,7 @@ impl Writer {
|
||||
&[built_in as u32],
|
||||
));
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
|
||||
// TODO Initializer is optional and not (yet) included in the IR
|
||||
|
||||
Reference in new issue
Block a user