Commit Graph

40961 Commits

Author SHA1 Message Date
Ben Wiederhake
616b3dc718 Meta: Fix check for AK test inclusion
basename from GNU coreutils 8.32 (the default on Debian Bullseye, as
bash 5.2.0 does not include basename as a built-in command) does not
accept multiple arguments. This will cause the command to fail with no
output, and the error code not being propagated for some reason. This
means that the loop never gets executed, and thus the check never
actually does anything. This commit fixes that behavior by calling
'basename' multiple times.
2022-09-13 08:29:09 +00:00
davidot
1d846e5591 LibWeb: Visit internal fields of Crypto in visit_edges
Not visiting the field holding SubtleCrypto in Crypto caused subtle
crashes all over the Value functions, due to accessing SubtleCrypto
after it was garbage collected (and potentially replaced by a new cell).
This meant that the crashes were only appearing in Value::to_boolean,
Value::typeof, etc. Which then held pointer to things that looked like
Shapes, Environments and other non-Object Cells.

To find the actual cause, all pointer used to construct Values were
checked and if a pointer was none of the allowed types, the backtrace
is logged.

Co-authored-by: Luke Wilde <lukew@serenityos.org>
2022-09-12 20:14:58 -04:00
Ben Wiederhake
0e901f8c68 Shell: Sort CompletionSuggestions for paths lexicographically
This used to be ordered by inode, which can be surprising.
2022-09-12 16:49:48 +01:00
networkException
802cf9bc69 Everywhere: Use my very shiny serenityos.org email :^) 2022-09-12 15:13:12 +01:00
Ali Mohammad Pur
660d2b53b1 LibRegex: Account for eof after \<x> when 'x' leads to legacy behaviour 2022-09-12 16:03:57 +04:30
Ali Mohammad Pur
48442059fc LibRegex: Consume exactly two chars for escaped characters
We were previously consuming an extra char afterwards, which could be
the charclass terminator, leading to possible OOB accesses.
2022-09-12 16:03:57 +04:30
Filiph Sandström
7e1e208d08 Kernel: Add basic aarch64 support to MemoryManager
FIXME: There's still a lot to do like for example, port `quickmap_page`.
This does however get us further into the boot process than before.
2022-09-12 00:56:44 +01:00
Filiph Sandström
14fe03569a Kernel: Add support for displaying critical output on aarch64 2022-09-12 00:56:44 +01:00
Filiph Sandström
3b331a83e2 Kernel: Include CommandLine as a part of aarch64 2022-09-12 00:56:44 +01:00
Filiph Sandström
fcd1cf4e1b Kernel: Include DeviceManagement as a part of aarch64 2022-09-12 00:56:44 +01:00
networkException
45aeba15c8 CharacterMap: Allow resizing the unicode block list
Previously we would constrain the unicode block list to a width of 175,
causing it to stick to the splitter when manually resizing.

This patch allows resizing the list properly while retaining the new
width when resizing the window.
2022-09-11 23:25:08 +01:00
Linus Groh
81f1183e28 Tubes: Run clang-format 2022-09-11 23:24:33 +01:00
Jelle Raaijmakers
9dfe50170e Demos: Add Tubes :^) 2022-09-11 22:45:49 +01:00
Jelle Raaijmakers
16ca9ec762 LibGfx: Templatize VectorN::length()
This allows us to get a `float` length from an `IntVector3` without
needing to convert to `FloatVector3` first.
2022-09-11 22:45:49 +01:00
Jelle Raaijmakers
70ea2a2258 LibGL: Implement glNormal3d 2022-09-11 22:45:49 +01:00
Jelle Raaijmakers
1aa1c89afa LibGL+LibGPU+LibSoftGPU: Report texture clamp to edge support 2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
087f565700 LibSoftGPU: Divide texture coordinates by Q
Up until now, we have only dealt with games that pass Q = 1 for their
texture coordinates. PrBoom+, however, relies on proper homogenous
texture coordinates for its relatively complex sky rendering, which
means that we should perform this per-fragment division.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
72782d845d LibGL: Ensure texture coordinate Q is set to 1 by default
When using vertex attribute pointers, we default the Q coordinate for
textures to 0 causing issues if the 4th coordinate is not passed in the
vertex data.

