Commit Graph
640 Commits
Author SHA1 Message Date
Joshua Groves 4fafceb30a Fix typo 2020-11-21 00:07:57 -03:30
Joshua Groves 8d5ef65dcb Temporarily use BackendBit::PRIMARY in examples
`BackendBit::all()` allows GL/surfman to be used on macOS which appears
to prevent rendering with Metal (e.g. hello-triangle displays an empty
window).

surfman will be removed in later versions of gfx, which will allow us
to switch back to `BackendBit::all()` in the examples.
2020-11-20 23:33:10 -03:30
bors[bot]andMikko Lehtonen 0991a3976a Merge #617
617: Add labels for some error messages r=kvark a=scoopr

This places some pieces on how to transform the ids in the errors to a label, and adds them to the validation message.

This changes the formatting of the validation error to happen when constructing the error, rather than in the unhandled error handler.
It also requires some code for all the error variants for extracting the ids.

Co-authored-by: Mikko Lehtonen <scoopr@iki.fi>
2020-11-19 22:42:41 +00:00
Mikko Lehtonen 6f81f9f8ba Add labels for some error messages
This adds transforms for the ids in the errors to a label,
and adds them to the validation error message.

This changes the formatting of the validation error to happen when
constructing the error, rather than in the unhandled error handler.
It also requires some code for all the error variants for extracting the ids.
2020-11-20 00:36:29 +02:00
Mikko Lehtonen 97e7c0aa87 Update wgpu-core 2020-11-20 00:36:29 +02:00
bors[bot]andMikko Lehtonen b9374d87ad Merge #630
630: Update wgpu-core r=kvark a=scoopr

Pass label to error id creation methods.

Co-authored-by: Mikko Lehtonen <scoopr@iki.fi>
2020-11-19 15:10:37 +00:00
Mikko Lehtonen 665115768d Update wgpu-core
Pass label to error id creation methods.
2020-11-19 01:21:09 +02:00
bors[bot]andDzmitry Malyshau 53637a95d6 Merge #629
629: Update wgpu, work around surface validation r=straightforward a=kvark

Works around https://github.com/gfx-rs/wgpu/issues/1030
Includes https://github.com/zakarumych/gpu-alloc/pull/24

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-11-18 15:07:30 +00:00
Dzmitry Malyshau 9c638a2707 Update wgpu, work around surface validation 2020-11-18 10:05:20 -05:00
bors[bot]andinfinitesnow 0ad61bf077 Merge #627
627: Fixed size in "boids" example r=kvark a=infinitesnow

Buffer size is specified in number of items instead of bytes and fails validation against compiled SPIR-V

Co-authored-by: infinitesnow <3xplosive.g@gmail.com>
2020-11-17 22:15:54 +00:00
infinitesnow 2c2f778dba Fixed size in "boids" example 2020-11-17 21:26:35 +01:00
bors[bot]andDzmitry Malyshau 10f35360a0 Merge #621
621: Drop for surfaces and adapters r=grovesNL a=kvark

Based on https://github.com/gfx-rs/wgpu/pull/1023

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-11-16 21:48:14 +00:00
Dzmitry Malyshau 2a4ccc60fb Drop for surfaces and adapters 2020-11-16 16:47:21 -05:00
bors[bot]andTimo de Kort 1c95a86acf Merge #624
624: Remove implicit conversion hello-triangle shader.vert r=kvark a=Napokue

Remove implicit conversion to float, and change it to explicit conversion. Reason for this change is to prepare the hello-triangle example for Naga glsl-spirv path.

Co-authored-by: Timo de Kort <dekort.timo@gmail.com>
2020-11-15 23:36:30 +00:00
Timo de Kort ee220edce0 Remove implicit conversion hello-triangle shader.vert 2020-11-15 23:13:53 +01:00
bors[bot]andStygeon e17d4f5c1c Merge #618
618: Removed unusued Uniform struct in texture-arrays example. r=cwfitzgerald a=Stygeon

The Uniform struct in the texture-arrays example is unused.

Co-authored-by: Stygeon <denrellum@gmail.com>
2020-11-12 01:30:35 +00:00
Stygeon ef56676cfc Removed unusued Uniform struct in texture-arrays example. 2020-11-12 02:26:58 +01:00
bors[bot]andMarvin Löbel 2563f20837 Merge #613
613: Add more context to errors originating in Passes and Encoders r=kvark a=Kimundi

