| 1234567891011121314151617181920212223242526272829303132333435363738 |
- //! Xbox Series shaders to host shaders.
- //!
- //! An Xbox Series shader is a standard DXBC container ([`dxbc`]). Its `DXIL`
- //! part ([`dxil`]) may carry Xbox additions around the LLVM bitcode: an
- //! `XDAT` table before it indexing blobs after it, among them `xbop`
- //! (compiler options) and the zlib-compressed GFX10 code. The bitcode may use
- //! console-only intrinsics, so the GFX10 code is translated in general.
- pub mod bvh;
- pub mod dxbc;
- pub mod dxil;
- pub mod emit;
- pub mod gfx10;
- pub mod io;
- pub mod ir;
- pub mod native;
- pub mod resource;
- pub mod spill;
- pub mod structure;
- pub use dxbc::{Container, FourCC, Part};
- pub use dxil::{DxilProgram, ShaderKind, XboxExtras};
- pub use native::{
- HwStage, NativeProgram, ResourceType, RootParam, RootType, UsedResource, native_programs,
- };
- #[derive(Debug, thiserror::Error, PartialEq, Eq)]
- pub enum ShaderError {
- #[error("not a DXBC container")]
- NotDxbc,
- #[error("malformed shader: {0}")]
- Malformed(&'static str),
- #[error("GFX10 code at {offset:#x}: {reason}")]
- Isa { offset: usize, reason: &'static str },
- /// Valid code the translator cannot handle yet: an opcode name or a construct.
- #[error("GFX10 code at {offset:#x}: {what} is not supported")]
- Unsupported { offset: usize, what: &'static str },
- }
|