Commit Graph
9013 Commits
Author SHA1 Message Date
Dzmitry Malyshau f9f19faed6 Rewire the path of destruction for swapchain texture views 2021-07-01 01:39:12 -04:00
Jim Blandy e32f10f940 [spv-out] recyclable: Remove capacity reduction code. 2021-07-01 01:07:01 -04:00
Jim Blandy 3a1a2ed8b3 [spv-out] Move BlockContext into its own file.
Rearrange some code for easier visibility.

`make_local` doesn't need a PhysicalLayout `self`; make it a free function.
2021-07-01 01:06:18 -04:00
Jim Blandy f878a9dcaf [spv-out]: Introduce helpers for BlockContext code.
Give `BlockContext` its own `temp_list`, which it steals from `Writer` for a
bit.

Add `BlockContext::cached`, for getting cached expression ids.
2021-07-01 01:06:18 -04:00
Jim Blandy 9f7424c3af [spv-out]: Remove all #[allow(clippy::too_many_arguments)] attrs. 2021-07-01 01:06:18 -04:00
Jim Blandy 634632a382 [spv-out]: Introduce BlockContext.
This commit should should cause no visible change in behavior.

Many `back::spv::Writer` methods take long lists of arguments simply describing
the module and function we're generating code for, but these never change while
we generate a given function. This commit moves some of those values into a
`BlockContext` type, and turns those `Writer` methods into `BlockContext`
methods, so that code can access these values through `self`, rather than
threading them through everywhere as arguments.

Many uses of `self.foo` become `self.writer.foo`. Some of these can be
simplified, but to make this commit easier to review, most of those changes are
left to later commits.

This allows us to remove some `#[allow(clippy::too_many_arguments)]` attributes.
2021-07-01 01:06:18 -04:00
Jim Blandy e0b37667ca [spv-out] Move future BlockContext methods into their own impl block.
This commit should introduce no meaningful code changes. It's simply isolating
the `Writer` methods that should be `BlockContext` methods into their own impl
block, to make it easier to see the meaningful changes needed to introduce
`BlockContext`.
2021-07-01 01:06:18 -04:00
Jasper St. Pierre fbab3a3ba5 [glsl-in] Add support for texture function with LOD bias 2021-07-01 02:45:13 +01:00
Dzmitry Malyshau 6dfcde4429 Update changelog with wgpu-hal and bitflags rename 2021-06-30 15:16:11 -04:00
bors[bot]andDzmitry Malyshau d8888ccaa5 Merge #1576
1576: Switch all bitflag names to plural r=cwfitzgerald a=kvark

**Connections**
#1471 added a lot of singular bitflag names. Previously, we weren't really consistent.

**Description**
This PR changes all of the names to be plural, except for a few that don't imply singularity, and are matching WebGPU upstream. Maybe we need to convert them too?

**Testing**
self-tested


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-06-30 19:02:07 +00:00
Dzmitry Malyshau ba006cfaa7 Rename ColorWrite, TextureUsage, and BufferUsage 2021-06-30 14:57:38 -04:00
Dzmitry Malyshau 568ac3fa24 Switch all bitflag names to plural 2021-06-30 14:43:36 -04:00
c9ab6d06d2 Merge #1510
1510: OpenGL ES3 backend r=cwfitzgerald,Gordon-F,kvark a=kvark

**Connections**
Follow-up to #1471

**Description**
The new wgpu-hal backend for GLES3 ~~and WebGL2~~
Edit: WebGL2 is not included here

**Testing**
Examples!

