mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 06:44:14 +00:00
[error] pipeline creation
This commit is contained in:
parent
ad824de268
commit
6307294e2b
@ -231,16 +231,18 @@ impl GlobalPlay for wgc::hub::Global<IdentityPassThroughFactory> {
|
||||
}
|
||||
A::CreateComputePipeline(id, desc) => {
|
||||
self.device_maintain_ids::<B>(device).unwrap();
|
||||
self.device_create_compute_pipeline::<B>(device, &desc, id, None)
|
||||
.unwrap();
|
||||
let (_, _, error) =
|
||||
self.device_create_compute_pipeline::<B>(device, &desc, id, None);
|
||||
assert_eq!(error, None);
|
||||
}
|
||||
A::DestroyComputePipeline(id) => {
|
||||
self.compute_pipeline_drop::<B>(id);
|
||||
}
|
||||
A::CreateRenderPipeline(id, desc) => {
|
||||
self.device_maintain_ids::<B>(device).unwrap();
|
||||
self.device_create_render_pipeline::<B>(device, &desc, id, None)
|
||||
.unwrap();
|
||||
let (_, _, error) =
|
||||
self.device_create_render_pipeline::<B>(device, &desc, id, None);
|
||||
assert_eq!(error, None);
|
||||
}
|
||||
A::DestroyRenderPipeline(id) => {
|
||||
self.render_pipeline_drop::<B>(id);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -80,7 +80,7 @@ pub struct ProgrammableStageDescriptor<'a> {
|
||||
/// Number of implicit bind groups derived at pipeline creation.
|
||||
pub type ImplicitBindGroupCount = u8;
|
||||
|
||||
#[derive(Clone, Debug, Error)]
|
||||
#[derive(Clone, Debug, Error, PartialEq)]
|
||||
pub enum ImplicitLayoutError {
|
||||
#[error("missing IDs for deriving {0} bind groups")]
|
||||
MissingIds(ImplicitBindGroupCount),
|
||||
@ -104,7 +104,7 @@ pub struct ComputePipelineDescriptor<'a> {
|
||||
pub compute_stage: ProgrammableStageDescriptor<'a>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Error)]
|
||||
#[derive(Clone, Debug, Error, PartialEq)]
|
||||
pub enum CreateComputePipelineError {
|
||||
#[error(transparent)]
|
||||
Device(#[from] DeviceError),
|
||||
@ -193,7 +193,7 @@ pub struct RenderPipelineDescriptor<'a> {
|
||||
pub alpha_to_coverage_enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Error)]
|
||||
#[derive(Clone, Debug, Error, PartialEq)]
|
||||
pub enum CreateRenderPipelineError {
|
||||
#[error(transparent)]
|
||||
Device(#[from] DeviceError),
|
||||
|
@ -48,7 +48,7 @@ pub fn check_texture_usage(
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Error)]
|
||||
#[derive(Clone, Debug, Error, PartialEq)]
|
||||
pub enum BindingError {
|
||||
#[error("binding is missing from the pipeline layout")]
|
||||
Missing,
|
||||
@ -78,7 +78,7 @@ pub enum BindingError {
|
||||
BadStorageFormat(wgt::TextureFormat),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Error)]
|
||||
#[derive(Clone, Debug, Error, PartialEq)]
|
||||
pub enum InputError {
|
||||
#[error("input is not provided by the earlier stage in the pipeline")]
|
||||
Missing,
|
||||
@ -87,7 +87,7 @@ pub enum InputError {
|
||||
}
|
||||
|
||||
/// Errors produced when validating a programmable stage of a pipeline.
|
||||
#[derive(Clone, Debug, Error)]
|
||||
#[derive(Clone, Debug, Error, PartialEq)]
|
||||
pub enum StageError {
|
||||
#[error("shader module is invalid")]
|
||||
InvalidModule,
|
||||
|
Loading…
Reference in New Issue
Block a user