Aaron Hill
fd5550cc89
Make RequestAdapterOptions.power_preference optional ( #3903 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-07-19 21:04:31 +00:00
Ashley
e4eb5b38ec
Fix ASTC feature selection in the webgl backend ( #3934 )
...
* Update glow to a new minor version, improve gles adapter astc feature selection
* Update Cargo.lock
* Add changelog entry
* Improve cfg flags to filter out emscripten
2023-07-17 14:40:53 +02:00
Nicolas Silva
7198d60f68
Validate that BufferDescriptor::usage is not zero ( #3928 )
...
* Validate that BufferDescriptor::usage is not zero.
* Add a changelog entry.
2023-07-14 22:41:34 +02:00
Wez Furlong
2af6d1bc63
Ensure X11 connections are closed ( #3924 )
...
Introduces a DisplayOwner struct to own both the library
and associated display pointer; their lifetimes are combined
in that struct.
The display pointer is encapsulated in a DisplayRef.
When DisplayOwner is dropped, it ensures that the DisplayRef
is correctly closed prior to unloading the library.
refs: https://github.com/gfx-rs/wgpu/issues/3813
2023-07-13 12:32:18 +02:00
Fredrik Fornwall
89f721f882
Make initialize_adapter_from_env take a compatible surface ( #3905 )
...
* Make initialize_adapter_from_env take a compatible surface
Add a compatible surface parameter to initialize_adapter_from_env, and
use that to make initialize_adapter_from_env_or_default always respect
its compatible_surface parameter.
---------
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2023-07-10 09:27:02 +02:00
Connor Fitzgerald
a885840a49
Update changelog for 0.16.2 ( #3917 )
2023-07-09 05:20:11 +00:00
AdrianEddy
e85cc91b5d
Add support for importing external buffers ( #3355 )
2023-07-07 18:00:08 -04:00
Fredrik Fornwall
234dea18c4
Fix link to GPUVertexBufferLayout
...
Fixes #3342 .
2023-07-05 20:08:22 -02:30
Fredrik Fornwall
1c43272d2a
Remove backend_bits from initialize_adapter_from_env ( #3904 )
...
Remove backend_bits from initialize_adapter_from_env, backends can
be specified using the backends field in InstanceDescriptor instead.
2023-07-05 18:21:39 +02:00
Fredrik Fornwall
17143c149c
Make shader write&read storage buffers match non readonly layouts ( #3893 )
2023-06-29 22:30:34 +00:00
daxpedda
88f18ed190
Don't implement Send
or Sync
on Wasm ( #3691 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-06-29 20:31:18 +00:00
AlbinBernhardssonARM
7c34cc86e8
Implement depth-clip-control using depthClamp ( #3892 )
2023-06-29 16:15:21 -04:00
Jinlei Li
757245cdfc
metal: support (simulated) visionOS ( #3883 )
2023-06-23 19:31:35 -04:00
Jinlei Li
cc203a66b1
web: use get_preferred_canvas_format()
to fill SurfaceCapabilities
( #3744 )
...
* web: use `get_preferred_canvas_format()` to fill `formats` of `SurfaceCapabilities`
* Only keep preferred format as the first element
* Update CHANGELOG
* Find preferred format and move it to the first position in the formats.
* Add a note to preferred_format.
* Remove the unnecessary allocation.
2023-06-23 22:24:58 +08:00
Sven Sauleau
45efae315b
fix Wasm casing ( #3878 )
2023-06-21 20:54:07 +00:00
Andrew Wheeler(Genusis)
2ee2e1a770
Update RenderPass draw, draw_indexed, set_viewport and set_scissor_rect documentation ( #3860 )
2023-06-17 17:11:24 +00:00
Xiaopeng Li
f9fcb54ce4
Disable suballocation on Iris(R) Xe gpu ( #3668 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-06-15 20:18:38 +00:00
Pieter-Jan Briers
acb7712c5a
Allow empty scissor rects ( #3863 )
2023-06-15 15:49:06 -04:00
liquidev
dfa5400a78
GLES: on EGL, respect the user requesting a non-sRGB surface format ( #3817 )
...
* EGL: respect the user requesting a non-sRGB surface format
What used to happen was that sRGB was used whether you requested it or not.
This commit fixes that and now passing in a non-sRGB texture format in SurfaceConfiguration will result in a non-sRGB surface being created.
* add changelog entry about the EGL non-sRGB support change
2023-06-06 19:59:00 +02:00
Teodor Tanasoaia
2e4209c537
Add back components info of TextureFormat
s ( #3843 )
...
* add back components info of `TextureFormat`s
* add changelog
2023-06-06 19:28:46 +02:00
Jim Blandy
3f0aed789d
Don't report violations of VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912 ( #3809 )
...
As described in [Vulkan-ValidationLayers#5671], the validation layers don't understand debug ranges paired across different command buffers on the same queue, even though the Vulkan spec says:
> An application may open a debug label region in one command buffer and close it in another, or otherwise split debug label regions across multiple command buffers or multiple queue submissions. When viewed from the linear series of submissions to a single queue, the calls to vkCmdBeginDebugUtilsLabelEXT and vkCmdEndDebugUtilsLabelEXT must be matched and balanced.
Until this is fixed, wgpu should ignore this validation error to reduce noise in test runs.
Fixes #3733 .
[Vulkan-ValidationLayers#5671]: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5671
2023-06-06 06:56:44 -04:00
Connor Fitzgerald
1d2a667b71
Fix trying to use a renderpass inside a compute pass ( #3828 )
...
* Fix trying to use a renderpass inside a compute pass
* Fix pipeline statistics test on mac
* Changelog
2023-06-05 09:05:59 -04:00
Connor Fitzgerald
1cb0bdcdef
Fix incorrect aspect in barriers when using emulated Stencil8 textures. ( #3833 )
2023-06-04 23:32:06 -04:00
Connor Fitzgerald
ad45f29bb6
Changelog backport
2023-06-01 01:55:55 -04:00
Elabajaba
e6314c4070
DX12 increase max_storage_buffers_per_shader_stage
and max_storage_textures_per_shader_stage
( #3798 )
2023-05-30 12:38:54 +02:00
Emil Ernerfeldt
b0dfd11a01
Fix missing 4X MSAA support on some OpenGL backends ( #3780 )
...
* Always support 4x MSAA on GL
* Update changelog
2023-05-19 16:39:07 +02:00
Malek
dafc189d6b
Fix multiview rendering ( #3779 )
2023-05-19 00:03:57 -04:00
Robin KAY
c91a660ec5
Fix order of arguments to glPolygonOffset. ( #3783 )
2023-05-18 22:40:35 +00:00
Jim Blandy
3563849585
Document that various sizes and offsets are in bytes. ( #3773 )
2023-05-13 22:22:28 -04:00
Paul Hansen
28374fb1c8
Publish examples to wgpu.rs on updates to trunk branch instead of gecko ( #3750 )
2023-05-11 12:12:25 -04:00
Erich Gubler
f71a1bc736
docs(adapter): document device
and vendor
IDs repr. ( #3763 )
2023-05-10 12:13:01 +00:00
Ame
4d8a7ed38d
Change AdapterInfo::{device,vendor}
fields to u32
( #3760 )
...
* Change AdapterInfo device and vendor to u32s
* Add CHANGELOG
2023-05-09 11:17:27 +02:00
Erich Gubler
0f0044f358
fix(wgpu-core)!: use u32
indices for bind group layouts everywhere ( #3743 )
2023-05-03 20:56:54 -04:00
Jim Blandy
49800337d1
Define wgpu_core::Global::create_render_bundle_error. ( #3746 )
2023-05-03 14:17:18 -07:00
Erich Gubler
3e562aaeaa
docs: note feature req. for Depth32FloatStencil8
( #3734 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-05-03 10:08:52 +00:00
Andreas Reich
1dd105c3bf
Fix crash on command buffer drop ( #3726 )
2023-05-03 05:00:59 -04:00
Connor Fitzgerald
0b53b477c5
Update CHANGELOG.md
2023-04-19 21:54:23 -04:00
Connor Fitzgerald
011a4e26d0
Release v0.16.0 ( #3707 )
...
Co-authored-by: Connor Fitzgerald <connor@modyfi.io>
2023-04-19 22:06:21 +00:00
Alix Bott
c86f9773ca
Fix unsetting vertex attributes in gles backend ( #3706 )
...
Co-authored-by: Connor Fitzgerald <connor@modyfi.io>
2023-04-19 21:14:45 +00:00
daxpedda
85fc427470
Adjust internal canvas size on Surface::configure()
( #3690 )
2023-04-19 21:09:31 +00:00
François
bf8e6fe371
add feature RG11B10UFLOAT_RENDERABLE on webgpu ( #3689 )
...
* add feature RG11B10UFLOAT_RENDERABLE on web
* changelog
2023-04-14 14:52:37 +02:00
François
7c25c00f07
reject binding type multisampled when on a float filterable sample type ( #3686 )
2023-04-13 13:55:56 -04:00
Connor Fitzgerald
a7defb723f
Cleanups for WebGPU ( #3671 )
...
Co-authored-by: Connor Fitzgerald <connor@modyfi.io>
2023-04-12 21:27:30 +00:00
Josh Groves
cfc038aeb9
Avoid using WasmAbi
functions on WebGPU backend ( #3657 )
...
Co-authored-by: Connor Fitzgerald <connor@modyfi.io>
2023-04-10 16:31:43 -04:00
David Huculak
4d15567392
add dxc error message formatting ( #3632 )
2023-04-10 15:51:46 -04:00
Niklas Korz
2c37608ad3
Web: handle None for depth_ops and stencil_ops ( #3660 )
2023-04-10 11:21:17 +02:00
Teodor Tanasoaia
6918cf33d4
[metal] Fix metal erroring on an array_stride
of 0 ( #3538 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-04-05 22:40:15 +00:00
Sebastian J. Hamel
27cdfd2954
Silence vulkan validation error ( #3095 ) ( #3627 )
2023-04-05 18:15:43 -04:00
Lukas Herzberger
b6dbce740f
Implement resolve query set ( #3489
...
* implement command_encoder_resolve_query_set
* fix args
* add BufferUsages::QUERY_RESOLVE
* update changelog
* fix link text
* validate query resolve: check for QUERY_RESOLVE instead of CPY_DST
* update changelog, replace COPY_DST with QUERY_RESOLVE in mipmap example
2023-04-05 17:59:04 -04:00
Benjamin Schaaf
fdbbd02c1e
Properly drop surfaces ( #3647 )
...
Co-authored-by: Benjamin Schaaf <bschaaf@sublimetext.com>
Fixes #3646
2023-04-05 17:48:12 -04:00
Teodor Tanasoaia
37fbae7872
Revert "Fix macro to allow disabling dx12
feature. ( #3590 )" ( #3649 )
...
This reverts commit 110e62aed2
.
2023-04-04 15:16:31 +02:00
daxpedda
9fa7186ede
[gles] Fix tex_sub_image_*
calls not always adjusting to target texture ( #3641 )
2023-04-04 13:51:13 +02:00
Jeremy Leibs
68b0b24ce8
Reset the queue state between each command buffer on queue submit ( #3593 )
...
Co-authored-by: Andreas Reich <andreas@rerun.io>
2023-03-22 15:08:44 -04:00
Emil Ernerfeldt
a89e35a4e0
Validate shader location clashes ( #3613 )
...
* Validate shader location clashes
* Add line to changelog
2023-03-22 14:56:52 +01:00
Connor Fitzgerald
0c3ca5c08b
Fix Metal Mipmap Behvior ( #3610 )
2023-03-21 16:37:30 +00:00
Christopher Fleetwood
a502282307
feat: correct bounds policy checking on MSL ( #3603 )
2023-03-21 12:33:25 +01:00
Andreas Reich
2a37b2d918
added changelog
2023-03-20 15:42:51 -02:30
Andrew Numrich
110e62aed2
Fix macro to allow disabling dx12
feature. ( #3590 )
...
* Fix macro for DX12 conditional compilation
* Update CHANGELOG.md
* Apply suggestions from code review
---------
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2023-03-15 18:48:47 +01:00
Jim Blandy
0772df798d
Don't emit ANSI colors in shader validation error messages. ( #3591 )
2023-03-14 22:35:02 -04:00
Connor Fitzgerald
42a0683d48
Remove unwraps inside surface.configure
( #3585 )
2023-03-14 11:01:02 +01:00
Jinlei Li
9445317f26
Set max_memory_allocation_size
via PhysicalDeviceMaintenance3Properties
( #3567 )
...
* vulkan: set `max_memory_allocation_size` via `PhysicalDeviceMaintenance3Properties`
* Update CHANGELOG
* Follow the suggestions
* Fix fmt
* Update wgpu-hal/src/vulkan/adapter.rs
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
* Enable `KhrMaintenance3Fn` on vk < 1.1
---------
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2023-03-09 20:05:39 +01:00
Kevin Reid
13d2c3673c
In Context::handle_error_fatal
, print cause chain. ( #3563 )
2023-03-06 23:00:34 -05:00
Teodor Tanasoaia
cf40e64b16
Change type of bytes_per_row
and rows_per_image
( #3529 )
2023-03-06 16:44:36 -05:00
Josh Groves
2eb27f2c0e
Fix definition of NSOperatingSystemVersion
( #3557 )
2023-03-06 16:43:39 -05:00
Teodor Tanasoaia
54e4c8654d
[dx12] use typeless formats for textures that might be viewed as srgb or non-srgb ( #3555 )
...
query `CastingFullyTypedFormatSupported` and skip typeless formats if available
2023-03-03 19:42:34 +00:00
Teodor Tanasoaia
7e72f30179
Allow copying of textures with copy-compatible formats ( #3528 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-03-03 17:24:17 +00:00
Teodor Tanasoaia
ac689cbe1f
Update feature documentation ( #3534 )
2023-03-03 12:09:17 -05:00
Connor Fitzgerald
db3be88f90
Uppercase all error strings
2023-03-03 11:33:20 -05:00
Jinlei Li
de695fca0b
metal: if new_texture()
returns NULL, create_texture()
returns an error ( #3554 )
2023-03-03 13:51:38 +01:00
James Liu
6ee0d4c14d
Replace fxhash with rustc-hash ( #3502 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-03-01 18:46:38 +00:00
James0124
9dc834a0ac
Treat VK_SUBOPTIMAL_KHR
as VK_SUCCESS
on Android. ( #3525 )
2023-02-27 10:52:09 +01:00
Red Artist
af5f4d20f4
enable debug extension on emscripten ( #3519 )
...
* enable debug extension on emscripten
* update changelog
* extract emscripten stuff into a separate module
* use unmasked queries on w-u-u, and only enable extension on emscripten
* fix docs
2023-02-22 01:16:14 -05:00
Teodor Tanasoaia
074d1da831
Set the new naga capabilities ( #3494 )
...
* remove redundant flag
* set the `MULTISAMPLED_SHADING` downlevel flag for gles and dx11
* set the right naga capabilities
add `Features::SHADER_EARLY_DEPTH_TEST`
* add changelog entry
* remove `@early_depth_test` from water example
2023-02-16 22:43:38 -05:00
Teodor Tanasoaia
c51edd36fd
Support stencil-only views and copying to/from combined depth-stencil textures ( #3436 )
2023-02-15 16:20:22 -05:00
Artavazd Balaian
ee33f4d384
[gles] fix: Set FORCE_POINT_SIZE
if it is vertex shader with mesh consist of point list ( #3440 )
2023-02-15 10:05:52 -05:00
Teodor Tanasoaia
b33731c44c
Validate before extracting texture selectors ( #3487 )
...
Move calls to `extract_texture_selector` after calls to `validate_texture_copy_range`, to avoid overflow.
2023-02-14 12:31:18 -08:00
Jinlei Li
4593f951dd
vk: fix surface view formats validation error ( #3432 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-02-09 13:00:42 -05:00
Jinlei Li
0d5b4841d5
web: reimplement adapter|device_features
( #3428 )
2023-02-09 12:14:15 -05:00
Nathan Adams
238697c2da
Add MULTISAMPLE_X16 texture format feature flag where supported ( #3454 )
2023-02-06 19:53:48 +01:00
Teodor Tanasoaia
41de797c74
Change type of mip_level_count
and array_layer_count
(members of TextureViewDescriptor
and ImageSubresourceRange
) from Option<NonZeroU32>
to Option<u32>
( #3445 )
...
Clean up duplicated code related to texture layers/mips.
2023-02-03 15:03:34 +01:00
Elabajaba
7826092d86
Fix dx12 shader validation errors when dxil.dll isn't available in the local scope. ( #3434 )
...
* Fix dx12 shader validation errors when dxil.dll isn't available in the local scope.
* changelog
* clippy
* always explicitly validate shaders to simplify code
* destructor ordering
2023-02-01 22:55:54 -05:00
Elabajaba
c5e2f5a7b9
Add SHADERINT_16
feature to allow 16bit ints in Vulkan shaders ( #3401 )
...
* add support for vulkan SHADER_INT16
* changelog
* deno shader-i16
* better INT16 docs
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
* fix typo
---------
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-02-02 02:00:22 +00:00
AdrianEddy
2562f323bb
[Metal] Add a way to create a device and queue from raw resources in wgpu-hal ( #3338 )
2023-02-01 23:56:48 +00:00
João Capucho
c371e7039d
Implement the new checks for readonly stencils ( #3443 )
...
wgpu currently checks if the `write_mask` is 0 to determine wether a
stencil is used as readonly or not. However Webgpu contains a more
complex ruleset that also checks the cull mode and face operations to
determine if the stencil is readonly or not.
This commit brings these new rules to wgpu.
2023-02-01 21:13:46 +01:00
Teodor Tanasoaia
98ea3500fd
copyTextureToTexture
src/dst aspects must both refer to all aspects of src/dst format (#3431 )
...
* src/dst aspects must both refer to all aspects of src/dst format
* add changelog entry
2023-01-28 17:08:21 +01:00
Jinlei Li
b31069f14a
Improve vk format msaa capabilities detection ( #3429 )
...
* Improve vk format msaa capabilities detection
* Update CHANGELOG
* Follow the suggestions
* Update wgpu-hal/src/vulkan/adapter.rs
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2023-01-28 12:03:43 +00:00
Raph Levien
fe2b230b0e
Implement clear_buffer
on web ( #3426 )
2023-01-26 22:32:34 +00:00
Connor Fitzgerald
659f697705
Add naga section in changelog
2023-01-25 19:45:50 -05:00
Connor Fitzgerald
d3fec9524f
Release of 0.15 ( #3424 )
2023-01-25 19:25:41 -05:00
Teodor Tanasoaia
d2809137ba
Zero-initialize workgroup memory ( #3174 )
...
fixes https://github.com/gfx-rs/wgpu/issues/2430
2023-01-25 18:28:35 -05:00
Jinlei Li
33f94c7c84
Implement view_formats
for SurfaceConfiguration
( #3409 )
...
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-01-25 21:04:41 +00:00
IceSentry
bb876f372a
Better error message for 16 byte alignment error ( #3414 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: gilescope <gilescope@gmail.com>
Closes https://github.com/gfx-rs/wgpu/pull/3099
Closes https://github.com/gfx-rs/wgpu/issues/2832
2023-01-24 20:46:19 +00:00
Elabajaba
5da2b8ad6b
implement add_srgb_suffix for TextureFormat ( #3419 )
2023-01-24 15:16:45 -05:00
Connor Fitzgerald
95a760bb42
Implement queue.copy_external_image_to_texture for WebGL2 and improve WebGPU Impl ( #3288 )
...
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
Closes https://github.com/gfx-rs/wgpu/issues/1888
2023-01-24 18:44:15 +00:00
Teodor Tanasoaia
964c94a02d
Update TextureView
validation ( #3410 )
...
* update TextureView validation
* add changelog entry
* remove call to clone
* dereference instead
2023-01-24 12:02:16 +01:00
1e1001
5acb70691d
Make make_spirv_raw
and make_spirv
handle big-endian binaries ( #3411 )
...
Fixes https://github.com/gfx-rs/wgpu/issues/3408
2023-01-21 04:04:55 +00:00
Nathan Adams
c5851275c5
GLES: Cache and reuse programs between similar pipelines ( #3380 )
...
* Cache programs in GLES backend by their stage info, to avoid recreating the same program untold many times
* Don't duplicate an arcs ref count in gles programs
* Extract ProgramCacheKey from gles ProgramCache
* gles: Panic if we can't acquire program_cache lock
* Clarify why the program cache is safe
2023-01-20 09:44:34 -05:00
Nathan Adams
cecf0633a3
Don't panic when gl.create_buffer() fails on webgl ( #3396 )
2023-01-18 21:31:16 +00:00
Elabajaba
81569dd6c3
Updated Dxc integration for DX12 backend ( #3356 )
...
Co-authored-by: unknown <alimilhim5@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Closes https://github.com/gfx-rs/wgpu/issues/2722
closes https://github.com/gfx-rs/wgpu/pull/3147
2023-01-18 21:25:56 +00:00
Jinlei Li
0849e78600
Add view_formats
in TextureDescriptor ( #3237 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Closes https://github.com/gfx-rs/wgpu/issues/3030
2023-01-18 16:03:56 -05:00
Teodor Tanasoaia
fae740df5c
Fix being able to sample a depth texture with a filtering sampler ( #3394 )
2023-01-18 15:53:50 -05:00
Nathan Adams
0705c7ad6b
Create gles buffers with DYNAMIC_DRAW instead of STATIC_DRAW ( #3391 )
2023-01-17 10:56:27 +01:00
Leo Kettmeir
f40611fd5c
don't panic on mapped buffer in queue_submit ( #3364 )
2023-01-15 07:10:11 +01:00
Jim Blandy
fac4731288
Add missing CHANGELOG.md entry.
2023-01-14 10:25:21 -08:00
Nathan Adams
4400ff8289
Increase GL MAX_PUSH_CONSTANTS from 16 to 64 ( #3374 )
2023-01-13 00:18:54 +00:00
Mica White
f2d2a0c00c
Remove panics in Deref
impl of QueueWriteBufferView
and BufferViewMut
( #3336 )
2023-01-12 18:57:06 +01:00
Teodor Tanasoaia
80d237725e
[vk] Set WEBGPU_TEXTURE_FORMAT_SUPPORT
downlevel flag depending on the proper format support ( #3367 )
2023-01-10 16:33:33 +01:00
Teodor Tanasoaia
98ddb402eb
Set COPY_SRC
/COPY_DST
only based on Vulkan's TRANSFER_SRC
/TRANSFER_DST
( #3366 )
...
* remove `BLIT_SRC`/`BLIT_DST`
* add changelog entry
2023-01-10 15:48:16 +01:00
James0124
e7ca1716f5
Fix panic in the GLES backend when creating a pipeline with opaque ty… ( #3361 )
...
* Fix panic in the GLES backend when creating a pipeline with opaque types other than samplers.
* Add changelog entry for #3361 .
2023-01-10 09:26:45 +01:00
JMS55
ad4dac87fb
Allow non-filtering integer texture sampling ( #3362 )
...
* Allow non-filtering integer texture sampling
* Add changelog entry
2023-01-09 11:08:14 +01:00
James0124
a06ef71fd7
Add validation in accordance with WebGPU GPUSamplerDescriptor
valid… ( #3353 )
...
* Add validation in accordance with WebGPU `GPUSamplerDescriptor` valid usage for `lodMinClamp` and `lodMaxClamp`.
`lodMinClamp` must not be negative, and `lodMaxClamp` must be >= `lodMinClamp`
* Add changelog entry.
* Run `cargo fmt`.
2023-01-06 13:16:16 +01:00
Teodor Tanasoaia
39f6b03e19
Document and improve extension detection ( #3327 )
...
* document and improve extension detection
* add changelog entry
* request `VK_KHR_get_physical_device_properties2` unconditionally
* remove commented code
* remove vk 1.1 check
2023-01-05 11:20:56 +01:00
Teodor Tanasoaia
784ee43be7
Make ObjectId
structure and invariants idiomatic ( #3347 )
2023-01-04 15:13:59 -05:00
Xiaopeng Li
71f50409e6
GraphicsCommandList validation ( #3204 )
...
* GraphicsCommandList validation
* Add change to CHANGELOG.md
* Close command list
* Destroy command buffer
* Find valid command list for reuse
* Fix clippy
2023-01-04 14:22:39 +01:00
Nathan Adams
186a29c34d
Implement TextureFormat::Stencil8 + add stencil example ( #3343 )
...
* Implement TextureFormat::Stencil8
* Add stencil-triangles demo to test Stencil8 and show how to use stencil testing
* Added changelog for Stencil8
2023-01-02 13:47:10 +01:00
Connor Fitzgerald
aa46e82f40
Fix texture view creation with full-resource views when using an explicit mip_level_count
or array_layer_count
2022-12-21 17:24:46 -05:00
Andreas Reich
eaa87ba42c
Force all adapters to report min buffer alignment of 32 ( #3262 )
2022-12-21 13:46:15 -05:00
Connor Fitzgerald
5241633b3a
Implement Presentation Timestamp Correlation ( #3240 )
...
Co-authored-by: Jim Blandy <jimb@red-bean.com>
2022-12-20 17:52:08 +00:00
Elabajaba
f3c50918c2
Suballocate DX12 buffer creation ( #3163 )
...
closes https://github.com/gfx-rs/wgpu/issues/2720
2022-12-20 12:23:44 -05:00
Teodor Tanasoaia
62e932b0a8
Add missing DEPTH_BIAS_CLAMP
and FULL_DRAW_INDEX_UINT32
downlevel flags ( #3316 )
...
* add missing `DEPTH_BIAS_CLAMP` and `FULL_DRAW_INDEX_UINT32` downlevel flags
* add changelog entry
* use require_downlevel_flags
2022-12-20 18:21:54 +01:00
Teodor Tanasoaia
c91cae47d2
[dxgi] fix depth16Unorm
formats for nodepth and typeless ( #3313 )
...
* [dxgi] fix `depth16Unorm` formats for nodepth and typeless
* add changelog entry
2022-12-20 15:29:43 +01:00
Teodor Tanasoaia
14886ee142
Sync depth/stencil copy restrictions with the spec ( #3314 )
...
* sync depth/stencil copy restrictions with the spec
* add changelog entry
2022-12-20 15:26:00 +01:00
Teodor Tanasoaia
8ca6e385ba
Sync TextureFormat.describe
with the spec ( #3312 )
...
* sync TextureFormat.describe with the spec
* add changelog entry
2022-12-20 15:23:15 +01:00
i509VCB
052bd17d41
Context dynamic dispatch ( #3051 )
2022-12-19 19:17:19 -05:00
Andreas Reich
46831a8b25
deref/deref_mut methods on buffer-views inline ( #3307 )
...
* mark deref/deref_mut methods on buffer-views inline
* inline for deref for both direct/web backend
* changelog entry
2022-12-19 15:40:47 +01:00
Jim Blandy
0e4c7dd6d2
Remove workspace inheritance ( #3295 )
2022-12-15 15:46:28 -05:00
Connor Fitzgerald
3ce5ca866b
Improve dynamic offset binding errors ( #3294 )
2022-12-15 00:53:42 +00:00
Connor Fitzgerald
2480eff65e
Error when not using cargo-nextest ( #3293 )
...
Closes https://github.com/gfx-rs/wgpu/issues/3285
2022-12-15 00:09:04 +00:00
Harald Reingruber
f0f700c2d9
Test setup for WebAssembly+WebGL ( #3238 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-12-09 01:02:39 +00:00
Elabajaba
85fda2d18e
Update to ash 0.37.1 to replace deprecated function call ( #3273 )
...
* update to ash 0.37.1 to fix CI
* changelog
* Use equals for ash version
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-12-08 15:22:30 -05:00
Connor Fitzgerald
458fb9bed7
Implement SHADER_PRIMITIVE_INDEX on all Backends ( #3272 )
...
* Fix bunnymark on GL
* Implement SHADER_PRIMITIVE_INDEX on all backends
* Changelog
2022-12-08 08:47:44 -05:00
Jim Blandy
a50836e0cb
Make wgpu-core
users responsible for choosing back ends. ( #3254 )
2022-12-07 20:58:45 -05:00
Jim Blandy
537f077132
Evaluate gfx_select's #[cfg] conditions at the right time. ( #3253 )
...
See the comments in the code for details.
2022-12-05 12:47:42 -08:00
Ashley
6147c91818
Support OES_texture_float_linear
in webgl ( #3261 )
...
closes https://github.com/gfx-rs/wgpu/issues/3215
2022-12-05 12:58:06 -05:00
Jinlei Li
5f3acf50b4
Decrease max_buffer_size
limit value to be compatible with Apple2 GPU ( #3255 )
...
* Decrease `max_buffer_size` limit value to be compatible with Apple2 GPU
* Update CHANGELOG
* Update CHANGELOG.md
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-12-03 08:12:43 +00:00
Kevin Reid
2209463a54
Return an error instead of panicking when canvas context is unavailable ( #3052 )
...
* Low-level error handling in canvas context creation (for WebGPU and WebGL 2).
Part of fixing #3017 . This commit changes the handling of `web_sys`
errors and nulls from `expect()` to returning `Err`, but it doesn't
actually affect the public API — that will be done in the next commit.
* Breaking: Change type of `create_surface()` functions to expose canvas errors.
Part of fixing #3017 .
2022-11-30 23:41:29 -05:00
Nicolas Silva
e90aacea96
Validate texture copy ranges earlier to prevent integer overflow ( #3090 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-12-01 01:20:48 +00:00
Jim Blandy
9c6a60d97c
Fix surface creation cfgs in example framework. ( #3246 )
2022-11-30 16:46:24 -05:00
Nicolas Silva
a9d33193b3
Fix incorrect offset in get_mapped_range ( #3233 )
...
* Add a test.
* Fix incorrect offset in get_mapped_range.
* Add an entry in the changelog.
2022-11-30 16:45:49 -05:00
Connor Fitzgerald
183ba3f231
Make Surface::get_default_config
return an Option.
2022-11-27 01:50:47 -05:00
Connor Fitzgerald
84cb3e65a9
Unify Surface Capabilities APIs under one function call
2022-11-27 01:50:47 -05:00
Nicolas Silva
82e9dcf8f7
Allow unspecified bits when deserializing the API's bitflags ( #3229 )
2022-11-25 23:13:22 -05:00
Jim Blandy
d4b1d57f3c
Move ResourceMetadata
into its own module, and give it a proper interface ( #3213 )
2022-11-23 17:29:20 -05:00
Jim Blandy
73b23f1c8d
Move minimum supported rust version (MSRV) from 1.65 back to 1.64. ( #3231 )
2022-11-23 21:22:03 +00:00
Andreas Reich
2ccfb42440
allow gles float textures to be multisampled if available ( #3183 )
2022-11-23 16:10:11 -05:00
Jim Blandy
596d8851aa
Update ndk-sys to v0.4.1+23.1.7779620, to fix checksum failures. ( #3232 )
2022-11-23 15:29:22 -05:00
Erich Gubler
18f3f5f6f0
Enable unsafe_ops_in_unsafe_fn
lint in all workspaces ( #3044 )
2022-11-14 10:49:39 -08:00
Ali
3c82a4cd5c
Added support for MSAA(x2,x8) beyond WEBGPU restrictions for native a… ( #3140 )
...
Closes https://github.com/gfx-rs/wgpu/issues/2910
2022-11-09 15:19:05 -05:00
Erich Gubler
46af01c302
build: migrate Rust 1.64 -> 1.65
2022-11-07 17:36:04 -08:00
Andreas Reich
a377ae2b7f
Alpha to coverage support for GLES ( #3187 )
2022-11-07 16:56:59 -05:00
Andreas Reich
b838b0871c
Added new UNRESTRICTED_INDEX_BUFFER downlevel flag. ( #3157 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-11-07 15:45:50 -05:00
Nicolas Silva
db30e3909a
Avoid integer overflow on multiplication in write_texture. ( #3146 )
2022-11-07 15:31:19 -05:00
Jim Blandy
9fb9dbf653
deno_webgpu: Don't confuse zero with "to the end of the buffer".
...
`RenderBundleEncoder::set_index_buffer` and `set_vertex_buffer`
interpret a `size` of `None` to mean "from the given offset to the end
of the buffer", but `std::num::NonZeroU64::new` produces `None` when
its argument is zero, which is quite different. Fix this similarly to
the way it's handled in `op_webgpu_render_pass_set_index_buffer`.
The WebGPU spec says this should work; filed as #3170 .
2022-11-03 09:14:18 -07:00
Connor Fitzgerald
4d199a38df
Forward port v0.14.1 changelog ( #3166 )
2022-11-02 22:15:03 +00:00
Lilith
a31cd2ef5c
Remove DEPTH24PLUS_STENCIL8
feature ( #3151 )
2022-11-02 16:44:15 -04:00
Harald Reingruber
51b34c5b51
Improve compute shader validation error message ( #3139 )
...
* Improve compute shader validation error message
* Add entry to changelog.
* Improve error message wording (by cwfitzgerald)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
* Add credit and PR link to changelog
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-10-29 17:49:03 -04:00
Jinlei Li
cc448817e7
Use cargo 1.64 workspace inheritance feature ( #3107 )
2022-10-20 01:41:17 -04:00
Ashley
d3ab5a197e
WebGL2 multiview support via OVR_multiview2 ( #3121 )
...
* Add OVR_multiview2 support
* Add changelog entry
* Only use multiview on wasm32 + unknown
* Add note to Features::MULTIVIEW
2022-10-18 12:14:18 -04:00
Nicolas Silva
d1ff3838b8
Expose the full Result type to the rust map_async callback ( #2939 )
2022-10-13 15:41:52 -04:00
i509VCB
7aca31fe9c
allow creation of wgpu_hal textures for gles backend ( #3046 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-10-13 06:41:12 +00:00
Jinlei Li
caee97e402
Add get_default_configure
to simplify user creation of SurfaceConfiguration
( #3034 )
2022-10-13 06:15:46 +00:00
Jinlei Li
b72bcc54dc
web: implement queue_validate_write_buffer
( #3098 )
2022-10-13 02:11:31 -04:00
Jim Blandy
f3d455b617
vulkan: Don't use pointer to dropped PhysicalDeviceDriverProperties. ( #3076 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-10-12 20:52:32 +00:00
killian
0951b033a7
Implement Hash for DepthStencilState and DepthBiasState ( #3092 )
...
* Implement Hash for DepthStencilState and DepthBiasState
* Fix clippy error
* cargo fmt
* Fix Hash implementation
Co-authored-by: char0313 <killia.charrier@etudiant.univ-reims.dr>
2022-10-11 19:14:10 +00:00
Andreas Reich
351ca3ea3d
Fix webgl srgb blit not setting the viewport correctly ( #3093 )
...
* Fix webgl srgb blit not setting the viewport correctly
* Add changelog notes
2022-10-11 14:04:06 -04:00
Nicolas Silva
eca04f59db
Make some errors not fatal ( #3094 )
2022-10-11 13:40:30 -04:00
daxpedda
318cb7aa9b
Implement Clone
for ShaderModuleDescriptor
( #3086 )
2022-10-09 14:14:33 -04:00
Andreas Reich
acadd8dad5
webgl backend supports now non-srgb framebuffer ( #3070 )
2022-10-08 23:48:44 -04:00
Lukas Herzberger
3cd93983b2
Create instance from worker ( #2858 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-10-08 05:49:20 +00:00
Olaroll
f57db150f2
Fixed missing device feature in mipmap example ( #3081 )
2022-10-08 05:42:57 +00:00
daxpedda
02cc2ae234
[BREAKING] Make Shader(Module)Source::Wgsl
optional ( #2890 )
2022-10-08 01:12:50 -04:00
char0313
6451d31b7a
Add a CHANGELOG entry
2022-10-07 18:16:23 -04:00
char0313
ac5390528e
Convert All Default Implementations on Enums to derive(Default)
2022-10-07 18:16:23 -04:00
Connor Fitzgerald
29643139e1
Update cargo-public-api report in release notes ( #3078 )
2022-10-07 00:01:40 +00:00
terrarier2111
1e63e8ca9b
Implement Default for CompositeAlphaMode ( #3074 )
2022-10-06 20:07:12 +00:00
Jim Blandy
58f92cc6b4
Provoke VUID-vkDestroyDevice-device-00378 without #3069 . ( #3075 )
2022-10-06 18:06:32 +00:00
Nicolas Silva
f68a095ecb
Add an entry in the changelog.
2022-10-06 10:12:16 -07:00
Connor Fitzgerald
261069d04f
Bump changelog
2022-10-05 18:45:25 -04:00
Mikko Lehtonen
60fd2a32e9
Implement missing PrettyError impls ( #3066 )
2022-10-05 18:43:52 -04:00
Yaroslav Biletskyi
50e2a5becf
Implement copyExternalImageToTexture
( #2781 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-10-05 21:56:26 +00:00
Nicolas Silva
37de3a3574
Set the image stride to zero when updating a single layer on metal. ( #3063 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-10-05 21:45:12 +00:00
Jinlei Li
b13bb468cb
gl: add Rgba16Float
format support for color attachments ( #3045 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-10-05 21:31:22 +00:00
Jinlei Li
4992de5938
gl: ASTC_HDR
feature detection ( #3042 )
2022-10-05 17:08:45 -04:00
Dragoș Tiselice
5c33e23b66
Fixed buffer sizes encoding on Metal. ( #3047 )
2022-10-05 16:44:51 -04:00
i509VCB
2372895944
Handle unsupported surfaces more gracefully ( #3054 )
2022-10-05 16:42:06 -04:00
Xander Warnez
2c1d7a8a5c
Split Blendability and Filterability into Two Different TextureFormatFeatureFlags ( #3012 )
...
* Split Blendability and Filterability into Two Different TextureFormatFeatureFlags
* Update CHANGELOG.md
* Split out individual booleans to improve readability
* Make sure blendablity is correctly set for guaranteed format features of WebGPU
* Cargo fmt
Co-authored-by: Xander Warnez <xander.warnez@materialise.be>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-09-21 19:39:01 +00:00
i509VCB
061e04bff1
expose driver info in AdapterInfo ( #3037 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-09-21 02:45:28 +00:00
Jinlei Li
ffd733726a
Update wasm32 dependencies, set alpha_mode
on web target ( #3040 )
2022-09-20 06:53:55 +00:00
i509VCB
65e405193e
vulkan: use effective api version for determining device features ( #3011 )
2022-09-20 01:11:15 -04:00
i509VCB
f877a8a3c9
Vendor id clarification ( #3036 )
...
* set GL vendor for id Mesa and Apple
* match on "apple m" to mark M2 cpu as integrated in gles
* document AdapterInfo::vendor if the vendor has no PCI id
2022-09-19 23:52:00 -04:00
daxpedda
95408cd48b
[BREAKING] Wrap ShaderSource::Naga
in Cow<'static>
( #2903 )
2022-09-19 00:50:46 -04:00
Imbris
41006d7a88
Buffer usages mismatch check and documentation for mapped_at_creation size requirement. ( #3023 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-09-19 04:41:29 +00:00
Jinlei Li
44399bb4a3
Expose alpha_mode, support non-opaque mode on metal and vk backends ( #2836 )
2022-09-19 00:10:21 -04:00
i509VCB
b752c7d248
statically assert public wgpu types appropriately implement Send and Sync ( #3025 )
2022-09-16 12:36:23 -04:00
i509VCB
9e3efd7019
pass around RawDisplayHandle and RawWindowHandle in implementation ( #3022 )
...
This change is to help with an attempt to allow the Context type in wgpu to be swappable at runtime. In order to do that, the functions provided by Context and it's associated types need to be object safe. Instead of passing a impl trait that combines both HasRawWindowHandle and HasRawDisplayHandle, we seperate the types into their RawDisplayHandle and RawWindowHandle parts internally to reduce some of the hal implementation code mess.
2022-09-15 16:29:20 -07:00
Jim Blandy
90eb399d43
Fill in Adapter::as_hal and Device::as_hal documentation. ( #2992 )
...
In particular, explain why a callback is needed, rather than just
having these functions return an `Option<&A::Mumble>`.
2022-09-02 20:56:27 -07:00
Jinlei Li
e350f50b2f
metal: remove PrivateCapabilities's format_rgb10a2_unorm_surface
field ( #2981 )
...
* metal: remove PrivateCapabilities's format_rgb10a2_unorm_surface field
* Update CHANGELOG
2022-09-02 20:28:26 -07:00
Jim Blandy
bec26b79ec
Don't use a callback to return backend instance handles. ( #2991 )
...
Change `Instance::as_hal<A>` to simply return an
`Option<&A::Instance>`, rather than passing it to a callback. We're
just borrowing a reference to some `wgpu_hal::Api::Instance` owned by
the `wgpu_core::instance::Instance`, so there's no special scoping or
locking magic required here.
2022-09-02 17:32:58 -07:00
Kevin Reid
4a7fc68df0
Document that write_buffer_with
is sound to read from. ( #3006 )
...
* Document that `write_buffer_with` is sound to read from.
To a reader informed about Rust's memory model, the existing claim that
> dereferencing it to a `&[u8]` panics
without further context sounds awfully like someone thinks they've
invented a write-only reference, and that the API might actually be
exposing undefined behavior via an uninitialized `&mut [u8]`. Therefore,
let's specify what happens if you *do* read through the mutable
reference. The text added in this commit is based on what was said in
the review when `write_buffer_with` was added:
https://github.com/gfx-rs/wgpu/pull/2777/files#r901392551
This is also relevant information to someone considering using
`write_buffer_with()` for performance gains: for example, it suggests
that it might be a bad idea to write data into the view and then sort
it in-place. (Or is that not a bad idea? Is it not slow if the CPU
already wrote over all the memory contiguously? I don't know.)
* Changelog addition (+ fixing duplicate documentation section)
2022-09-02 23:50:15 +00:00
Jim Blandy
7e84bb2eae
Correct create_surface_from_(offscreen)_canvas docs. ( #2990 )
...
The function's does not depend on the `canvas` argument meeting the
given requirements to avoid undefined behavior, so it should just be a
normal contract, not a safety contract.
2022-09-02 16:29:06 -07:00
Andreas Monitzer
6348a07d28
Expose the vk::Queue and the queue index in the Vulkan hal. ( #2950 )
2022-09-02 22:58:01 +00:00
Jim Blandy
701564da8c
Use () instead of PhantomData as IdentityManager's Input type. ( #2972 )
...
* Use () instead of PhantomData as IdentityManager's Input type.
PhantomData suggests that there's some sort of persuasion required
for lifetime variance inference or other sorts of arcana, but it
doesn't seem to be necessary at all. `()` works just fine.
2022-09-02 15:37:21 -07:00
Jinlei Li
ee7fd47ecb
metal: fix max_storage_xx
max_texture
max_sampler
and max_vertex_xx
limits ( #2978 )
2022-09-02 15:36:07 -07:00
i509VCB
c519901d57
vulkan: remove use of Vulkan12Features/Properties types ( #2936 )
...
Vulkan prohibits including `VkPhysicalDeviceVulkan12Features` structures in the chain passed to `VkCreateDevice` along with other more specific features structs. Similiar restrictions apply to the `...Properties` structures.
Fixes #2925 .
2022-09-02 21:05:13 +00:00
François
27f6302d5b
changelog
2022-09-02 11:41:20 -07:00
Jim Blandy
58bc205f2a
Update to Naga b209d911
(2022-9-1).
...
This removes an expected failure on AMD RADV. I guess #2751 was our
bug all along.
2022-09-02 11:33:55 -07:00
Jim Blandy
7d138e2e76
Avoid overflow in check texture copy bounds. ( #2963 )
2022-08-28 20:07:04 -04:00
Jim Blandy
a0dfb28b8d
Document wgpu_core id handling, factories, etc. ( #2973 )
2022-08-28 19:49:09 -04:00
Jim Blandy
2cd08a1c9c
Placate Clippy 0.1.63. ( #2977 )
2022-08-24 17:25:59 -04:00
Jinlei Li
f918ac1ed1
vk: fix astc_hdr
formats support ( #2971 )
...
* vk: fix `astc_hdr` formats support
* Update CHANGELOG
2022-08-20 19:18:39 +00:00
Jinlei Li
a08ea2a255
metal: add the missing msg_send![view, retain]
call within from_view
( #2976 )
...
* metal: add the missing `msg_send![view, retain]` call within `from_view`
* Update CHANGELOG
2022-08-20 07:14:57 -07:00
Jim Blandy
c6ca2a7d0d
Always free staging buffers ( #2961 )
...
* Have `prepare_staging_buffer` take a raw hal Device.
This helps the borrow checker understand that we can borrow
`pending_writes`'s encoder and the raw Device at the same time.
* Always free staging buffers.
We must ensure that the staging buffer is not leaked when an error
occurs, so allocate it as late as possible, and free it explicitly when
those fallible operations we can't move it past go awry.
Fixes #2959 .
* Some tests for texture and buffer copies.
* Add CHANGELOG.md entry.
2022-08-13 18:25:49 -07:00
Nicolas Silva
6e99cd3a3e
Fix calculation/validation of layer/mip ranges in create_texture_view ( #2955 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-08-14 00:01:19 +00:00
Nicolas Silva
96a85b3ac5
Add missing validation in copy_texture_to-Buffer. ( #2958 )
2022-08-13 19:48:17 -04:00
Jim Blandy
d655017439
Implement "strict_asserts" feature in wgpu-core. ( #2872 )
...
Since `wgpu-core`'s public functions are supposed to validate their
parameters, the internal `track` module skips many of Rust's usual
run-time checks in release builds. However, some `wgpu-core` users are
happy to pay the performance cost in exchange for more safety. The
`"strict_asserts"` feature causes `wgpu_core` to perform the same
checks in release builds as it does in debug builds.
2022-08-08 00:45:39 -04:00
Wyatt Herkamp
f7526ae960
winit 0.27 Update and raw-window-handle 0.5 ( #2918 )
2022-08-04 06:09:37 +00:00
Nicolas Silva
ef3b31cd9a
Map bounds check ( #2938 )
...
* Validate that map_async's range is not negative.
map_async already checks that the range's end is within the bounds of the buffer, so this also ensures the range start is within bounds.
* Add an entry in the changelog.
2022-08-03 20:28:36 -07:00
Kevin Reid
780209dfb4
Add Buffer::size()
and Buffer::usage()
. ( #2923 )
2022-08-02 17:10:49 -04:00
ani
29f5f8f60e
Add WGSL examples to documentation ( #2888 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-08-02 19:24:10 +00:00
i509VCB
8444fbe460
vulkan: fix issues querying multiview support ( #2934 )
2022-08-01 20:55:53 -04:00
Nicolas Silva
e59c33046b
Validate against the maximum binding index ( #2892 )
...
* Validate binding indices in create_bind_group_layout.
* Add an entry in the changelog
2022-08-01 16:25:32 -04:00
Seamooo
0dce58dfbd
changed websys features in core and hal to align with used features ( #2922 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-08-01 19:06:26 +00:00
Reece
4cbf8cfcf1
Fix opening of renderdoc lib ( #2930 )
...
* Fix opening renderdoc lib
Renderdoc needs to not be opened by us, but instead open the existing copy.
Unfortunately this requires OS specific flags for opening, plus `libloading`
doesn't have full API coverage currently.
* Added changelog entry for #2930
* Hide RTLD_NOLOAD behind a cfg for unix
Co-authored-by: ABuffSeagull <reecevanatta@hey.com>
2022-08-01 01:39:55 +00:00
Nicolas Silva
a05c8dc2dc
Fix buffer zeroing with offset in map_buffer ( #2916 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-07-31 22:05:18 +00:00
Kevin Reid
a420e453c3
StagingBelt: check for free chunks in the receiver
as well as free_chunks
. ( #2906 )
...
* StagingBelt: check for free chunks in the `receiver` as well as `free_chunks`.
Previously, chunks would only be taken from the GPU callback receiver
and put on `free_chunks` during `finish()`. So, there might be chunks
that are actually available for use but wouldn't be used.
Now, we consult the receiver whenever we're about to consult the
`free_chunks`, so the reuse of chunks will be as good as possible (given
the application's uses of operations that trigger `map_async` callbacks).
* Changelog entry.
2022-07-26 14:59:27 +00:00
i509VCB
75519839be
export AdapterContext
in Gles hal ( #2870 )
2022-07-25 23:37:50 -04:00
Kevin Reid
7b487682d9
Expand StagingBelt documentation. ( #2905 )
2022-07-26 03:36:56 +00:00
Nicolas Silva
d0aa3f471a
Validate the number of color attachments in create_render_pipeline ( #2913 )
2022-07-25 23:28:52 -04:00
Connor Fitzgerald
537c6bed4e
Add warning when using CompareFunction::*Equal without an invariant Attribute ( #2887 )
2022-07-21 02:24:49 -04:00
Seamus Mulholland-Patterson
e49ef97311
added changelog entry for #2886
2022-07-15 14:11:04 -04:00
Connor Fitzgerald
48325f1aaa
v0.13.2 changelog ( #2882 )
2022-07-14 01:29:09 +00:00
Nicolas Silva
6058676dd2
Record that the buffer is mapped when its size is zero. ( #2877 )
...
* Record that the buffer is mapped when its size is zero.
* Avoid internally trying to map a zero-sized buffer if mapped_at_creation is true.
* Add an entry in the changelog.
2022-07-13 18:01:12 +00:00
Nicolas Silva
af345cd6c3
Validate the range in map_async. ( #2876 )
...
* Validate the range in map_async.
* Add an entry in the changelog.
2022-07-13 12:34:36 -04:00
i509VCB
db24c066cb
fix panic with as_hal functions ( #2871 )
2022-07-12 14:38:59 -04:00
Jinlei Li
ecf3f5ec38
metal | vulkan-portability: extract the generic code into get_metal_layer
( #2826 )
2022-07-10 23:06:32 -04:00
i509VCB
a108efe6b6
expose context and display from adapter and device for egl hal ( #2860 )
2022-07-10 18:50:54 -04:00
i509VCB
0dfb1115d2
document Adapter::new_external in wgpu-hal ( #2863 )
2022-07-10 18:49:53 -04:00
Sébastien Marleau
2ce1318c8c
fix deduplication not taking into account render bundles ( #2867 )
2022-07-10 22:15:52 +00:00
Nicolas Silva
324de1bef6
Ensure the BufferMapCallback is always called. ( #2848 )
...
* Ensure the BufferMapAsyncCallback is always called.
This solves two issues on the Gecko side:
- The callback cleans up after itself (the user data is deleted at the end of the callback), so dropping the callback without calling it is a memory leak. I can't think of a better way to implement this on the C++ side since there can be any number of callback at any time living for an unspecified amount of time.
- This makes it easier to implement the error reporting of the WebGPU spec.
* Update the changelog.
2022-07-07 23:29:05 -07:00
i509VCB
94c065cb33
allow access to queue family index in vulkan hal device ( #2859 )
2022-07-07 19:43:13 -04:00
Connor Fitzgerald
9c5015f059
Update Changelog
2022-07-06 11:06:34 -04:00
Craig
1da5bbd7b4
Prevent OpenGL from taking preference over Vulkan ( #2853 )
...
* Prevent OpenGL from taking preference over Vulkan
* update changelog
* fix wasm build of example
2022-07-06 00:11:22 -04:00
Jinlei Li
b574354af4
gl: fix depth stencil texture format capability ( #2854 )
...
* gl: fix depth stencil texture format capabilitys
* Update CHANGELOG
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-07-06 03:37:26 +00:00
Elabajaba
ab340baf69
Update present_mode docs as most of them don't automatically fall back to Fifo anymore. ( #2855 )
...
* space
PresentMode no longer automatically falls back to Fifo
* Update wgpu-types/src/lib.rs
Auto(No)Vsync fallback wording.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
* changelog
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-07-05 20:59:41 +00:00
Connor Fitzgerald
615ced5a99
Changelog
2022-07-04 16:38:27 -04:00
Steven
c36eb9f44b
Add change ( #2847 )
2022-07-03 21:09:39 +00:00
Connor Fitzgerald
6befbcbca4
Touch up changelog
2022-07-03 01:08:40 -04:00
Connor Fitzgerald
aaabd56d9a
Curb Expectations of DX11
2022-07-03 01:08:40 -04:00
Spencer C. Imbleau (he/him)
72a4ef9362
Fixes #2840 ( #2842 )
2022-07-03 02:00:25 +00:00
Fel
c20c86a948
Add other breaking changes to 0.13 changelog ( #2831 )
2022-07-01 22:39:11 +00:00
multisn8
5bef140228
Clarify about breaking max_buffer_size in Limits ( #2828 )
2022-07-01 19:32:27 +00:00
David Huculak
93dbffa5d3
Add other breaking changes to 0.13 changelog ( #2825 )
...
* add other breaking changes to 0.13 changelog
* fix typo
2022-07-01 01:44:29 +00:00
Connor Fitzgerald
1ceef24261
Add changelog for 0.13 ( #2823 )
...
* Changelog
* Update CHANGELOG.md
* Bump versions to 0.13
2022-06-30 20:25:49 +00:00
Dzmitry Malyshau
c00e471274
Release 0.12
2021-12-18 12:36:41 -05:00
Dzmitry Malyshau
5441556988
Release wgpu-hal-0.11.2
2021-10-12 12:22:49 -04:00
Dzmitry Malyshau
60bb2aaa6b
hal/gles: work around the clear shader bug
2021-10-09 16:33:45 -04:00
Dzmitry Malyshau
d48bc62826
hal/vk: check for NV optimus
2021-10-09 16:33:45 -04:00
Dzmitry Malyshau
44f488efed
gles: fix querying storage limits
2021-10-09 16:33:45 -04:00
Dzmitry Malyshau
713f7fd7f2
Changelog update for 0.11
2021-10-07 19:15:49 -04:00
Dzmitry Malyshau
62f26367cd
Fix the check for depth+stencil aspect of views
2021-08-20 12:11:57 -04:00
Dzmitry Malyshau
a296cf6e9e
[metal] set threadgroup memory sizes reflected from the shader
2021-08-19 13:25:04 -04:00
Dzmitry Malyshau
9da5c1d3a0
Release v0.10 ( #1820 )
...
* Release v0.10
* hal/gles: update glow handles logic
2021-08-18 19:06:21 +00:00
Dzmitry Malyshau
dffe1f1793
Return a texture by the surface
2021-08-11 20:58:42 -04:00
Dzmitry Malyshau
f78061bcef
Merge swap chain into surface
2021-08-11 20:58:42 -04:00
Dzmitry Malyshau
552a5f138e
Rename texture usage names
2021-07-28 00:17:54 -04:00
Connor Fitzgerald
683d03a8e4
Add Rgb9e5Ufloat
2021-07-21 23:54:46 -04:00
Dzmitry Malyshau
1a9a855ea9
Rename InputStepMode to VertexStepMode
2021-07-21 17:48:00 -04:00
Dzmitry Malyshau
6dfcde4429
Update changelog with wgpu-hal and bitflags rename
2021-06-30 15:16:11 -04:00
bors[bot]
ce753cf542
Merge #1563
...
1563: Fix stray header in changelog r=cwfitzgerald a=HalfVoxel
It's definitely released by now. I'm guessing it was part of 0.8.1.
Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
2021-06-27 21:25:37 +00:00
Aron Granberg
407ee82825
Fix stray header in changelog
2021-06-27 17:19:51 +02:00
Aron Granberg
f0919141e2
Update changelog
2021-06-27 17:17:31 +02:00
bors[bot]
1d2efb43bc
Merge #1511
...
1511: Added storage texture array support. r=kvark a=ElectronicRU
**Description**
Arrays of storage images (*f*image*n*D in GLSL parlance) should now be supported.
I also took the liberty to refactor texture format checking a bit,
and tighten up sampled texture support detection for Metal as well.
**Testing**
Not completely sure what's the proper testing approach here, open to suggestions.
Co-authored-by: Alex S <alex0player@gmail.com>
2021-06-18 21:38:54 +00:00
Alex S
894489b8ff
Add changelog entry
2021-06-19 00:30:10 +03:00
Connor Fitzgerald
91437ea706
Updated changelog for 0.9
2021-06-18 13:07:52 -04:00
Dzmitry Malyshau
5578222685
Switch ubuntu CI to 20.04
2021-06-17 02:41:44 -04:00
Robin Hübner
bc0c86a47a
fix typo regarding structurer rename in changelog
2021-06-05 22:09:06 +01:00
Dzmitry Malyshau
e4b0de2526
Links updates
2021-06-02 23:54:26 -04:00
Dzmitry Malyshau
a6ff3ea086
Merge changelogs and readmes
2021-06-02 21:50:16 -04:00
Lucien Greathouse
ba041e4451
Expand 0.8.0 Changelog ( #1420 )
...
* humble beginnings
* Current progress
* More precise NonZeroU32 change
* Fix typo
* Changelog enough to get my game to compile again
* Fix type change line
2021-06-01 02:03:59 -04:00
Dzmitry Malyshau
ffd47fbc0e
Remove Vulkan Portability support
2021-04-29 11:42:26 -04:00
Dzmitry Malyshau
6f9c254061
Changelog for 0.8
2021-04-29 11:33:17 -04:00
Connor Fitzgerald
c43bfaf8e0
Fix readme date
2021-02-01 02:45:31 -05:00
Dzmitry Malyshau
4099c2ca8e
Fix depth bias documentation
2021-01-29 00:25:54 -05:00
Dzmitry Malyshau
cef0a30aa2
Add 0.7 changelog
2021-01-28 01:21:20 -05:00
Dzmitry Malyshau
901b043b19
Version bump to 0.6 and changelog update
2020-08-17 16:51:22 -04:00
skierpage
67142eb944
use unambigous ISO8601 format for dates
...
06-04-2020 is in the future for ~400 million people.
Oblig. XKCD https://xkcd.com/1179/ 😉
2020-05-12 16:06:19 -07:00
Dzmitry Malyshau
7dba052900
Version bump and CHANGELOG update
2020-04-06 08:55:39 -04:00
Dzmitry Malyshau
9ffcbe5f9d
Release preparations
2019-11-03 18:52:57 -05:00
Dzmitry Malyshau
87b61d206c
Fix instance init on Windows and check it on CI
2019-08-22 11:29:45 -04:00
Dzmitry Malyshau
a9cfde1d9d
Fixed pipeline barriers that are not transitions
2019-08-21 13:11:46 -04:00
Dzmitry Malyshau
dfb4420d5c
Changelog update for 0.3
2019-08-21 09:32:09 -04:00
Bruce Mitchener
1155479247
Fix typos.
2019-05-24 14:46:37 +07:00
Dzmitry Malyshau
c283a8b115
Update changelog and versions
2019-03-31 20:04:39 -04:00
Dzmitry Malyshau
81114a8ca2
Bump the descriptor pool size
2019-03-20 14:52:38 -04:00
Dzmitry Malyshau
7149ba83ba
Update dx11 dependency in the lockfile
2019-03-05 23:01:13 -05:00
Dzmitry Malyshau
85596a31a8
Add changelog
2019-03-05 22:57:40 -05:00