Commit graph

44517 commits

Author SHA1 Message Date
MacDue
9dea61e095 Meta: Include StylePropertiesModel.cpp in lagom LibWebView 2022-12-19 11:37:56 -05:00
MacDue
88e50869f1 LibWeb: Fix crash when serializing nodes for DOM inspector
Noticed this trying to inspect GitHub, you'd get a segfault due to the
parent node being null here.
2022-12-19 11:37:56 -05:00
Andreas Kling
f11e6beca8 AK: Use __has_builtin() in Checked.h
Instead of avoiding overflow-checking builtins with AK_COMPILER_CLANG,
we can use the preprocessor's __has_builtin() mechanism to check if
they are available.
2022-12-19 09:29:12 -05:00
0xxFF
c4bc889346 Documentation: Adjust default TARGET to x86_64 in the documentation 2022-12-19 09:00:34 -05:00
implicitfield
39fc7359d4 FileManager: Clear the selection after deleting files 2022-12-19 08:03:24 -05:00
Keir Davis
f639445456 LibWeb: Fully Implement get_an_elements_noopener
This removes two fix me in HTMLHyperlinkElementUtils
2022-12-19 07:57:44 -05:00
Jelle Raaijmakers
9feac465dc LibCore: Convert explicit timezone to local in DateTime::parse
When we encounter an explicit timezone, we shift the time to UTC.
Because we rely on `mktime`, we need to shift it to the local time
before proceeding. If no explicit timezone is provided, local timezone
is assumed.

This fixes the "timezone-offset extension" LibJS test running on
machines with a non-UTC timezone offset.

Co-authored-by: Timothy Flynn <trflynn89@pm.me>
2022-12-19 07:07:49 -05:00
Liav A
1ea10bcb73 LibGfx: Split VERIFY statements in various Bitmap class methods
This could aid debugging in many cases, and it doesn't break any
functionality, so let's ensure it's easier to understand in which way a
provided value is out of range.
2022-12-19 11:05:44 +00:00
Liav A
efae6e2270 Kernel/Graphics: Propagate errors properly around in the VirtIO driver
This happens to be a sad truth for the VirtIOGPU driver - it lacked any
error propagation measures and generally relied on clunky assumptions
that most operations with the GPU device are infallible, although in
reality much of them could fail, so we do need to handle errors.

To fix this, synchronous GPU commands no longer rely on the wait queue
mechanism anymore, so instead we introduce a timeout-based mechanism,
similar to how other Kernel drivers use a polling based mechanism with
the assumption that hardware could get stuck in an error state and we
could abort gracefully.

Then, we change most of the VirtIOGraphicsAdapter methods to propagate
errors properly to the original callers, to ensure that if a synchronous
GPU command failed, either the Kernel or userspace could do something
meaningful about this situation.
2022-12-19 10:19:57 +00:00
Liav A
12d4bbbd11 Kernel/Graphics: Disable double buffering for the VirtIO driver
The performance that we achieve from this technique is visually worse
compared to turning off this feature, so let's not use this until we
figure out why it happens.
2022-12-19 10:19:57 +00:00
Liav A
bb491a681d Kernel: Properly propagate errors in VirtIOGPU 3D device initialization 2022-12-19 10:19:57 +00:00
Nico Weber
1a85539741 Meta: Find mke2fs on macOS even if HOMEBREW_PREFIX is not set
...as long as `brew` is on the path and `brew --prefix e2fsprogs`
tells us where it is.

This is for people who don't have `"$(brew shellenv)"` in their .zshrc.
2022-12-18 17:49:49 -07:00
Nico Weber
15ce757f12 Meta: Disable gdbstub when running under HVF on macOS
Without this, `serenity.sh run` fails with

    gdbstub: current accelerator doesn't support guest debugging