Clean up these defaults and make sure that Q is always set to `1.f`.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
af217b0c3a LibGL: Implement GL_(CLIENT_)?ACTIVE_TEXTURE context parameters 2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
00d46e5d77 LibGL+LibGPU+LibSoftGPU: Implement matrix stack per texture unit
Each texture unit now has its own texture transformation matrix stack.
Introduce a new texture unit configuration that is synced when changed.
Because we're no longer passing a silly `Vector` when drawing each
primitive, this results in a slightly improved frames per second :^)
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
1540c56e6c LibGL+LibGPU+LibSoftGPU: Implement GL_GENERATE_MIPMAP
We can now generate texture mipmaps on the fly if the client requests
it. This fixes the missing textures in our PrBoom+ port.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
dda5987684 LibGL+LibGPU+LibSoftGPU: Remove concept of layer in favor of depth
Looking at how Khronos defines layers:

  https://www.khronos.org/opengl/wiki/Array_Texture

We both have 3D textures and layers of 2D textures, which can both be
encoded in our existing `Typed3DBuffer` as depth. Since we support
depth already in the GPU API, remove layer everywhere.

Also pass in `Texture2D::LOG2_MAX_TEXTURE_SIZE` as the maximum number
of mipmap levels, so we do not allocate 999 levels on each Image
instantiation.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
44953a4301 LibGL+LibGPU+LibSoftGPU: Implement glCopyTex(Sub)?Image2d
These two methods copy from the frame buffer to (part of) a texture.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
d7f1dc146e LibGL: Calculate maximum log2 of texture size 2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
eb81b66b4e LibGL+LibGPU+LibSoftGPU: Rename blit_color_buffer_to
This makes it consistent with our other `blit_from_color_buffer` and
paves the way for a third method that will be introduced in one of the
next commits.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
1d36bfdac1 LibGL+LibSoftGPU: Implement fixed pipeline support for GL_COMBINE
`GL_COMBINE` is basically a fixed function calculator to perform simple
arithmetics on configurable fragment sources. This patch implements a
number of texture env parameters with support for the RGBA internal
format.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
494024b70e LibGL: Verify Texture2D existence
The code currently guarantees that we always have a target texture.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
72b4f95f71 LibGL: Implement glMultiTexCoord2fv(ARB)? APIs 2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
789d871892 LibGL: Define GL_NO_ERROR as 0
This conforms to the Khronos enum value listing and prevents a
redefinition warning when compiling with SDL_opengl.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
6d8dd0ee61 LibGL: Remove unused/default includes from GLContext 2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
07e94b3ec1 LibGL: Implement GL_CURRENT_COLOR context parameter 2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
759ef82e75 LibSoftGPU: Convert width and height to f32x4 just once
We were passing along a `u32x4` only for it to be converted to `f32x4`
as soon as we'd use it.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
b62dba6bbf LibSoftGPU: Remove unused alias truncate_int_range 2022-09-11 22:37:07 +01:00
Linus Groh
13109694ef Meta: Add networkException to the contributors list :^) 2022-09-11 22:13:14 +01:00
networkException
9ff6c1e692 LibWeb: Avoid copying viewport rect when converting length to pixels
See https://github.com/SerenityOS/serenity/pull/3433#discussion_r484570948
2022-09-11 22:08:38 +01:00
Timothy Flynn
be41b19146 Meta: Do not log CMake version on each CMake invocation
It is a tad verbose to print this each time CMake runs.
2022-09-11 21:40:15 +01:00
networkException
2612d23032 LibGUI: Implement rubber band selection in table view
This patch implements rubber band selection in table view while clamping
the rubber band rect to the widget inner rect, matching the behavior of
IconView and ColumnsView.
2022-09-11 21:39:32 +01:00
networkException
e0353c405d LibGUI: Limit column view rubber band rect to widget inner rect
Previously when selecting a column that was partially scrolled out of
view the rubber band rect would extend outside the widget inner rect.

