Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: derives for AaSupport #654

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion vello/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,25 @@ use wgpu::{Device, Queue, SurfaceTexture, TextureFormat, TextureView};
use wgpu_profiler::{GpuProfiler, GpuProfilerSettings};

/// Represents the antialiasing method to use during a render pass.
#[derive(Copy, Clone, PartialEq, Eq)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum AaConfig {
Area,
Msaa8,
Msaa16,
}

impl From<AaConfig> for AaSupport {
fn from(value: AaConfig) -> Self {
Self {
area: value == AaConfig::Area,
msaa8: value == AaConfig::Msaa8,
msaa16: value == AaConfig::Msaa16,
}
}
}

simbleau marked this conversation as resolved.
Show resolved Hide resolved
/// Represents the set of antialiasing configurations to enable during pipeline creation.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct AaSupport {
pub area: bool,
pub msaa8: bool,
Expand Down