mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[glsl-in] Add support for buffer class
This commit is contained in:
committed by
Dzmitry Malyshau
parent
0184e1c875
commit
803cb31fb0
@@ -62,6 +62,7 @@ impl<'a> Iterator for Lexer<'a> {
|
||||
"in" => TokenValue::In,
|
||||
"out" => TokenValue::Out,
|
||||
"uniform" => TokenValue::Uniform,
|
||||
"buffer" => TokenValue::Buffer,
|
||||
"flat" => TokenValue::Interpolation(crate::Interpolation::Flat),
|
||||
"noperspective" => TokenValue::Interpolation(crate::Interpolation::Linear),
|
||||
"smooth" => TokenValue::Interpolation(crate::Interpolation::Perspective),
|
||||
|
||||
@@ -173,6 +173,7 @@ impl<'source, 'program, 'options> Parser<'source, 'program, 'options> {
|
||||
| TokenValue::In
|
||||
| TokenValue::Out
|
||||
| TokenValue::Uniform
|
||||
| TokenValue::Buffer
|
||||
| TokenValue::Layout => true,
|
||||
_ => false,
|
||||
})
|
||||
@@ -199,6 +200,9 @@ impl<'source, 'program, 'options> Parser<'source, 'program, 'options> {
|
||||
TokenValue::Uniform => TypeQualifier::StorageQualifier(
|
||||
StorageQualifier::StorageClass(StorageClass::Uniform),
|
||||
),
|
||||
TokenValue::Buffer => TypeQualifier::StorageQualifier(
|
||||
StorageQualifier::StorageClass(StorageClass::Storage),
|
||||
),
|
||||
TokenValue::Sampling(s) => TypeQualifier::Sampling(s),
|
||||
|
||||
_ => unreachable!(),
|
||||
|
||||
@@ -53,6 +53,7 @@ pub enum TokenValue {
|
||||
Out,
|
||||
InOut,
|
||||
Uniform,
|
||||
Buffer,
|
||||
Const,
|
||||
Interpolation(Interpolation),
|
||||
Sampling(Sampling),
|
||||
|
||||
Reference in New Issue
Block a user