Skip to content

Commit

Permalink
[spv-in] Rewrite the comparison image/sample handling.
Browse files Browse the repository at this point in the history
Keep track of the comparison property per global variable instead of  type.
Only track images that can actually be comparison-sampled.
Instead of mutating the type, just add a new type in the end
if we detect it to be necessary, cloning the old name.
  • Loading branch information
kvark committed Feb 8, 2021
1 parent 1086787 commit 6b9d3ea
Show file tree
Hide file tree
Showing 2 changed files with 223 additions and 203 deletions.
8 changes: 3 additions & 5 deletions src/front/spv/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,22 @@ pub enum Error {
InvalidVectorSize(spirv::Word),
InvalidVariableClass(spirv::StorageClass),
InvalidAccessType(spirv::Word),
InvalidAccess(Handle<crate::Expression>),
InvalidAccess(crate::Expression),
InvalidAccessIndex(spirv::Word),
InvalidBinding(spirv::Word),
InvalidImageExpression(Handle<crate::Expression>),
InvalidGlobalVar(crate::Expression),
InvalidImageBaseType(Handle<crate::Type>),
InvalidSampleImage(Handle<crate::Type>),
InvalidSamplerExpression(Handle<crate::Expression>),
InvalidDepthReference(Handle<crate::Type>),
InvalidAsType(Handle<crate::Type>),
InconsistentComparisonSampling(Handle<crate::Type>),
InconsistentComparisonSampling(Handle<crate::GlobalVariable>),
WrongFunctionResultType(spirv::Word),
WrongFunctionArgumentType(spirv::Word),
MissingDecoration(spirv::Decoration),
BadString,
IncompleteData,
InvalidTerminator,
InvalidEdgeClassification,
UnexpectedComparisonType(Handle<crate::Type>),
// incomplete implementation error
UnsupportedRowMajorMatrix,
UnsupportedMatrixStride(spirv::Word),
Expand Down
Loading

0 comments on commit 6b9d3ea

Please sign in to comment.