mirror of
https://github.com/storytold/wgpu.git
synced 2026-12-01 10:34:57 +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
@@ -193,7 +193,9 @@ impl<'a, W> Writer<'a, W> {
|
||||
match ty.inner {
|
||||
TypeInner::Scalar { kind, width } => self.scalar_required_features(kind, width),
|
||||
TypeInner::Vector { kind, width, .. } => self.scalar_required_features(kind, width),
|
||||
TypeInner::Matrix { width, .. } => self.scalar_required_features(ScalarKind::Float, width),
|
||||
TypeInner::Matrix { width, .. } => {
|
||||
self.scalar_required_features(ScalarKind::Float, width)
|
||||
}
|
||||
TypeInner::Array { base, .. } => {
|
||||
if let TypeInner::Array { .. } = self.module.types[base].inner {
|
||||
self.features.request(Features::ARRAY_OF_ARRAYS)
|
||||
|
||||
@@ -67,9 +67,9 @@ mod features;
|
||||
mod keywords;
|
||||
|
||||
/// List of supported core glsl versions
|
||||
const SUPPORTED_CORE_VERSIONS: &[u16] = &[330, 400, 410, 420, 430, 440, 450];
|
||||
pub const SUPPORTED_CORE_VERSIONS: &[u16] = &[330, 400, 410, 420, 430, 440, 450];
|
||||
/// List of supported es glsl versions
|
||||
const SUPPORTED_ES_VERSIONS: &[u16] = &[300, 310];
|
||||
pub const SUPPORTED_ES_VERSIONS: &[u16] = &[300, 310, 320];
|
||||
|
||||
/// glsl version
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
@@ -287,6 +287,7 @@ impl<'a, W: Write> Writer<'a, W> {
|
||||
pub fn new(out: W, module: &'a Module, options: &'a Options) -> Result<Self, Error> {
|
||||
// Check if the requested version is supported
|
||||
if !options.version.is_supported() {
|
||||
log::error!("Version {}", options.version);
|
||||
return Err(Error::VersionNotSupported);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user