mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
Check for attachment overlap using textures, not views (#8402)
This commit is contained in:
parent
d575c0234b
commit
7f644452f0
@ -94,6 +94,7 @@ SamplerDescriptor {
|
|||||||
- Reject binding indices that exceed `wgpu_types::Limits::max_bindings_per_bind_group` when deriving a bind group layout for a pipeline. By @jimblandy in [#8325](https://github.com/gfx-rs/wgpu/pull/8325).
|
- Reject binding indices that exceed `wgpu_types::Limits::max_bindings_per_bind_group` when deriving a bind group layout for a pipeline. By @jimblandy in [#8325](https://github.com/gfx-rs/wgpu/pull/8325).
|
||||||
- Removed three features from `wgpu-hal` which did nothing useful: `"cargo-clippy"`, `"gpu-allocator"`, and `"rustc-hash"`. By @kpreid in [#8357](https://github.com/gfx-rs/wgpu/pull/8357).
|
- Removed three features from `wgpu-hal` which did nothing useful: `"cargo-clippy"`, `"gpu-allocator"`, and `"rustc-hash"`. By @kpreid in [#8357](https://github.com/gfx-rs/wgpu/pull/8357).
|
||||||
- `wgpu_types::PollError` now always implements the `Error` trait. By @kpreid in [#8384](https://github.com/gfx-rs/wgpu/pull/8384).
|
- `wgpu_types::PollError` now always implements the `Error` trait. By @kpreid in [#8384](https://github.com/gfx-rs/wgpu/pull/8384).
|
||||||
|
- The texture subresources used by the color attachments of a render pass are no longer allowed to overlap when accessed via different texture views. By @andyleiserson in [#8402](https://github.com/gfx-rs/wgpu/pull/8402).
|
||||||
|
|
||||||
#### DX12
|
#### DX12
|
||||||
|
|
||||||
|
|||||||
@ -125,6 +125,7 @@ webgpu:api,validation,render_pass,render_pass_descriptor:color_attachments,depth
|
|||||||
// FAIL: webgpu:api,validation,render_pass,render_pass_descriptor:color_attachments,depthSlice,overlaps,diff_miplevel:*
|
// FAIL: webgpu:api,validation,render_pass,render_pass_descriptor:color_attachments,depthSlice,overlaps,diff_miplevel:*
|
||||||
webgpu:api,validation,render_pass,render_pass_descriptor:resolveTarget,*
|
webgpu:api,validation,render_pass,render_pass_descriptor:resolveTarget,*
|
||||||
webgpu:api,validation,render_pass,resolve:resolve_attachment:*
|
webgpu:api,validation,render_pass,resolve:resolve_attachment:*
|
||||||
|
webgpu:api,validation,resource_usages,texture,in_pass_encoder:subresources_and_binding_types_combination_for_color:compute=false;type0="render-target";type1="render-target"
|
||||||
webgpu:api,validation,texture,rg11b10ufloat_renderable:*
|
webgpu:api,validation,texture,rg11b10ufloat_renderable:*
|
||||||
webgpu:api,operation,render_pipeline,overrides:*
|
webgpu:api,operation,render_pipeline,overrides:*
|
||||||
webgpu:api,operation,rendering,basic:clear:*
|
webgpu:api,operation,rendering,basic:clear:*
|
||||||
|
|||||||
@ -1241,8 +1241,11 @@ impl RenderPassInfo {
|
|||||||
) -> Result<(), ColorAttachmentError> {
|
) -> Result<(), ColorAttachmentError> {
|
||||||
let mut insert = |slice| {
|
let mut insert = |slice| {
|
||||||
let mip_level = view.desc.range.base_mip_level;
|
let mip_level = view.desc.range.base_mip_level;
|
||||||
if attachment_set.insert((view.tracking_data.tracker_index(), mip_level, slice))
|
if attachment_set.insert((
|
||||||
{
|
view.parent.tracking_data.tracker_index(),
|
||||||
|
mip_level,
|
||||||
|
slice,
|
||||||
|
)) {
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
Err(ColorAttachmentError::SubresourceOverlap {
|
Err(ColorAttachmentError::SubresourceOverlap {
|
||||||
|
|||||||
@ -1806,7 +1806,6 @@ impl Device {
|
|||||||
samples: texture.desc.sample_count,
|
samples: texture.desc.sample_count,
|
||||||
selector,
|
selector,
|
||||||
label: desc.label.to_string(),
|
label: desc.label.to_string(),
|
||||||
tracking_data: TrackingData::new(self.tracker_indices.texture_views.clone()),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let view = Arc::new(view);
|
let view = Arc::new(view);
|
||||||
|
|||||||
@ -1654,7 +1654,6 @@ pub struct TextureView {
|
|||||||
pub(crate) selector: TextureSelector,
|
pub(crate) selector: TextureSelector,
|
||||||
/// The `label` from the descriptor used to create the resource.
|
/// The `label` from the descriptor used to create the resource.
|
||||||
pub(crate) label: String,
|
pub(crate) label: String,
|
||||||
pub(crate) tracking_data: TrackingData,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Drop for TextureView {
|
impl Drop for TextureView {
|
||||||
@ -1821,7 +1820,6 @@ crate::impl_resource_type!(TextureView);
|
|||||||
crate::impl_labeled!(TextureView);
|
crate::impl_labeled!(TextureView);
|
||||||
crate::impl_parent_device!(TextureView);
|
crate::impl_parent_device!(TextureView);
|
||||||
crate::impl_storage_item!(TextureView);
|
crate::impl_storage_item!(TextureView);
|
||||||
crate::impl_trackable!(TextureView);
|
|
||||||
|
|
||||||
pub type ExternalTextureDescriptor<'a> = wgt::ExternalTextureDescriptor<Label<'a>>;
|
pub type ExternalTextureDescriptor<'a> = wgt::ExternalTextureDescriptor<Label<'a>>;
|
||||||
|
|
||||||
|
|||||||
@ -224,7 +224,6 @@ impl SharedTrackerIndexAllocator {
|
|||||||
pub(crate) struct TrackerIndexAllocators {
|
pub(crate) struct TrackerIndexAllocators {
|
||||||
pub buffers: Arc<SharedTrackerIndexAllocator>,
|
pub buffers: Arc<SharedTrackerIndexAllocator>,
|
||||||
pub textures: Arc<SharedTrackerIndexAllocator>,
|
pub textures: Arc<SharedTrackerIndexAllocator>,
|
||||||
pub texture_views: Arc<SharedTrackerIndexAllocator>,
|
|
||||||
pub external_textures: Arc<SharedTrackerIndexAllocator>,
|
pub external_textures: Arc<SharedTrackerIndexAllocator>,
|
||||||
pub samplers: Arc<SharedTrackerIndexAllocator>,
|
pub samplers: Arc<SharedTrackerIndexAllocator>,
|
||||||
pub bind_groups: Arc<SharedTrackerIndexAllocator>,
|
pub bind_groups: Arc<SharedTrackerIndexAllocator>,
|
||||||
@ -241,7 +240,6 @@ impl TrackerIndexAllocators {
|
|||||||
TrackerIndexAllocators {
|
TrackerIndexAllocators {
|
||||||
buffers: Arc::new(SharedTrackerIndexAllocator::new()),
|
buffers: Arc::new(SharedTrackerIndexAllocator::new()),
|
||||||
textures: Arc::new(SharedTrackerIndexAllocator::new()),
|
textures: Arc::new(SharedTrackerIndexAllocator::new()),
|
||||||
texture_views: Arc::new(SharedTrackerIndexAllocator::new()),
|
|
||||||
external_textures: Arc::new(SharedTrackerIndexAllocator::new()),
|
external_textures: Arc::new(SharedTrackerIndexAllocator::new()),
|
||||||
samplers: Arc::new(SharedTrackerIndexAllocator::new()),
|
samplers: Arc::new(SharedTrackerIndexAllocator::new()),
|
||||||
bind_groups: Arc::new(SharedTrackerIndexAllocator::new()),
|
bind_groups: Arc::new(SharedTrackerIndexAllocator::new()),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user