mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-25 08:51:05 +01:00
move the BGL compatibility check in the binder
This commit is contained in:
1 parent
ca0027d12b
commit
9ec0f45efd
4 files changed
+39
-57
No files matched your search
@@ -481,14 +481,7 @@ impl<'scope, 'snatch_guard, 'cmd_buf, 'raw_encoder, A: HalApi>
|
||||
{
|
||||
fn is_ready(&self, indexed: bool) -> Result<(), DrawError> {
|
||||
if let Some(pipeline) = self.pipeline.as_ref() {
|
||||
let bind_mask = self.binder.invalid_mask();
|
||||
if bind_mask != 0 {
|
||||
return Err(DrawError::IncompatibleBindGroup {
|
||||
index: bind_mask.trailing_zeros(),
|
||||
pipeline: pipeline.error_ident(),
|
||||
diff: self.binder.bgl_diff(),
|
||||
});
|
||||
}
|
||||
self.binder.check_compatibility(pipeline.as_ref())?;
|
||||
self.binder.check_late_buffer_bindings()?;
|
||||
|
||||
if self.blend_constant == OptionalState::Required {
|
||||
@@ -717,16 +710,7 @@ pub enum RenderPassErrorInner {
|
||||
PassEnded,
|
||||
}
|
||||
|
||||
impl PrettyError for RenderPassErrorInner {
|
||||
fn fmt_pretty(&self, fmt: &mut ErrorFormatter) {
|
||||
fmt.error(self);
|
||||
if let Self::Draw(DrawError::IncompatibleBindGroup { diff, .. }) = self {
|
||||
for d in diff {
|
||||
fmt.note(&d);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
impl PrettyError for RenderPassErrorInner {}
|
||||
|
||||
impl From<MissingBufferUsageError> for RenderPassErrorInner {
|
||||
fn from(error: MissingBufferUsageError) -> Self {
|
||||
|
||||
Reference in new issue
Block a user