Code Monkey home page Code Monkey logo

vulkano-www's People

Contributors

aochagavia avatar austinj235 avatar dependabot[bot] avatar eisterman avatar eliah-lakhin avatar frizi avatar hakolao avatar jasondavies avatar javinovo avatar jimblandy avatar joeri avatar jonringer avatar kairosswag avatar lukassup avatar mitchmindtree avatar mr-pine avatar nabijaczleweli avatar nashenas88 avatar peterreid avatar phrohdoh avatar rua avatar rukai avatar sameer avatar siavashserver avatar sogomn avatar terrybrash avatar tom-leys avatar tomaka avatar yongjun823 avatar zakstar17 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vulkano-www's Issues

Example Operation fails assertion

I'm working my way through the guide and the Example operation(examples/guide-example-operation.rs) fails the assertion at the end even when I copy/paste the code from the repo.

Here is the output:

➜  vulkano-guide git:(master) ✗ cargo run
   Compiling vulkano-guide v0.1.0 (/Users/ryan/repos/vulkano-guide)
    Finished dev [unoptimized + debuginfo] target(s) in 7.95s
     Running `target/debug/vulkano-guide`
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]`,
 right: `[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]`', src/main.rs:80:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

M1 Mac create instance failed

I just wanted to test a bit Vulkan support on my M1 Mac, but when I did initialization according to the guide, I got a similar error in the #90, and when I changed Vulkano to 0.20, building was successful, but I got this
thread 'main' panicked at 'failed to create an instance: LoadingError(LibraryLoadFailure("dlopen(libvulkan.1.dylib, 1): image not found"))', src/main.rs:14:75

My code just

use vulkano::instance::{Instance, InstanceExtensions};

fn main() {
    let instance = Instance::new(None, &InstanceExtensions::none(), None).expect("failed to create an instance");
}

I'm not sure whether I need further configuration or whether it is an issue of Vulkano itself.

My software configurations are:

  • Rust: 1.49
  • macOS: 11.2

Update to version 0.31.0

I plan to update the guide to version 0.31, and maybe add additional context where I feel it is relevant.
Let me know if someone else is already working on this :)

Swapchain guide incorrect Device init

In the swapchain guide page the last section showing the Device initialasation has a bug.

It shows

let (device, mut queues) = {
    let device_ext = vulkano::device::DeviceExtensions {
        khr_swapchain: true,
        .. vulkano::device::DeviceExtensions::none()
    };

    Device::new(physical, physical.supported_features(), &device_ext,
                [(queue, 0.5)].iter().cloned()).expect("failed to create device")
};

The 2nd last line should use queue_family instead of queue. At least that's what I had to change to get it to compile.

Cargo.lock isn't up-to-date

I don't have time to handle that right now right now, but the Cargo.lock isn't up-to-date, and that generates error during the deployment (deploying does cargo build --release --locked, and the --locked generates errors).

Possibly an Error in Guide

In the guid on this page to following code is written:

use vulkano::descriptor::descriptor_set::PersistentDescriptorSet;

let layout = pipeline.layout().descriptor_set_layout(0).unwrap();
let set = Arc::new(PersistentDescriptorSet::start(layout.clone())
    .add_buffer(data_buffer.clone()).unwrap()
    .build().unwrap()
);

two things are not ideal here:

  • the pipeline variable was called compute_pipeline in the previous page
  • use vulkano::descriptor::PipelineLayoutAbstract is required

setup CI to run `cargo test` on PRs

There aren't any tests, but this makes sure both the website and examples compile.
It would also run any potential tests added in the future.

I assume circle-ci should be setup to do this. (Which I don't appear to have access to)
Otherwise I can setup travis to handle this.

Outdated

The guide is incredibly outdated, and unfinished.
It is hard to get examples out of it working for newer versions and get started in general.

PLEASE either update and finish it, or add a disclaimer about the state.

Translate to Chinese

I plan to translate this website into Chinese, but I haven't figured out how to do it at present (will it be an independent website, or will add a button that can switch languages in the original site?). At present, I'm trying to translate directly on the original basis. See my repository for details: https://github.com/saurlax/vulkano-www-cn

Couldn't compile the website (Rust 1.39+)

I've tried to compile in my system but the result is every time a compile error.

With 1.39-0-stable toolchain:

   Compiling vulkano-www v0.1.0 (/home/fpasqua/git/vulkano-www)
error[E0283]: type annotations required: cannot resolve `std::string::String: std::convert::AsRef<_>`
   --> src/lib.rs:153:45
    |
153 |                 .insert_str("body", e.key().as_ref())
    |                                             ^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0283`.
error: could not compile `vulkano-www`.

With 1.41.0-nightly (a605441e0 2019-12-15) toolchain:

$ ADDR=0.0.0.0:8000 cargo run
   Compiling vulkano-www v0.1.0 (/home/fpasqua/git/vulkano-www)
error[E0283]: type annotations needed for `std::string::String`
   --> src/lib.rs:153:45
    |
146 |     let body = body.into();
    |         ---- consider giving `body` a type
