Commit Graph

1572 Commits

Author SHA1 Message Date
Dzmitry Malyshau
11964dc731 blade: cull mask support for sprites 2024-02-05 23:04:54 -08:00
Dzmitry Malyshau
78f32f30f5 linux: introduce platform callbacks 2024-02-05 21:49:19 -08:00
Dzmitry Malyshau
7721b55808 Refactor cli and gpui dependnecies based on PR review feedback 2024-02-05 21:49:00 -08:00
Dzmitry Malyshau
521b2b12e4 linux: create a hidden window inside the platform
It allows us to receive messages from the dispatcher,
which breaks us out of waiting and lets us execute
main thread runnables as a part of the main loop.
2024-02-04 23:52:22 -08:00
Dzmitry Malyshau
282cc71df9 linux: refactor LinuxPlatform to avoid recursive locking from the window callbacks 2024-02-04 22:37:34 -08:00
Dzmitry Malyshau
1c410c1b99 linux: only tick the main thread tasks and one at a time in the event loop 2024-02-04 19:36:58 -08:00
Dzmitry Malyshau
224fe13f9f blade: fix tile bounds shader FFI 2024-02-04 13:59:41 -08:00
Dzmitry Malyshau
0a5ebee9e5 blade: encapsulate BladeAtlasStorage for indexing 2024-02-04 13:03:16 -08:00
Dzmitry Malyshau
26ca798707 blade: initialize atlas textures 2024-02-04 12:45:18 -08:00
Dzmitry Malyshau
61fa5e93a8 blade: always create texture views for atlas tiles 2024-02-04 12:15:41 -08:00
Dzmitry Malyshau
aae532987f blade: tune belt alignment to match Intel Iris Xe 2024-02-04 11:35:19 -08:00
Dzmitry Malyshau
d6bbcf503b blade: enforce alignment in the belt 2024-02-04 00:09:32 -08:00
Dzmitry Malyshau
c5ff46e14f blade: fix shadow vertex bounds 2024-02-03 23:51:37 -08:00
Dzmitry Malyshau
cf71fe8bf1 fix MacOS build, switch external RWH to 0.6
leaving blade-internal RWH as 0.5 until this is fixed:
https://github.com/ash-rs/ash/issues/864
2024-02-03 23:50:44 -08:00
Dzmitry Malyshau
d0a0ce1885 blade: mono/poly chrome sprite rendering 2024-02-03 21:30:47 -08:00
Dzmitry Malyshau
59642bf29a blade: point to master, remove the override 2024-02-03 14:13:36 -08:00
Dzmitry Malyshau
2e32f5867e linux: various fixes across the crates to make it compile 2024-02-03 00:06:20 -08:00
Dzmitry Malyshau
7c7aad5e76 blade: port underline shader 2024-02-02 23:04:56 -08:00
Dzmitry Malyshau
04e49dc493 blade: refactor the atlas to not own the command encoder 2024-02-02 22:22:18 -08:00
Dzmitry Malyshau
c000d2e16b blade: path sprite rendering 2024-02-02 00:34:08 -08:00
Dzmitry Malyshau
fdaffdbfff linux: path rasterization shader 2024-02-01 22:56:50 -08:00
Dzmitry Malyshau
05c42211fe linux: implement RWH for LinuxWindow 2024-02-01 22:05:59 -08:00
Dzmitry Malyshau
ed679c9347 WIP path rasterization 2024-02-01 21:43:28 -08:00
Dzmitry Malyshau
ce84a2a671 linux: refactor window structure, support move callback 2024-02-01 21:43:28 -08:00
Dzmitry Malyshau
c9ec337034 linux: share corner picking code between shaders 2024-02-01 21:43:28 -08:00
Dzmitry Malyshau
666b134d20 linux: shadow rendering 2024-02-01 21:43:28 -08:00
Dzmitry Malyshau
8aa768765f linux: basic quad renderer logic 2024-02-01 21:41:15 -08:00
Dzmitry Malyshau
503ac7a251 linux: work around the mutex locks for request_frame and resize 2024-02-01 21:40:54 -08:00
Dzmitry Malyshau
74fde5967b linux: hook up render event, basic renderer command buffer 2024-02-01 21:40:54 -08:00
Dzmitry Malyshau
7f8c64aa6c linux: port from x11rb to xcb and hook up RawWindowHandle 2024-02-01 21:40:54 -08:00
Dzmitry Malyshau
aed363d3c7 x11: create window and route events 2024-02-01 21:29:07 -08:00
Dzmitry Malyshau
cefc98258f linux: hook up X11rb for Window creation 2024-02-01 21:29:07 -08:00
Dzmitry Malyshau
e95bf24a1f linux: basic window, display, and atlas 2024-02-01 21:29:07 -08:00
Dzmitry Malyshau
b0376aaf8f linux: start the text system 2024-02-01 21:28:37 -08:00
Dzmitry Malyshau
ca62d22147 linux: implement dispatcher, add dummy textsystem 2024-02-01 21:28:16 -08:00
Dzmitry Malyshau
d675abf70c Add Linux platform, gate usage of CVImageBuffer by macOS 2024-02-01 21:28:16 -08:00
Dzmitry Malyshau
ef4ef5f0e8 Add blade dependency 2024-02-01 21:27:43 -08:00
Max Brunsfeld
020c38a891
Avoid excessive blocking of main thread when rendering in direct mode (#7253)
Release Notes:

- Fixed a bug that caused inconsistent frame rate when scrolling on
certain hardware.

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2024-02-01 15:39:41 -08:00
Antonio Scandurra
5424c8bfd5
Introduce a fast path for drawing quads with no borders / corner radii (#7231)
This will introduce an extra conditional but saves us from doing a bunch
of math in the simple case of drawing simple rectangles that aren't
rounded or don't have borders.


![Figure_1](https://github.com/zed-industries/zed/assets/482957/cba95ce2-2d9a-46ab-a142-35368334eb75)

Release Notes:

- Improved rendering performance.
2024-02-01 09:49:27 -08:00
Conrad Irwin
2187513026
app version to server (#7130)
- Send app version and release stage to collab on connect
- Read the new header on the server

Release Notes:

- Added the ability to collaborate with users on different releases of
Zed.
2024-01-31 15:46:24 -07:00
Piotr Osiewicz
5941102aac
gpui: Add runtime-shaders feature so that Xcode.app is no longer necessary for Nix-based workflows (#7148)
Release Notes:

- N/A

Co-authored-by: Niklas <niklas@niklaskorz.de>
2024-01-31 17:37:16 +01:00
Marshall Bowers
e338f34097
Sort dependencies in Cargo.toml files (#7126)
This PR sorts the dependency lists in our `Cargo.toml` files so that
they are in alphabetical order.

This should make them easier to visually scan when looking for a
dependency.

Apologies in advance for any merge conflicts 🙈 

Release Notes:

- N/A
2024-01-30 21:41:29 -05:00
Marshall Bowers
2e7f9c48bb
Use fully-qualified name to avoid an unused import (#7104)
This PR adjusts how we implement `Global` conditionally to avoid an
unused import when compiling in release mode.

Release Notes:

- N/A
2024-01-30 14:57:54 -05:00
Mikayla Maki
a54eaaecee
Add raw window handle implementations to GPUI (#7101)
This is in preparation for experiments with wgpu. This should have no
external effect.

Release Notes:

- N/A
2024-01-30 11:42:28 -08:00
Marshall Bowers
1d794dbb37
Only impl Global for DebugBelow when compiling with debug_assertions (#7102)
This PR fixes this error when compiling a release build:

<img width="504" alt="Screenshot 2024-01-30 at 2 30 38 PM"
src="https://github.com/zed-industries/zed/assets/1486634/96470735-2b9e-4945-b4c3-c86ef0168b8c">

`DebugBelow` only exists when compiling with `debug_assertions`, so we
only want to implement it using that same criterion.

Release Notes:

- N/A
2024-01-30 14:37:29 -05:00
Piotr Osiewicz
e6ebe7974d
gpui: Add Global marker trait (#7095)
This should prevent a class of bugs where one queries the wrong type of
global, which results in oddities at runtime.

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-30 14:08:20 -05:00
Conrad Irwin
c07355265f
Add logging for the font_descriptor panic (#7097)
Release Notes:

- Fixed a panic caused by an inconsistency in font metrics.
2024-01-30 11:16:43 -07:00
Marshall Bowers
2980f0508c
Rework loading images from files (#7088)
This PR is a follow-up to #7084, where I noted that I wasn't satisfied
with using `SharedUri` to represent both URIs and paths on the local
filesystem:

> I'm still not entirely happy with this naming, as the file paths that
we can store in here are not _really_ URIs, as they are lacking a
protocol.
>
> I want to explore changing `SharedUri` / `SharedUrl` back to alway
storing a URL and treat local filepaths differently, as it seems we're
conflating two different concerns under the same umbrella, at the
moment.

`SharedUri` has now been reverted to just containing a `SharedString`
with a URI.

`ImageSource` now has a new `File` variant that is used to load an image
from a `PathBuf`.

Release Notes:

- N/A
2024-01-30 11:26:02 -05:00
Marshall Bowers
6c7893db35
Rename SharedUrl to SharedUri (#7084)
This PR renames `SharedUrl` to `SharedUri` to better reflect its intent.

I'm still not entirely happy with this naming, as the file paths that we
can store in here are not _really_ URIs, as they are lacking a protocol.

I want to explore changing `SharedUri` / `SharedUrl` back to alway
storing a URL and treat local filepaths differently, as it seems we're
conflating two different concerns under the same umbrella, at the
moment.

Release Notes:

- N/A
2024-01-30 09:54:23 -05:00
Hans
843916d585
Fix two typos (#7056) 2024-01-30 10:17:06 +02:00