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
parent 56d8507acb
commit 6b6f2ee8a8
No known key found for this signature in database
GPG key ID: 449FC1DE031665DA

View file

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