You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: glsl_generics.rs
    path of file: ./repos/shame/shame_graph/src/expr
    
    the code of the file until where you have to start completion: 
use super::{DType, TexDimensionality, Shape, Ty};
use DType::*;
use crate::expr::{OpaqueTy, TexDtypeDimensionality, ShadowSamplerKind, TyKind};

//glsl generics syntax used in Chapter 8 of https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.4.60.pdf
#[allow(non_camel_case_types)]
#[derive(Clone, Copy)]
pub enum GlslGeneric {
    //Chapter 8. Built-In Functions
    int,
    uint,
    float,
    double,
    bool,
    vec2,
    vec3,
    vec4,
    dvec2,
    dvec3,
    dvec4,

    genType, //this is no longer used in glsl spec 4.6, they use genFType instead.
    genFType,
    genDType,
    genBType,
    genUType,
    genIType,

    mat,
    dmat,

    //8.7. Vector Relational Functions
    bvec,
    ivec,
    uvec,
    vec,

    //8.9. Texture Functions
    gvec4,
    gsample
    
    pub fn try_instantiate(&self, ty: &Ty) -> Option<GlslGenericInstantiation> {
        match (self, &ty.kind) {
            
            (Specific(x), _) => (ty.eq_ignore_access(x))
                .then(|| GlslGenericInstantiation::specific),

            (GenXType(x), TyKind::Tensor(ten)) => //GLSL 4.60 spec: "[...] where the input arguments (and corresponding output) can be float, vec2, vec3, or vec4, genFType is used"
                (&ten.dtype == x && matches!(ten.shape, Shape::Vec(_) | Shape::Scalar))
                .then(|| GlslGenericInstantiation::gen(ten.shape)),

            (MatMxN(x), TyKind::Tensor(ten)) => match ten.shape {
                Shape::Mat(m, n) if &ten.dtype == x => Some(GlslGenericInstantiation::matMxN(m, n)),
                _ => None
            }

            (VecN(x), TyKind::Tensor(ten)) => match ten.shape {
                Shape::Vec(n) if &ten.dtype == x => Some(GlslGenericInstantiation::vecN(n)),
                _ => None,
            }
                
            (VecNF32F64, TyKind::Tensor(ten)) => match ten.shape {
                Shape::Vec(n) if [F32, F64].contains(&ten.dtype) => Some(GlslGenericInstantiation::vecN(n)),
                _ => None,
            }

            (GVec4F32I32U32, TyKind::Tensor(ten)) => 
                ([F32, I32, U32].contains(&ten.dtype) && matches!(ten.shape, Shape::Vec(4)))
                .then(|| GlslGenericInstantiation::g(ten.dtype)),

            (GSampler(x), TyKind::Opaque(OpaqueTy::TextureCombinedSampler(TexDtypeDimensionality(dtype, sampler_kind)))) =>
                (x == sampler_kind)
                .then(|| GlslGenericInstantiation::g(*dtype)),

            _ => None,
        }
    }