**Description**
This adds some top-level error context information to indicate wether an error originated in a `{Render,Compute}Pass` or `{Command,RenderBundle}Encoder` to make error messages more clear.

Combined with https://github.com/gfx-rs/wgpu/pull/1018, errors in passes will look like this:
```
wgpu error: Validation error

Caused by:
    In a RenderPass
    In a draw command
    index 3600 extends beyond limit 38
```


Co-authored-by: Marvin Löbel <loebel.marvin@gmail.com>
2020-11-11 04:56:44 +00:00
bors[bot]andDavid Shah 2edb962788 Merge #614
614: Bump winit version to 0.23.0 r=cwfitzgerald a=daveshah1

This fixes the following error trying to run the hello-triangle (and probably other) examples on GNOME/Wayland:

    [wayland-client error] Attempted to dispatch unknown opcode 0 for wl_shm, aborting.



Co-authored-by: David Shah <dave@ds0.me>
2020-11-10 20:57:19 +00:00
David Shah b87ccf94a5 Bump winit version to 0.23.0
This fixes the following error trying to run the hello-triangle (and
probably other) examples on GNOME/Wayland:

    [wayland-client error] Attempted to dispatch unknown opcode 0 for wl_shm, aborting.

Signed-off-by: David Shah <dave@ds0.me>
2020-11-10 20:28:41 +00:00
bors[bot]andAlan Kemp 9baf8b2d4f Merge #612
612: Update create_buffer_init_polyfill for wasm32 r=grovesNL a=alankemp

This removes create_buffer_mapped which has been removed in the latest chrome canary and firefox nightly and fixes #609 

Co-authored-by: Alan Kemp <alan@alankemp.com>
2020-11-10 02:59:00 +00:00
Marvin Löbel d4da2684c3 Add more context to errors originating in Passes and Encoders 2020-11-09 23:49:19 +01:00
Alan Kemp 515909a999 Update create_buffer_init_polyfill for wasm32 2020-11-09 21:22:03 +00:00
bors[bot]andDzmitry Malyshau 679811b5c2 Merge #611
611: Match inputs/outputs in msaa-line shader r=kvark a=kvark

Note: this shouldn't be necessary, as the varyings are matched by location and not the name. However, spirv-cross doesn't try to fiddle with the varying names, so it fails if they are unmatched.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-11-09 14:31:28 +00:00
Dzmitry Malyshau d004ddc038 Match inputs/outputs in msaa-line shader 2020-11-09 09:27:51 -05:00
bors[bot]andZsolt Bölöny 9f991ac674 Merge #610
610: Rename TextureUsage::OUTPUT_ATTACHMENT to RENDER_ATTACHMENT r=kvark a=yzsolt

Depends on https://github.com/gfx-rs/wgpu/pull/1017 

Co-authored-by: Zsolt Bölöny <bolony.zsolt@gmail.com>
2020-11-09 14:03:43 +00:00
Zsolt Bölöny e4f408c8bd Update dependencies 2020-11-09 13:50:06 +01:00
Zsolt Bölöny 16427aed19 Rename TextureUsage::OUTPUT_ATTACHMENT to RENDER_ATTACHMENT 2020-11-09 10:35:55 +01:00
bors[bot]andDzmitry Malyshau a79d90dc16 Merge #606
606: Enable GL backend r=kvark a=kvark

Replaces #182
Depends on https://github.com/gfx-rs/wgpu/pull/907

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-11-05 04:13:45 +00:00
bors[bot]andZicklag e2de17be6b Merge #605
605: Enable X11 Support for the GL Backend r=kvark a=zicklag



Co-authored-by: Zicklag <zicklag@katharostech.com>
2020-11-05 04:05:27 +00:00
Dzmitry Malyshau b6cabe16a2 Enable GL backend 2020-11-04 23:02:01 -05:00
Zicklag 3ef2b8aa3c Enable X11 Support for the GL Backend 2020-11-03 16:14:58 -06:00
bors[bot]andMarvin Löbel 86757f4ee8 Merge #598
598: Clarify docs for Queue::write methods r=kvark a=Kimundi



