mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[rs] Rename TextureUsage::OUTPUT_ATTACHMENT to RENDER_ATTACHMENT
This commit is contained in:
@@ -71,7 +71,7 @@ async fn create_red_image_with_dimensions(
|
||||
sample_count: 1,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
format: wgpu::TextureFormat::Rgba8UnormSrgb,
|
||||
usage: wgpu::TextureUsage::OUTPUT_ATTACHMENT | wgpu::TextureUsage::COPY_SRC,
|
||||
usage: wgpu::TextureUsage::RENDER_ATTACHMENT | wgpu::TextureUsage::COPY_SRC,
|
||||
label: None,
|
||||
});
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ fn start<E: Example>(
|
||||
};
|
||||
|
||||
let mut sc_desc = wgpu::SwapChainDescriptor {
|
||||
usage: wgpu::TextureUsage::OUTPUT_ATTACHMENT,
|
||||
usage: wgpu::TextureUsage::RENDER_ATTACHMENT,
|
||||
// TODO: Allow srgb unconditionally
|
||||
format: if cfg!(target_arch = "wasm32") {
|
||||
wgpu::TextureFormat::Bgra8Unorm
|
||||
|
||||
@@ -66,7 +66,7 @@ async fn run(event_loop: EventLoop<()>, window: Window, swapchain_format: wgpu::
|
||||
});
|
||||
|
||||
let mut sc_desc = wgpu::SwapChainDescriptor {
|
||||
usage: wgpu::TextureUsage::OUTPUT_ATTACHMENT,
|
||||
usage: wgpu::TextureUsage::RENDER_ATTACHMENT,
|
||||
format: swapchain_format,
|
||||
width: size.width,
|
||||
height: size.height,
|
||||
|
||||
@@ -31,7 +31,7 @@ impl ViewportDesc {
|
||||
let size = self.window.inner_size();
|
||||
|
||||
let sc_desc = wgpu::SwapChainDescriptor {
|
||||
usage: wgpu::TextureUsage::OUTPUT_ATTACHMENT,
|
||||
usage: wgpu::TextureUsage::RENDER_ATTACHMENT,
|
||||
format: swapchain_format,
|
||||
width: size.width,
|
||||
height: size.height,
|
||||
|
||||
@@ -208,7 +208,7 @@ impl framework::Example for Example {
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
format: TEXTURE_FORMAT,
|
||||
usage: wgpu::TextureUsage::SAMPLED
|
||||
| wgpu::TextureUsage::OUTPUT_ATTACHMENT
|
||||
| wgpu::TextureUsage::RENDER_ATTACHMENT
|
||||
| wgpu::TextureUsage::COPY_DST,
|
||||
label: None,
|
||||
});
|
||||
|
||||
@@ -109,7 +109,7 @@ impl Example {
|
||||
sample_count: sample_count,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
format: sc_desc.format,
|
||||
usage: wgpu::TextureUsage::OUTPUT_ATTACHMENT,
|
||||
usage: wgpu::TextureUsage::RENDER_ATTACHMENT,
|
||||
label: None,
|
||||
};
|
||||
|
||||
|
||||
@@ -354,7 +354,7 @@ impl framework::Example for Example {
|
||||
sample_count: 1,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
format: Self::SHADOW_FORMAT,
|
||||
usage: wgpu::TextureUsage::OUTPUT_ATTACHMENT | wgpu::TextureUsage::SAMPLED,
|
||||
usage: wgpu::TextureUsage::RENDER_ATTACHMENT | wgpu::TextureUsage::SAMPLED,
|
||||
label: None,
|
||||
});
|
||||
let shadow_view = shadow_texture.create_view(&wgpu::TextureViewDescriptor::default());
|
||||
@@ -641,7 +641,7 @@ impl framework::Example for Example {
|
||||
sample_count: 1,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
format: Self::DEPTH_FORMAT,
|
||||
usage: wgpu::TextureUsage::OUTPUT_ATTACHMENT,
|
||||
usage: wgpu::TextureUsage::RENDER_ATTACHMENT,
|
||||
label: None,
|
||||
});
|
||||
|
||||
@@ -687,7 +687,7 @@ impl framework::Example for Example {
|
||||
sample_count: 1,
|
||||
dimension: wgpu::TextureDimension::D2,
|
||||
format: Self::DEPTH_FORMAT,
|
||||
usage: wgpu::TextureUsage::OUTPUT_ATTACHMENT,
|
||||
usage: wgpu::TextureUsage::RENDER_ATTACHMENT,
|
||||
label: None,
|
||||
});
|
||||
self.forward_depth = depth_texture.create_view(&wgpu::TextureViewDescriptor::default());
|
||||
|
||||
@@ -199,7 +199,7 @@ impl Example {
|
||||
format: sc_desc.format,
|
||||
usage: wgpu::TextureUsage::SAMPLED
|
||||
| wgpu::TextureUsage::COPY_DST
|
||||
| wgpu::TextureUsage::OUTPUT_ATTACHMENT,
|
||||
| wgpu::TextureUsage::RENDER_ATTACHMENT,
|
||||
});
|
||||
|
||||
let draw_depth_buffer = device.create_texture(&wgpu::TextureDescriptor {
|
||||
@@ -211,7 +211,7 @@ impl Example {
|
||||
format: wgpu::TextureFormat::Depth32Float,
|
||||
usage: wgpu::TextureUsage::SAMPLED
|
||||
| wgpu::TextureUsage::COPY_DST
|
||||
| wgpu::TextureUsage::OUTPUT_ATTACHMENT,
|
||||
| wgpu::TextureUsage::RENDER_ATTACHMENT,
|
||||
});
|
||||
|
||||
let sampler = device.create_sampler(&wgpu::SamplerDescriptor {
|
||||
|
||||
Reference in New Issue
Block a user