...
153 |                 .insert_str("body", e.key().as_ref())
    |                                             ^^^^^^ cannot infer type for struct `std::string::String`
    |
    = note: cannot resolve `std::string::String: std::convert::AsRef<_>`

error[E0283]: type annotations needed for `std::string::String`
   --> src/lib.rs:185:45
    |
178 |     let body = body.into();
    |         ---- consider giving `body` a type
...
185 |                 .insert_str("body", e.key().as_ref())
    |                                             ^^^^^^ cannot infer type for struct `std::string::String`
    |
    = note: cannot resolve `std::string::String: std::convert::AsRef<_>`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0283`.
error: could not compile `vulkano-www`.

Now I will try to fix this for my computer adding some type annotation, but I don't know perfectly how the deployment is done, because is really strange that it works on the deploy and not with the last versions of rust.

Compute Operations code does not compile

I was going through the tutorial and found that the compute operations code does not compile. It throws the following error:

error[E0609]: no field `khr_storage_buffer_storage_class` on type `&vulkano::device::extensions::DeviceExtensions`
   --> src/main.rs:199:9
    |
199 | /         vulkano_shaders::shader!{
200 | |             ty: "compute",
201 | |             src: "
202 | | #version 450
...   |
210 | | }"
211 | |         }
    | |         ^ in this macro invocation
    | |_________|
    | 

error: aborting due to previous error

Compute shader dispatch fails due to missing extension

Working through the guide page on dispatching a compute shader, I get a panic during shader loading due to missing device extension khr_storage_buffer_storage_class.

thread 'main' panicked at 'Device extension "khr_storage_buffer_storage_class" required',

It isn't too difficult to figure out what to do, but it's not mentioned in the guide that it (might?) be required to initialize the device with the extension:

    let (device, mut queues) = Device::new(
        physical,
        &Features::none(),
        &DeviceExtensions {
            khr_storage_buffer_storage_class: true,
            ..DeviceExtensions::none()
        },
        [(queue_family, 0.5)].iter().cloned(),
    )
    .expect("failed to create device");

Mandelbrot set example fails

The guide says to do this when creating a descriptor set:
let layout = compute_pipeline.layout().descriptor_set_layout(0).unwrap(); let set = Arc::new(PersistentDescriptorSet::start(layout.clone()) .add_image(image.clone()).unwrap() .build().unwrap() );
But in the latest version, you need the following code:
use vulkano::image::view::ImageView; let layout = compute_pipeline.layout().descriptor_set_layout(0).unwrap(); let set = Arc::new( PersistentDescriptorSet::start(layout.clone()) .add_image(ImageView::new(image.clone()).unwrap()) .unwrap() .build() .unwrap(), );
Note the add_image part; you need to use ImageView::new.

Paragraph on reusing pipelines is utterly mysterious

I'm working my way through the Vulkano tutorial. It's going fine, but I can't figure out what this paragraph means at all:

Note that you are allowed to use a set for a different pipeline than the one it was created with, but only if there is no conflict. However you can't create a descriptor set out of thin air, as Vulkan doesn't allow it.

I don't understand what sort of conflict there might be. I also don't see what is meant by "out of thin air". From what I understand at present, PersistentDescriptorSet::start creates a new PersistentDescriptorSet value; isn't that out of thin air?

It seems like this paragraph might be addressing questions an advanced user would have, and might be better to omit entirely from this part of the tutorial.

master branch is deployed instead of production branch

Despite configuring circleci to only deploy the production branch it deploys the master branch anyway.
https://github.com/vulkano-rs/vulkano-www/blob/master/.circleci/config.yml

No idea whats going wrong, even tried following a workaround with no success. As seen in the current .circleci/config.yml.

@tomaka any idea? This project is the only time I've dealt with circleci.

This is important so we can merge changes to the docs pertaining to unreleased changes in vulkano.

Update Guide to 0.32

I am new to vulkano and have been working through the guide. I noticed the code in the guide was not compiling for me, and realized it is because of breaking changes in 0.32 of vulkano. It seems the way device references are passed changed. I only figured out how to update the code by looking through the examples in the vulkano repo.

I'm hoping someone more familiar with things will take care of updating the guide to reflect these changes.

Page I first noticed issues: https://vulkano.rs/guide/buffer-creation

The corrected code makes use of StandardMemoryAllocator and StandardCommandBufferAllocator.


As an aside, the guide is great. Good explanations and incrementally building on the previous code. Thanks to the team that put it together.

'Device extension "khr_storage_buffer_storage_class" required

I am working through the guide and I ran into an issue at the end of 'dispatch' where I got thread 'main' panicked at 'Device extension "khr_storage_buffer_storage_class" required', src\main.rs:36:9 which is coming from the vulkano_shaders::shader! line and I don't know how to fix it

Separate the windowing section into unresizable and resizable.

I think the windowing section would be more beginner-friendly if it started with an unresizable window, then a resizable window since handling resizability is much more complicated and involved.
Also, it makes more sense to transition from a PNG image to an unresizable surface as the windowing and swap chain stuff is already so complicated for a beginner.
Furthermore, not all users need a resizable window and the complexity that comes with it, especially video games.

vulkano 0.19 build failure in empty project

I'm on the first page of the guide (which recommends installing vulkano 0.19), and just trying to build an empty main.rs with the crate installed gives me a build failure:

> Executing task: cargo build <

   Compiling vulkano v0.19.0
error[E0609]: no field `shaderf3264` on type `PhysicalDeviceFeatures`
   --> C:\Users\cdwfs\.cargo\registry\src\github.com-1ecc6299db9ec823\vulkano-0.19.0\src\features.rs:459:28
    |
459 |     core { shader_f3264 => shaderf3264 },
    |                            ^^^^^^^^^^^ help: a field with a similar name exists: `shaderInt64`

error[E0308]: mismatched types
    --> C:\Users\cdwfs\.cargo\registry\src\github.com-1ecc6299db9ec823\vulkano-0.19.0\src\command_buffer\sys.rs:1455:38     
     |
1455 |         vk.CmdSetBlendConstants(cmd, constants); // TODO: correct to pass array?
     |                                      ^^^^^^^^^
     |                                      |
     |                                      expected `&[f32; 4]`, found array `[f32; 4]`
     |                                      help: consider borrowing here: `&constants`

error: aborting due to 2 previous errors

I'm on Windows, with version 1.2.162.0 of the Vulkan SDK installed if that makes a difference. I see vulkano 0.20.0 is available, and changing to "vulkano = 0.20" in Crates.toml made the error go away, so it may be worth updating the guide to suggest version 0.20 instead.

vulkano.rs 503 Service unavailable error.

The official site loads to a "Please wait... Application starting" page with console errors saying error 503. I cleared the cache and tried loading in incognito but did not try another IP.

image

Teach trait objects as they apply to vulkano

An issue that newbies, me included, run into is that lots of vulkano types should be stored as trait objects rather then attempting to specify the generic arguments.

Because trait objects is an advanced rust topic. most people don't have to deal with them until they hit it in vulkano. So There should be a chapter that quickly explains the basics, demonstrating it with vulkano types, and then showing how we can use this to store vulkano types in a struct.

Buffer Creation API Out Of Date

I have just started my vulkan journey, and the guide has been very helpful but I came across perhaps an api change or just an error?

in the buffer creation page: https://vulkano.rs/guide/buffer-creation
it has the following code snippet:

let data: i32 = 12;
let buffer = CpuAccessibleBuffer::from_data(
    device.clone(),
    BufferUsage {
        uniform_buffer: true,
        ..Default::default()
    },
    false,
    data,
)
.expect("failed to create buffer");

but CpuAccessibleBuffer::from_data's first parameter should be a "MemoryAllocator", I looked through the triangle example to find an instantiation of a memory allocator, and this worked for me:

let memory_allocator = StandardMemoryAllocator::new_default(device.clone());

let data: i32 = 12;
let buffer = CpuAccessibleBuffer::from_data(
    &memory_allocator,
    BufferUsage {
        uniform_buffer: true,
        ..Default::default()
    },
    false,
    data,
)
.expect("failed to create buffer");

this also will require an explanation change, as the first paragraph below the code snippet explains why we need to device.clone(), etc - which just need to be shifted to talking about a memory allocator I guess?

Hope this helps, thanks for all your work :)

Couldn't compile the website (Docker)

I've tried to compile with the given Dockerfile but the result is a big compile error in the dependencies:

Compiling smallvec v0.6.10
error[E0432]: unresolved import `std::mem::ManuallyDrop`
  --> root/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-0.6.10/lib.rs:60:5
   |
60 | use std::mem::ManuallyDrop;
   |     ^^^^^^^^^^^^^^^^^^^^^^ no `ManuallyDrop` in `mem`

   Compiling getopts v0.2.19
   Compiling lazy_static v1.3.0
error: aborting due to previous error

error[E0301]: cannot mutably borrow in a pattern guard
   --> root/.cargo/registry/src/github.com-1ecc6299db9ec823/getopts-0.2.19/src/lib.rs:457:36
    |
457 |                                 || args.peek().map_or(true, |n| is_arg(&n))
    |                                    ^^^^ borrowed mutably in pattern guard
error: associated constants are experimental (see issue #29646)
  --> root/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.3.0/src/inline_lazy.rs:20:5
   |
20 |     pub const INIT: Self = Lazy(Cell::new(None), ONCE_INIT);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


error: aborting due to previous error

error: aborting due to previous error

fatal runtime error: failed to initiate panic, error 5error:
 Could not compile `smallvec`.
Build failed, waiting for other jobs to finish...
error: Could not compile `lazy_static`.
Build failed, waiting for other jobs to finish...
Build failed, waiting for other jobs to finish...
error: Could not compile `getopts`.
error: build failed
The command '/bin/sh -c cargo build --release --manifest-path=/root/Cargo.toml' returned a non-zero code: 101

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.