on an intel mac.
2022-12-18 17:46:29 -07:00
Matt Purnell
0bda06c9c5 LibWeb: Don't const_cast layout_box() when calling const functions
layout_box() already has a non-const overload, so we don't need to
const_cast them anymore. This gets rid of 2 FIXMEs. :^)
2022-12-18 12:56:33 +01:00
Stephan Unverwerth
28ad49bcbd LibGL: Pass generated GPU IR to GPU side compiler when linking program 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
c25359df47 LibSoftGPU: Delegate shader creation to new class ShaderCompiler 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
5bab17596d LibGLSL: Fill LinkedShaders with dummy IR code 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
c88bc74afd LibGPU: Add inputs and outputs to GPU shader IR 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
b18bf702ea LibSoftGPU: Implement shader processor for SoftGPU ISA
This adds a shader processor that executes our ISA when a fragment
shader is currently bound to the device.
2022-12-17 22:39:09 -07:00
Stephan Unverwerth
1e548a84d6 LibSoftGPU: Define a simple shader instruction set
This adds a simple instruction set with basic operations and adds an
instruction list to the shader class.
2022-12-17 22:39:09 -07:00
Stephan Unverwerth
bb28492af0 LibSoftGPU: Make output in PixelQuad generic
Same as with inputs, we define outputs as a generic array of floats.
This can later be expanded to accomodate multiple render targets or
vertex attributes in the case of a vertex shader.
2022-12-17 22:39:09 -07:00
Stephan Unverwerth
c008b6ce18 LibSoftGPU: Make input in PixelQuad generic
Previously we would store vertex color and texture coordinates in
separate fields in PixelQuad. To make them accessible from shaders we
need to store them as a completely generic array of floats.
2022-12-17 22:39:09 -07:00
Stephan Unverwerth
49139d5f4e LibSoftGPU: Allow binding a fragment shader 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
93ab2db80f LibGL+LibSoftGPU: Add GPU side shader infrastructure
This adds a shader class to LibSoftGPU and makes use of it when linking
GLSL program in LibGL. Also adds actual rendering code to the shader
tests.
2022-12-17 22:39:09 -07:00
Stephan Unverwerth
4ad41e6680 LibGL: Use LibGLSL to compile shaders 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
67b2f8d68d LibGLSL: Add LibGLSL
This adds a new library, LibGLSL for parsing and compiling GLSL programs
to LibGPU IR. Currently the compiler consists only of stubs.
2022-12-17 22:39:09 -07:00
Stephan Unverwerth
5f0eb812ac LibGPU: Add basic shader IR
This adds a header to LibGPU with a basic IR for vertex and fragment
shaders.
2022-12-17 22:39:09 -07:00
Stephan Unverwerth
1b7b6e6c91 LibGL: Implement glGetProgramiv 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
424e0a2792 LibGL: Implement glGetShaderiv 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
69171e7a05 LibGL: Implement glUseProgram 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
1812a169b8 Tests: Add tests for LibGL shader subsystem 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
848f1d2689 LibGL: Make shader compilation and program linking always succeed
This will help with testing until the actual compilation infrastructure
is in place.
2022-12-17 22:39:09 -07:00
Stephan Unverwerth
fdd76639d8 LibGL: Implement glLinkProgram 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
7f062e35a4 LibGL: Implement glAttachShader 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
42ef5c9e12 LibGL: Implement glCompileShader 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
d5277ecdfe LibGL: Implement glShaderSource 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
962d088e4e LibGL: Implement glCreateProgram and glDeleteProgram 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
a0adbfbf81 LibGL: Implement glCreateShader and glDeleteShader 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
b975569a40 LibGL: Add Shader and Program class stubs 2022-12-17 22:39:09 -07:00
Stephan Unverwerth
cd7d2c3446 LibGL: Remove Texture note leftovers from the NameAllocator class
The NameAllocator class is not only about Textures, so let's change a
comment being related to it.
2022-12-17 22:39:09 -07:00
Stephan Unverwerth
4568dcbb55 LibGL: Add stubs for shader and program related functions 2022-12-17 22:39:09 -07:00
Andrew Kaster
75495a5d65 Documentation: Explain CMake 3.25.x requirement 2022-12-17 22:21:43 -07:00
Andrew Kaster
75f7a164a6 Documentation: Clarify that clang can be used as a host compiler 2022-12-17 22:21:43 -07:00
Andrew Kaster
37517ba8bb Meta: Prefer clang as a host compiler to gcc 2022-12-17 22:21:43 -07:00
Andrew Kaster
d2e4565f72 Meta: Allow building with Apple clang 14.x
We previously disregarded Apple clang entirely, since no released
version was able to succesfully build Lagom. Xcode 14 seems to have
all the features we need, as we haven't added any code that needs
trunk clang features in quite a while.
2022-12-17 22:21:43 -07:00
EWouters
74927ac76d Meta: Fix mke2fs on MacOS
Use `Meta/.shell_include.sh` to find the `mke2fs` executable.
2022-12-17 16:12:48 -07:00
Lenny Maiorani
f2336d0144 AK+Everywhere: Move custom deleter capability to OwnPtr
`OwnPtrWithCustomDeleter` was a decorator which provided the ability
to add a custom deleter to `OwnPtr` by wrapping and taking the deleter
as a run-time argument to the constructor. This solution means that no
additional space is needed for the `OwnPtr` because it doesn't need to
store a pointer to the deleter, but comes at the cost of having an
extra type that stores a pointer for every instance.

This logic is moved directly into `OwnPtr` by adding a template
argument that is defaulted to the default deleter for the type. This
means that the type itself stores the pointer to the deleter instead
of every instance and adds some type safety by encoding the deleter in
the type itself instead of taking a run-time argument.
2022-12-17 16:00:08 -05:00
Tim Ledbetter
53133b4359 PixelPaint: Debounce ImageEditor on_modified_change event
This limits the frequency of updates performed by the histogram and
vectorscope widgets.
2022-12-17 19:52:11 +00:00
Tim Ledbetter
7e020154a5 PixelPaint: Improve guide tool performance for large images
This commit ensures that the vectorscope and histogram widgets are not
updated while moving a guide with the guide tool. This significantly
improves performance for large images.
2022-12-17 19:52:11 +00:00
Keir Davis
4a0af3dc77 SystemMonitor: Propagate errors when trying to load an icon 2022-12-17 19:20:21 +00:00