(
&mut self,
device: &wgpu::Device,
queue: &wgpu::Queue,
input: UiPrepareInput<'_>,
)
| 334 | immediate_size: 0, |
| 335 | }); |
| 336 | let pipeline = crate::pipeline_cache::create_render_pipeline( |
| 337 | device, |
| 338 | wgpu::RenderPipelineDescriptor { |
| 339 | label: Some("perro_ui_pipeline"), |
| 340 | layout: Some(&pipeline_layout), |
| 341 | vertex: wgpu::VertexState { |
| 342 | module: &shader, |
| 343 | entry_point: Some("vs_main"), |
| 344 | buffers: &[Some(wgpu::VertexBufferLayout { |
| 345 | array_stride: std::mem::size_of::<UiVertexGpu>() as u64, |
| 346 | step_mode: wgpu::VertexStepMode::Vertex, |
| 347 | attributes: &[ |
| 348 | wgpu::VertexAttribute { |
| 349 | format: wgpu::VertexFormat::Float32x2, |
| 350 | offset: 0, |
| 351 | shader_location: 0, |
| 352 | }, |
| 353 | wgpu::VertexAttribute { |
| 354 | format: wgpu::VertexFormat::Float32x2, |
| 355 | offset: 8, |
| 356 | shader_location: 1, |
| 357 | }, |
| 358 | wgpu::VertexAttribute { |
| 359 | format: wgpu::VertexFormat::Float32x2, |
| 360 | offset: 16, |
| 361 | shader_location: 2, |
| 362 | }, |
| 363 | wgpu::VertexAttribute { |
| 364 | format: wgpu::VertexFormat::Unorm8x4, |
| 365 | offset: 24, |
| 366 | shader_location: 3, |
| 367 | }, |
| 368 | ], |
| 369 | })], |
| 370 | compilation_options: wgpu::PipelineCompilationOptions::default(), |
| 371 | }, |
| 372 | fragment: Some(wgpu::FragmentState { |
| 373 | module: &shader, |
| 374 | entry_point: Some("fs_main_linear_framebuffer"), |
| 375 | targets: &[Some(wgpu::ColorTargetState { |
| 376 | format: UI_SUPERSAMPLE_FORMAT, |
| 377 | blend: Some(wgpu::BlendState { |
| 378 | color: wgpu::BlendComponent { |
| 379 | src_factor: wgpu::BlendFactor::One, |
| 380 | dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha, |
| 381 | operation: wgpu::BlendOperation::Add, |
| 382 | }, |
| 383 | alpha: wgpu::BlendComponent { |
| 384 | src_factor: wgpu::BlendFactor::One, |
| 385 | dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha, |
| 386 | operation: wgpu::BlendOperation::Add, |
| 387 | }, |
| 388 | }), |
| 389 | write_mask: wgpu::ColorWrites::ALL, |
| 390 | })], |
| 391 | compilation_options: wgpu::PipelineCompilationOptions::default(), |
| 392 | }), |
| 393 | primitive: wgpu::PrimitiveState { |
no test coverage detected