This patch rewrites the implementation to be more readable and clamps
the rubber band rect to the widget inner rect to match the behavior of
IconView.
2022-09-11 21:39:32 +01:00
networkException
e42a9cf957 LibGUI: Properly limit the icon view rubber band rect to the widget
Previously the rubber band rect of IconView was not properly constrained
to the widget inner rect, leaving a one pixel gap on the bottom and
right side. This patch removes the gap by inflating the constraint rect
by one pixel on each axis.
2022-09-11 21:39:32 +01:00
Timothy Flynn
5190f4e605 LibGUI: Support emoji with multiple code points in EmojiInputDialog 2022-09-11 20:33:57 +01:00
Timothy Flynn
31b2d93038 LibGUI+LibVT: Notify widgets of emoji selection with a callback
Currently, LibGUI modifies the Ctrl+Alt+Space key event to instead
represent the emoji that was selected through EmojiInputDialog. This is
limited to a single code point.

For multiple code point emoji support, individual widgets now set a hook
to be notified of the emoji selection with a UTF-8 encoded string. This
replaces the previous set_accepts_emoji_input() method.
2022-09-11 20:33:57 +01:00
Timothy Flynn
8190120f95 LibGUI: Use discovered emoji files as the EmojiInputDialog button icons
Rather than rendering the emoji as text, use the emoji icons themselves.
2022-09-11 20:33:57 +01:00
Timothy Flynn
a2eb42a9c0 LibGUI: Add an emoji category filter for SerenityOS custom emojis
Most of the emoji are 7x10px (or close to that). But some are larger, on
the order of 128x128px. The icon used for the SerenityOS category is one
such large emoji, and must be scaled down to an appropriate size for
rendering.
2022-09-11 20:33:57 +01:00
Timothy Flynn
4cb9472f97 LibGUI: Ensure unknown emoji have a set display order
Currently, we use code point values as a tie break when sorting emoji by
display order. When multiple code point emoji are supported, this will
become a bit awkward. Rather than dealing with varying code point length
while sorting, just set a maximum display order to ensure these are
placed at the end.
2022-09-11 20:33:57 +01:00
Timothy Flynn
b7ef36aa36 LibUnicode: Parse and generate custom emoji added for SerenityOS
Parse emoji from emoji-serenity.txt to allow displaying their names and
grouping them together in the EmojiInputDialog.

This also adds an "Unknown" value to the EmojiGroup enum. This will be
useful for emoji that aren't found in the UCD, or for when UCD downloads
are disabled.
2022-09-11 20:33:57 +01:00
Timothy Flynn
0aadd4869d LibUnicode: Generate emoji data for non-fully-qualified emoji
This allows us to find emoji data for files such as /res/emoji/U+A9.png.
U+00A9 is not fully-qualified (its full form is U+00A9 U+FE0F). But the
UCD has unqualified data for this code point; generating it allows us to
categorize these emoji appropriately in the EmojiInputDialog.
2022-09-11 20:33:57 +01:00
davidot
3359f192a8 Meta: Make the CI build the new test262 test runner 2022-09-11 20:25:51 +01:00
davidot
cea9464961 LibJS: Add the test-test262 utility
This allows running of test262 (like) tests with any runner. And thus
allows running the full test262 suite on Serenity itself.
The functionality of test-test262 is intentionally limited at first.
It does support:
- Progress updates including the special serenity terminal commands
- Outputting a per-file, to compare against other runs
- Passing any number of parameters to the runner
- Setting the batch size of the amount of tests per runner process
- Outputting a summary of the test results
2022-09-11 20:25:51 +01:00
davidot
aff51f7cfd test262-runner: Don't create a VM and Interpreter if just parsing
If a test is supposed to fail during parse or early phase we can stop
after parsing. Because phases in modules are not as clear we don't skip
the other parts for modules.
2022-09-11 20:25:51 +01:00
davidot
cd3a72b367 test262-runner: Convert dbgln to warnln
Since this application is now supposed to be used from within Serenity
we should make sure to warn the actual user.
2022-09-11 20:25:51 +01:00