{"record":{"id":"452002ddf80f55e6","repo":"vosen/ZLUDA","slug":"unsupported-format","errorCode":null,"errorMessage":"unsupported format","messagePattern":"unsupported format","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"zluda/src/impl/tex.rs","lineNumber":216,"sourceCode":"    #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]\n    enum TexDim {\n        One,\n        Two,\n        Three,\n    }\n\n    /// Returns the byte size of a single element for the given format.\n    fn format_byte_size(fmt: CUarray_format) -> usize {\n        match fmt {\n            CUarray_format_enum::CU_AD_FORMAT_UNSIGNED_INT8\n            | CUarray_format_enum::CU_AD_FORMAT_SIGNED_INT8 => 1,\n            CUarray_format_enum::CU_AD_FORMAT_UNSIGNED_INT16\n            | CUarray_format_enum::CU_AD_FORMAT_SIGNED_INT16\n            | CUarray_format_enum::CU_AD_FORMAT_HALF => 2,\n            CUarray_format_enum::CU_AD_FORMAT_UNSIGNED_INT32\n            | CUarray_format_enum::CU_AD_FORMAT_SIGNED_INT32\n            | CUarray_format_enum::CU_AD_FORMAT_FLOAT => 4,\n            _ => panic!(\"unsupported format\"),\n        }\n    }\n\n    /// Returns true if the format is a floating-point type (HALF or FLOAT).\n    fn format_is_float(fmt: CUarray_format) -> bool {\n        matches!(\n            fmt,\n            CUarray_format_enum::CU_AD_FORMAT_HALF | CUarray_format_enum::CU_AD_FORMAT_FLOAT\n        )\n    }\n\n    /// Write a test value into a host buffer at the given byte offset.\n    /// Returns the expected 4xi32 or 4xf32 result (as [u32; 4] bit pattern).\n    fn write_test_pixel(\n        host_buf: &mut [u8],\n        offset: usize,\n        fmt: CUarray_format,\n        num_channels: u32,","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/vosen/ZLUDA/blob/9c8b43f242985150f86a7f485218b7b82c3e96ca/zluda/src/impl/tex.rs#L198-L234","documentation":"Panic in format_byte_size: the CUarray_format enum value passed by the CUDA application has no entry in the match, so no element byte size can be determined. ZLUDA's emulation of texture reads only supports the fixed set of 8/16/32-bit int, half, and float formats; any other (or future/invalid) format value hits the catch-all arm and aborts.","triggerScenarios":"Thrown at zluda/src/impl/tex.rs:216 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check which CUarray_format the application sets via cuArrayCreate/cuTexRefSetFormat and use a supported format (INT8/16/32, HALF, FLOAT)","Update ZLUDA — newer versions may cover additional formats","For a local build, add the missing format arm with its element size"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9c8b43f242985150f86a7f485218b7b82c3e96ca","analyzedAt":"2026-09-06T09:21:08.049Z","contentChangedAt":"2026-09-06T09:21:08.049Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}