Co-authored-by: Marvin Löbel <loebel.marvin@gmail.com>
2020-10-22 16:17:26 +00:00
Marvin Löbel 4e819d9c03 Clarify docs for Queue::write methods 2020-10-22 17:40:23 +02:00
bors[bot]andDzmitry Malyshau e3eadca8c6 Merge #596
596: Update wgpu with another bind group fix, updated power preference r=kvark a=kvark

Includes https://github.com/gfx-rs/wgpu/pull/973 and https://github.com/gfx-rs/wgpu/pull/980

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2020-10-13 20:58:27 +00:00
Dzmitry Malyshau 503b61dc6c Update wgpu with another bind group fix, updated power preference 2020-10-13 16:57:52 -04:00
bors[bot]andParis DOUADY c125f70a1b Merge #594
594: Fix mipmap example which was y-flipped r=kvark a=Uriopass

Mipmap rendering was y-flipped, hence making one out of every two mipmaps wrong. See:

![image](https://user-images.githubusercontent.com/5420739/95760589-7eba1f80-0cab-11eb-8a5f-bfe9e228b480.png)

(look at the black dots)

Co-authored-by: Paris DOUADY <paris.douady@hotmail.fr>
2020-10-12 14:56:08 +00:00
Paris DOUADY c4d7ce146f Fix mipmap example which was y-flipped 2020-10-12 16:51:24 +02:00
Dzmitry Malyshau 30fb46a999 Really fix the environment to WGPU_BACKEND this time 2020-10-11 23:43:39 -04:00
382eaad235 Merge #593
593: Update wgpu with push constants API r=kvark a=kvark

Includes https://github.com/gfx-rs/wgpu/pull/966, https://github.com/gfx-rs/wgpu/pull/969, and https://github.com/gfx-rs/wgpu/pull/970

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-10-12 03:20:17 +00:00
Dzmitry Malyshau d8fe188305 Support WGPU_BACKEND environment in the examples 2020-10-11 23:17:38 -04:00
Dzmitry Malyshau 507770ad73 Immediate resource destruction 2020-10-11 23:17:37 -04:00
Dzmitry Malyshau adcd50d6c9 Update wgpu with push constants API 2020-10-11 23:17:37 -04:00
bors[bot]andDzmitry Malyshau 1506887903 Merge #589
589: Update to latest wgpu with Naga validation r=cwfitzgerald a=kvark

Depends on https://github.com/gfx-rs/wgpu/pull/962
Includes latest Naga validation stuff.
~~Warning: subject to https://github.com/gfx-rs/naga/issues/228~~

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-10-07 21:39:22 +00:00
Dzmitry Malyshau 4f57899b0d Update to latest wgpu with Naga validation 2020-10-07 17:36:15 -04:00
bors[bot]andRobert Broketa 0609e95ed7 Merge #577
577: Fixes #575 - vulkan-portability feature on MacOS r=kvark a=rybertm

See #575.
This PR fixes the issue with enabling `vulkan-portability` on MacOS.

Co-authored-by: Robert Broketa <robertbroketa@gmail.com>
2020-09-22 02:21:37 +00:00
Robert Broketa b965b60f86 Fixes #575 - vulkan-portability feature on MacOS 2020-09-21 14:32:46 -03:00
bors[bot]andMaarten de Vries 690ec8bfe6 Merge #574
574: Implement AsRef for BufferView r=kvark a=de-vri-es

This PR implements `AsRef` and `AsMut` in addition to `Deref` and `DerefMut` for `BufferView` and `BufferViewMut`.

This allows the buffer views to be used directly by generic code that wants an `AsRef<[u8]>`.

It's also subjectively a small win when you want to pass the views to non-generic code. I find `buffer.as_ref()` clearer than `&*buffer`. That also goes for `buffer.deref()`, but `Deref` is not in the prelude.

Co-authored-by: Maarten de Vries <maarten@de-vri.es>
2020-09-21 15:43:25 +00:00
Maarten de Vries 74ee772214 Implement AsRef for BufferView
Remove AsRef<[u8]> for BufferViewMut.
2020-09-21 17:35:30 +02:00
bors[bot]andConnor Fitzgerald 55cafa3988 Merge #576
576: Convert swapchain.get_current_frame to a immutable reference r=kvark a=cwfitzgerald

Per our discussion on matrix, converts swapchain.get_current_frame to an immutable reference as it's internally synchronized.

Rationale: will allow me to take a non-pretty RW mutex as read instead of write in my application

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-09-20 19:33:08 +00:00