generator: Limit pCode member workaround to VkShaderModuleCreateInfo (#707)

An upcoming extension will ship with an untyped `pCode` member (`void
*`) including a valid `len` field pointing to a `codeSize` field rather
than obscure Latex math and a `/4` expression in `altlen`.  Limit the
scope of our workaround for that SPIR-V-specific `pCode` field to
`VkShaderModuleCreateInfo`.
This commit is contained in:
Marijn Suijten 2023-02-17 19:50:59 +01:00 committed by GitHub
parent 9cd6c07744
commit ee86c65757
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1667,7 +1667,7 @@ pub fn derive_setters(
} }
// Unique cases // Unique cases
if name == "pCode" { if struct_.name == "VkShaderModuleCreateInfo" && name == "pCode" {
return Some(quote!{ return Some(quote!{
#[inline] #[inline]
pub fn code(mut self, code: &'a [u32]) -> Self { pub fn code(mut self, code: &'a [u32]) -> Self {