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

Enable image_view_format_swizzle feature #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion examples/demo_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ pub struct Window {
impl Default for App {
fn default() -> Self {
// Vulkano context
let context = VulkanoContext::new(VulkanoConfig::default());
let mut config = VulkanoConfig::default();
config.device_features.image_view_format_swizzle = true;
let context = VulkanoContext::new(config);
// Vulkano windows (create one)
let windows = VulkanoWindows::default();

Expand Down
4 changes: 3 additions & 1 deletion examples/minimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ pub struct App {
impl Default for App {
fn default() -> Self {
// Vulkano context
let context = VulkanoContext::new(VulkanoConfig::default());
let mut config = VulkanoConfig::default();
config.device_features.image_view_format_swizzle = true;
let context = VulkanoContext::new(config);

// Vulkano windows
let windows = VulkanoWindows::default();
Expand Down
4 changes: 3 additions & 1 deletion examples/multisample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ pub struct App {
impl Default for App {
fn default() -> Self {
// Vulkano context
let context = VulkanoContext::new(VulkanoConfig::default());
let mut config = VulkanoConfig::default();
config.device_features.image_view_format_swizzle = true;
let context = VulkanoContext::new(config);

// Vulkano windows
let windows = VulkanoWindows::default();
Expand Down
4 changes: 3 additions & 1 deletion examples/paint_callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ pub struct App {
impl Default for App {
fn default() -> Self {
// Vulkano context
let context = VulkanoContext::new(VulkanoConfig::default());
let mut config = VulkanoConfig::default();
config.device_features.image_view_format_swizzle = true;
let context = VulkanoContext::new(config);

// Vulkano windows
let windows = VulkanoWindows::default();
Expand Down
4 changes: 3 additions & 1 deletion examples/subpass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ pub struct App {
impl Default for App {
fn default() -> Self {
// Vulkano context
let context = VulkanoContext::new(VulkanoConfig::default());
let mut config = VulkanoConfig::default();
config.device_features.image_view_format_swizzle = true;
let context = VulkanoContext::new(config);

// Vulkano windows
let windows = VulkanoWindows::default();
Expand Down
4 changes: 3 additions & 1 deletion examples/wholesome/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ pub struct App {
impl Default for App {
fn default() -> Self {
// Vulkano context
let context = VulkanoContext::new(VulkanoConfig::default());
let mut config = VulkanoConfig::default();
config.device_features.image_view_format_swizzle = true;
let context = VulkanoContext::new(config);

// Vulkano windows
let windows = VulkanoWindows::default();
Expand Down
4 changes: 2 additions & 2 deletions src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ impl Renderer {
fn choose_font_format(device: &vulkano::device::Device) -> Format {
// Some portability subset devices are unable to swizzle views.
let supports_swizzle =
!device.physical_device().supported_extensions().khr_portability_subset
|| device.physical_device().supported_features().image_view_format_swizzle;
!device.enabled_extensions().khr_portability_subset
|| device.enabled_features().image_view_format_swizzle;
// Check that this format is supported for all our uses:
let is_supported = |device: &vulkano::device::Device, format: Format| {
device
Expand Down
Loading