Skip to content

Commit

Permalink
Regenerate on sdk-1.3.268
Browse files Browse the repository at this point in the history
  • Loading branch information
exrook committed Oct 25, 2023
1 parent 311e449 commit d2e2b56
Show file tree
Hide file tree
Showing 16 changed files with 2,122 additions and 44 deletions.
2 changes: 1 addition & 1 deletion rspirv/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rspirv"
version = "0.11.0+sdk-1.3.243.0"
version = "0.11.0+sdk-1.3.268.0"
authors = ["Lei Zhang <[email protected]>"]
edition = "2018"

Expand Down
74 changes: 74 additions & 0 deletions rspirv/binary/autogen_decode_operand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,17 @@ impl<'a> Decoder<'a> {
Err(Error::StreamExpected(self.offset))
}
}
#[doc = "Decodes and returns the next SPIR-V word as\na SPIR-V HostAccessQualifier value."]
pub fn host_access_qualifier(&mut self) -> Result<spirv::HostAccessQualifier> {
if let Ok(word) = self.word() {
spirv::HostAccessQualifier::from_u32(word).ok_or(Error::HostAccessQualifierUnknown(
self.offset - WORD_NUM_BYTES,
word,
))
} else {
Err(Error::StreamExpected(self.offset))
}
}
#[doc = "Decodes and returns the next SPIR-V word as\na SPIR-V FunctionParameterAttribute value."]
pub fn function_parameter_attribute(&mut self) -> Result<spirv::FunctionParameterAttribute> {
if let Ok(word) = self.word() {
Expand Down Expand Up @@ -431,4 +442,67 @@ impl<'a> Decoder<'a> {
Err(Error::StreamExpected(self.offset))
}
}
#[doc = "Decodes and returns the next SPIR-V word as\na SPIR-V CooperativeMatrixOperands value."]
pub fn cooperative_matrix_operands(&mut self) -> Result<spirv::CooperativeMatrixOperands> {
if let Ok(word) = self.word() {
spirv::CooperativeMatrixOperands::from_bits(word).ok_or(
Error::CooperativeMatrixOperandsUnknown(self.offset - WORD_NUM_BYTES, word),
)
} else {
Err(Error::StreamExpected(self.offset))
}
}
#[doc = "Decodes and returns the next SPIR-V word as\na SPIR-V CooperativeMatrixLayout value."]
pub fn cooperative_matrix_layout(&mut self) -> Result<spirv::CooperativeMatrixLayout> {
if let Ok(word) = self.word() {
spirv::CooperativeMatrixLayout::from_u32(word).ok_or(
Error::CooperativeMatrixLayoutUnknown(self.offset - WORD_NUM_BYTES, word),
)
} else {
Err(Error::StreamExpected(self.offset))
}
}
#[doc = "Decodes and returns the next SPIR-V word as\na SPIR-V CooperativeMatrixUse value."]
pub fn cooperative_matrix_use(&mut self) -> Result<spirv::CooperativeMatrixUse> {
if let Ok(word) = self.word() {
spirv::CooperativeMatrixUse::from_u32(word).ok_or(Error::CooperativeMatrixUseUnknown(
self.offset - WORD_NUM_BYTES,
word,
))
} else {
Err(Error::StreamExpected(self.offset))
}
}
#[doc = "Decodes and returns the next SPIR-V word as\na SPIR-V InitializationModeQualifier value."]
pub fn initialization_mode_qualifier(&mut self) -> Result<spirv::InitializationModeQualifier> {
if let Ok(word) = self.word() {
spirv::InitializationModeQualifier::from_u32(word).ok_or(
Error::InitializationModeQualifierUnknown(self.offset - WORD_NUM_BYTES, word),
)
} else {
Err(Error::StreamExpected(self.offset))
}
}
#[doc = "Decodes and returns the next SPIR-V word as\na SPIR-V LoadCacheControl value."]
pub fn load_cache_control(&mut self) -> Result<spirv::LoadCacheControl> {
if let Ok(word) = self.word() {
spirv::LoadCacheControl::from_u32(word).ok_or(Error::LoadCacheControlUnknown(
self.offset - WORD_NUM_BYTES,
word,
))
} else {
Err(Error::StreamExpected(self.offset))
}
}
#[doc = "Decodes and returns the next SPIR-V word as\na SPIR-V StoreCacheControl value."]
pub fn store_cache_control(&mut self) -> Result<spirv::StoreCacheControl> {
if let Ok(word) = self.word() {
spirv::StoreCacheControl::from_u32(word).ok_or(Error::StoreCacheControlUnknown(
self.offset - WORD_NUM_BYTES,
word,
))
} else {
Err(Error::StreamExpected(self.offset))
}
}
}
24 changes: 24 additions & 0 deletions rspirv/binary/autogen_disas_operand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,27 @@ impl Disassemble for spirv::FragmentShadingRate {
bits.join("|")
}
}
impl Disassemble for spirv::CooperativeMatrixOperands {
fn disassemble(&self) -> String {
if self.is_empty() {
return "None".to_string();
}
let mut bits = vec![];
if self.contains(spirv::CooperativeMatrixOperands::MATRIX_A_SIGNED_COMPONENTS_KHR) {
bits.push("MatrixASignedComponentsKHR")
}
if self.contains(spirv::CooperativeMatrixOperands::MATRIX_B_SIGNED_COMPONENTS_KHR) {
bits.push("MatrixBSignedComponentsKHR")
}
if self.contains(spirv::CooperativeMatrixOperands::MATRIX_C_SIGNED_COMPONENTS_KHR) {
bits.push("MatrixCSignedComponentsKHR")
}
if self.contains(spirv::CooperativeMatrixOperands::MATRIX_RESULT_SIGNED_COMPONENTS_KHR) {
bits.push("MatrixResultSignedComponentsKHR")
}
if self.contains(spirv::CooperativeMatrixOperands::SATURATING_ACCUMULATION_KHR) {
bits.push("SaturatingAccumulationKHR")
}
bits.join("|")
}
}
42 changes: 42 additions & 0 deletions rspirv/binary/autogen_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub enum Error {
OverflowModesUnknown(usize, spirv::Word),
LinkageTypeUnknown(usize, spirv::Word),
AccessQualifierUnknown(usize, spirv::Word),
HostAccessQualifierUnknown(usize, spirv::Word),
FunctionParameterAttributeUnknown(usize, spirv::Word),
DecorationUnknown(usize, spirv::Word),
BuiltInUnknown(usize, spirv::Word),
Expand All @@ -49,6 +50,12 @@ pub enum Error {
RayQueryCommittedIntersectionTypeUnknown(usize, spirv::Word),
RayQueryCandidateIntersectionTypeUnknown(usize, spirv::Word),
PackedVectorFormatUnknown(usize, spirv::Word),
CooperativeMatrixOperandsUnknown(usize, spirv::Word),
CooperativeMatrixLayoutUnknown(usize, spirv::Word),
CooperativeMatrixUseUnknown(usize, spirv::Word),
InitializationModeQualifierUnknown(usize, spirv::Word),
LoadCacheControlUnknown(usize, spirv::Word),
StoreCacheControlUnknown(usize, spirv::Word),
#[doc = r"Failed to decode a string."]
#[doc = r""]
#[doc = r"For structured error handling, the second element could be"]
Expand Down Expand Up @@ -208,6 +215,11 @@ impl fmt::Display for Error {
"unknown value {} for operand kind AccessQualifier at index {}",
word, index
),
Error::HostAccessQualifierUnknown(index, word) => write!(
f,
"unknown value {} for operand kind HostAccessQualifier at index {}",
word, index
),
Error::FunctionParameterAttributeUnknown(index, word) => write!(
f,
"unknown value {} for operand kind FunctionParameterAttribute at index {}",
Expand Down Expand Up @@ -263,6 +275,36 @@ impl fmt::Display for Error {
"unknown value {} for operand kind PackedVectorFormat at index {}",
word, index
),
Error::CooperativeMatrixOperandsUnknown(index, word) => write!(
f,
"unknown value {} for operand kind CooperativeMatrixOperands at index {}",
word, index
),
Error::CooperativeMatrixLayoutUnknown(index, word) => write!(
f,
"unknown value {} for operand kind CooperativeMatrixLayout at index {}",
word, index
),
Error::CooperativeMatrixUseUnknown(index, word) => write!(
f,
"unknown value {} for operand kind CooperativeMatrixUse at index {}",
word, index
),
Error::InitializationModeQualifierUnknown(index, word) => write!(
f,
"unknown value {} for operand kind InitializationModeQualifier at index {}",
word, index
),
Error::LoadCacheControlUnknown(index, word) => write!(
f,
"unknown value {} for operand kind LoadCacheControl at index {}",
word, index
),
Error::StoreCacheControlUnknown(index, word) => write!(
f,
"unknown value {} for operand kind StoreCacheControl at index {}",
word, index
),
Error::DecodeStringFailed(index, ref e) => {
write!(f, "cannot decode string at index {}: {}", index, e)
}
Expand Down
64 changes: 64 additions & 0 deletions rspirv/binary/autogen_parse_operand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ impl<'c, 'd> Parser<'c, 'd> {
GOpKind::AccessQualifier => vec![dr::Operand::AccessQualifier(
self.decoder.access_qualifier()?,
)],
GOpKind::HostAccessQualifier => vec![dr::Operand::HostAccessQualifier(
self.decoder.host_access_qualifier()?,
)],
GOpKind::FunctionParameterAttribute => vec![dr::Operand::FunctionParameterAttribute(
self.decoder.function_parameter_attribute()?,
)],
Expand Down Expand Up @@ -96,11 +99,30 @@ impl<'c, 'd> Parser<'c, 'd> {
GOpKind::PackedVectorFormat => vec![dr::Operand::PackedVectorFormat(
self.decoder.packed_vector_format()?,
)],
GOpKind::CooperativeMatrixOperands => vec![dr::Operand::CooperativeMatrixOperands(
self.decoder.cooperative_matrix_operands()?,
)],
GOpKind::CooperativeMatrixLayout => vec![dr::Operand::CooperativeMatrixLayout(
self.decoder.cooperative_matrix_layout()?,
)],
GOpKind::CooperativeMatrixUse => vec![dr::Operand::CooperativeMatrixUse(
self.decoder.cooperative_matrix_use()?,
)],
GOpKind::InitializationModeQualifier => vec![dr::Operand::InitializationModeQualifier(
self.decoder.initialization_mode_qualifier()?,
)],
GOpKind::LoadCacheControl => vec![dr::Operand::LoadCacheControl(
self.decoder.load_cache_control()?,
)],
GOpKind::StoreCacheControl => vec![dr::Operand::StoreCacheControl(
self.decoder.store_cache_control()?,
)],
GOpKind::IdMemorySemantics => vec![dr::Operand::IdMemorySemantics(self.decoder.id()?)],
GOpKind::IdScope => vec![dr::Operand::IdScope(self.decoder.id()?)],
GOpKind::IdRef => vec![dr::Operand::IdRef(self.decoder.id()?)],
GOpKind::LiteralInteger => vec![dr::Operand::LiteralBit32(self.decoder.bit32()?)],
GOpKind::LiteralString => vec![dr::Operand::LiteralString(self.decoder.string()?)],
GOpKind::LiteralFloat => vec![dr::Operand::LiteralFloat(self.decoder.float()?)],
GOpKind::LiteralExtInstInteger => vec![dr::Operand::LiteralExtInstInteger(
self.decoder.ext_inst_integer()?,
)],
Expand Down Expand Up @@ -325,6 +347,20 @@ impl<'c, 'd> Parser<'c, 'd> {
spirv::ExecutionMode::RoundingModeRTZ => {
vec![dr::Operand::LiteralBit32(self.decoder.bit32()?)]
}
spirv::ExecutionMode::MaxNodeRecursionAMDX => {
vec![dr::Operand::IdRef(self.decoder.id()?)]
}
spirv::ExecutionMode::StaticNumWorkgroupsAMDX => vec![
dr::Operand::IdRef(self.decoder.id()?),
dr::Operand::IdRef(self.decoder.id()?),
dr::Operand::IdRef(self.decoder.id()?),
],
spirv::ExecutionMode::ShaderIndexAMDX => vec![dr::Operand::IdRef(self.decoder.id()?)],
spirv::ExecutionMode::MaxNumWorkgroupsAMDX => vec![
dr::Operand::IdRef(self.decoder.id()?),
dr::Operand::IdRef(self.decoder.id()?),
dr::Operand::IdRef(self.decoder.id()?),
],
spirv::ExecutionMode::OutputPrimitivesNV => {
vec![dr::Operand::LiteralBit32(self.decoder.bit32()?)]
}
Expand Down Expand Up @@ -417,6 +453,13 @@ impl<'c, 'd> Parser<'c, 'd> {
}
spirv::Decoration::AlignmentId => vec![dr::Operand::IdRef(self.decoder.id()?)],
spirv::Decoration::MaxByteOffsetId => vec![dr::Operand::IdRef(self.decoder.id()?)],
spirv::Decoration::NodeSharesPayloadLimitsWithAMDX => {
vec![dr::Operand::IdRef(self.decoder.id()?)]
}
spirv::Decoration::NodeMaxPayloadsAMDX => vec![dr::Operand::IdRef(self.decoder.id()?)],
spirv::Decoration::PayloadNodeNameAMDX => {
vec![dr::Operand::LiteralString(self.decoder.string()?)]
}
spirv::Decoration::SecondaryViewportRelativeNV => {
vec![dr::Operand::LiteralBit32(self.decoder.bit32()?)]
}
Expand Down Expand Up @@ -503,6 +546,19 @@ impl<'c, 'd> Parser<'c, 'd> {
dr::Operand::LiteralBit32(self.decoder.bit32()?),
dr::Operand::FPOperationMode(self.decoder.fp_operation_mode()?),
],
spirv::Decoration::InitModeINTEL => vec![dr::Operand::InitializationModeQualifier(
self.decoder.initialization_mode_qualifier()?,
)],
spirv::Decoration::ImplementInRegisterMapINTEL => {
vec![dr::Operand::LiteralBit32(self.decoder.bit32()?)]
}
spirv::Decoration::HostAccessINTEL => vec![
dr::Operand::HostAccessQualifier(self.decoder.host_access_qualifier()?),
dr::Operand::LiteralString(self.decoder.string()?),
],
spirv::Decoration::FPMaxErrorDecorationINTEL => {
vec![dr::Operand::LiteralFloat(self.decoder.float()?)]
}
spirv::Decoration::LatencyControlLabelINTEL => {
vec![dr::Operand::LiteralBit32(self.decoder.bit32()?)]
}
Expand Down Expand Up @@ -531,6 +587,14 @@ impl<'c, 'd> Parser<'c, 'd> {
spirv::Decoration::MMHostInterfaceWaitRequestINTEL => {
vec![dr::Operand::LiteralBit32(self.decoder.bit32()?)]
}
spirv::Decoration::CacheControlLoadINTEL => vec![
dr::Operand::LiteralBit32(self.decoder.bit32()?),
dr::Operand::LoadCacheControl(self.decoder.load_cache_control()?),
],
spirv::Decoration::CacheControlStoreINTEL => vec![
dr::Operand::LiteralBit32(self.decoder.bit32()?),
dr::Operand::StoreCacheControl(self.decoder.store_cache_control()?),
],
_ => vec![],
})
}
Expand Down
Loading

0 comments on commit d2e2b56

Please sign in to comment.