Current status:
  - all examples work, minus the next issue
  - "mipmap" is buggy because we don't have a good way to do mipmap/layer selection
  - automated testing?


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-06-30 16:08:33 +00:00
Dzmitry Malyshau 6f13eebb7b hal/gles: compressed ETC2 texture support 2021-06-30 12:06:59 -04:00
Gordon-F ef1194d69a [CI] Add dneto0 spirv-samples to lazy task 2021-06-30 12:00:33 -04:00
Dzmitry Malyshau 45074b2939 hal: more implementation comments 2021-06-30 02:31:13 -04:00
Dzmitry Malyshau 4be8864b38 hal/gles: totally rework the vertex data binding 2021-06-30 02:31:13 -04:00
Dzmitry Malyshau 40e2c33c6f hal/gles: hack around cubemap support 2021-06-30 02:29:30 -04:00
Dzmitry Malyshau 582c128520 Pick up naga's GLSL continuing and Y-flip fixes 2021-06-30 02:29:30 -04:00
Dzmitry Malyshau 3a796c2244 hal/gles: fix buffer mapping 2021-06-30 02:29:30 -04:00
Dzmitry Malyshau 6025a8d25e hal/gles: enable robust access by default 2021-06-30 02:29:29 -04:00
Dzmitry Malyshau 25ec7447e2 hal/gles: improve the exposed limits 2021-06-30 02:29:29 -04:00
Dzmitry Malyshau e4aee90341 hal/gles: object labels, view dimensions, and buffer clears 2021-06-30 02:29:29 -04:00
Dzmitry Malyshau 403ff6faf8 hal/gles: Update glow and fill up the missing methods 2021-06-30 02:29:29 -04:00
Dzmitry Malyshau bf61908824 hal/gles: primitive state and framebuffer operations 2021-06-30 02:29:29 -04:00
Dzmitry Malyshau 952173efde Enable Gles backend, add checks for downlevel flags 2021-06-30 02:29:28 -04:00
Dzmitry Malyshau cf10138c64 hal/egl: add coherence preference, hook up EGL_KHR_debug message callbacks 2021-06-30 02:29:28 -04:00
Dzmitry Malyshau 8fd6b36e6c hal/egl: add coherence preference, hook up EGL_KHR_debug message callbacks 2021-06-30 02:29:28 -04:00
Dzmitry Malyshau c7356e124e hal/gles: storage texture bindings 2021-06-30 02:29:28 -04:00
Dzmitry Malyshau 673ec60396 hal/gles: resource binding 2021-06-30 02:29:28 -04:00
Dzmitry Malyshau 91df157462 Refactor downlevel support a bit, implement blending for hal/gles 2021-06-30 02:29:28 -04:00
Dzmitry Malyshau 13b0a61dc8 hal/gles: stencil and vertex state 2021-06-30 02:29:27 -04:00
Dzmitry Malyshau 205327d3aa hal/gles: barriers 2021-06-30 02:29:27 -04:00
Dzmitry Malyshau 51dd90b1ab hal/gles: render passes 2021-06-30 02:29:27 -04:00
Dzmitry Malyshau 24ff58c6c1 hal/gles: present, texture format caps 2021-06-30 02:29:27 -04:00
Dzmitry Malyshau 91f9806831 hal/gles: fences and queries 2021-06-30 02:29:27 -04:00
Dzmitry Malyshau d3d2ed5a9e hal/gles: pipeline creation 2021-06-30 02:29:27 -04:00
Dzmitry Malyshau d29c450ec3 hal/gles: bind group creation 2021-06-30 02:29:26 -04:00
Dzmitry Malyshau 85e59c3d7f hal/gles: texture copies 2021-06-30 02:29:26 -04:00
Dzmitry Malyshau b1fe86589a hal/gles: queue module 2021-06-30 02:29:26 -04:00
Dzmitry Malyshau 4d42bef7f8 hal/gles: encoding copies and draws 2021-06-30 02:29:26 -04:00
Dzmitry Malyshau 31da0f2278 hal/gles: command module 2021-06-30 02:29:26 -04:00
Dzmitry Malyshau 31e6ed82cb hal/gles: creation of buffers, textures, view, and samplers 2021-06-30 02:29:26 -04:00
Dzmitry Malyshau 5083f56149 Add more downlevel flags, implement device opening on Gles 2021-06-30 02:29:26 -04:00
Dzmitry Malyshau 804b17bb29 hal/gl: version parsing 2021-06-30 02:29:25 -04:00
Dzmitry Malyshau d88bc440e6 hal/gles: describe format, adapter info 2021-06-30 02:29:25 -04:00
Dzmitry Malyshau 41bc9d0625 hal/gl: start the backend, port the Instance 2021-06-30 02:29:25 -04:00
bors[bot]andAlex S 81214b21ec Merge #1571
1571: Removed feature="spirv" requirements from SPIRV_PASSTHROUGH support. r=cwfitzgerald a=ElectronicRU

.__________________________________________________________________.


Co-authored-by: Alex S <alex0player@gmail.com>
2021-06-29 15:06:45 +00:00
Alex S 70abd33e30 Removed feature="spirv" requirements from SPIRV_PASSTHROUGH support.
.__________________________________________________________________.
2021-06-29 17:56:30 +03:00
Gordon-F 607206f9a5 [hlsl-out] Enable operators snapshot test 2021-06-29 09:49:00 -04:00