Commit Graph

37753 Commits

Author SHA1 Message Date
Jelle Raaijmakers
526390ec06 LibSoftGPU: Move back to i32-based subpixels
Our move to floating point precision has eradicated the pixel artifacts
in Quake 1, but introduced new and not so subtle rendering glitches in
games like Tux Racer. This commit changes three things to get the best
of both worlds:

1. Subpixel logic based on `i32` types was reintroduced, the number of
   bits is set to 6. This reintroduces the artifacts in Quake 1 but
   fixes rendering of Tux Racer.

2. Before triangle culling, subpixel coordinates are calculated and
   stored in `Triangle`. These coordinates are rounded, which fixes the
   Quake 1 artifacts. Tux Racer is unaffected.

3. The triangle area (actually parallelogram area) is also stored in
   `Triangle` so we don't need to recalculate it later on. In our
   previous subpixel code, there was a subtle disconnect between the
   two calculations (one with and one without subpixel precision) which
   resulted in triangles incorrectly being culled. This fixes some
   remaining Quake 1 artifacts.
2022-05-05 20:50:46 +02:00
Jelle Raaijmakers
7db68e118c LibGfx: Add Vector::to_rounded<T>() 2022-05-05 20:50:46 +02:00
Jelle Raaijmakers
54108263d6 LibGfx: Add IntVector2/3/4 types
The type `Vector<N, int>` is used often enough that it warrants its own
dedicated type.
2022-05-05 20:50:46 +02:00
Jelle Raaijmakers
f5ea93edfd LibSoftGPU: Remove unused Matrix3x3.h include 2022-05-05 20:50:46 +02:00
Jelle Raaijmakers
e70dc20650 LibSoftGPU: Replace some interpolate() calls with VectorN::dot
The dot product is effectively the same as `interpolate()`, allowing us
to use `VectorN`. No functional changes.
2022-05-05 20:50:46 +02:00
Jelle Raaijmakers
dfb218f6a8 LibSoftGPU: East-const interpolate
No functional changes.
2022-05-05 20:50:46 +02:00
Jelle Raaijmakers
9a1364d784 LibSoftGPU: Use FloatVector4 pixel format for Image
This increases memory usage for textures 4-fold, but allows us to
completely remove calls to `(un)pack_color` in a very hot loop.
2022-05-05 20:50:46 +02:00
Jelle Raaijmakers
6090e79191 LibSoftGPU: Use u64 for Device statistics vars
No functional changes.
2022-05-05 20:50:46 +02:00
Jelle Raaijmakers
365fb36108 LibGL: Split up GLContext implementation into logical units
This allows for faster rebuilds when the implementation changes.
2022-05-05 20:50:14 +02:00
Jelle Raaijmakers
4ace97c550 LibGL: Put the OpenGL API wrapper in a single code unit
We were splitting these API wrappers up into different files without a
quantifiable benefit. Now, it's extremely clear where the direct API
implementation lives. :^)
2022-05-05 20:50:14 +02:00
Undefine
4054c35e9a su: Change the HOME enviroment variable on login 2022-05-05 20:49:18 +02:00
Tim Schumacher
defe7b4ecc LibC: Add IN6_IS_ADDR_MULTICAST 2022-05-05 20:47:38 +02:00
Tim Schumacher
0ce43fae9c Kernel: Add IPv4 network class masks 2022-05-05 20:47:38 +02:00
Tim Schumacher
7dd4648565 Kernel: Add IPsec ESP and AH protocol numbers 2022-05-05 20:47:38 +02:00
Tim Schumacher
098af0f846 Kernel: Properly define IOV_MAX 2022-05-05 20:47:38 +02:00
Tim Schumacher
6d59d4d3d9 Kernel: Add the remaining POSIX MADV_* constants 2022-05-05 20:47:38 +02:00
Tim Schumacher
94ab75d3df Kernel: Add O_SYNC into fcntl.h 2022-05-05 20:47:38 +02:00
Linus Groh
2fc9481bb6 LibJS: Correct SetMutableBinding fallibility bug in spec comment
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/656f0cf
2022-05-05 09:28:08 +02:00
Karol Kosek
272cf3cbd5 Browser: Set an icon for the 'Edit Bookmark' Dialog 2022-05-04 23:22:10 +02:00
Karol Kosek
ae28e3ff5c LibWeb: Use Unicode data for CSS text-transform property
Previously it was only transforming ASCII characters.
2022-05-04 23:21:34 +02:00
Luke Wilde
8ed4ec9bc4 Ports: Update ca-certificates to 2022-04-26 2022-05-04 19:26:02 +02:00
Luke Wilde
65693bd003 Ports: Update OpenSSL to 1.1.1o 2022-05-04 19:26:02 +02:00
Luke Wilde
58409bcbd2 Ports: Update curl to 7.83.0 2022-05-04 19:26:02 +02:00
Dennis Esternon
c0e3d453c0 Base: Add note about optipng to contributing guidelines
A trick I learned from @linusg which is very useful and needs
to be a part of PRs where images are involved.
2022-05-04 11:16:24 +02:00
kleines Filmröllchen
ab49fcfb7c LibAudio+Userland: Remove Audio::LegacyBuffer
The file is now renamed to Queue.h, and the Resampler APIs with
LegacyBuffer are also removed. These changes look large because nobody
actually needs Buffer.h (or Queue.h). It was mostly transitive
dependencies on the massive list of includes in that header, which are
now almost all gone. Instead, we include common things like Sample.h
directly, which should give faster compile times as very few files
actually need Queue.h.
2022-05-03 23:09:20 +02:00
kleines Filmröllchen
f14a71eb34 LibAudio: Move WAV sample reading and conversion into own helpers
This completely removes WavLoader's dependency on LegacyBuffer: We
directly create the result sample container and write into it. I took
this opportunity to rewrite most of the sample reading functions as a
single templated function, which combined with the better error handling
makes this "ported" code super concise.
2022-05-03 23:09:20 +02:00
kleines Filmröllchen
a32d675164 LibAudio: Move WavLoader to Core::Stream APIs
This makes the code much more readable and concise, reduces the size of
the WavLoader class itself, moves almost all fallible initialization out
of the constructor and should provide better error handling in general.

Also, a lot of now-unnecessary imports are removed.
2022-05-03 23:09:20 +02:00
kleines Filmröllchen
81a336ea45 LibAudio: Refactor and modernize WavLoader
* All clang-tidy warnings fixed except read_header cognitive complexity
* Use size_t in more places
* Replace #define's with constexpr constants
* Some variable renaming for readability
2022-05-03 23:09:20 +02:00
kleines Filmröllchen
53d3d2daaa Documentation: Document how the event loop works & what it does
This was long overdue; as of writing this I saw another question about
something that seems obvious to me who spent a bunch of time with the
system.
2022-05-03 23:04:11 +02:00
Linus Groh
50d0f879f7 LibJS: Remove bogus FIXME in ArgumentsObject::internal_get()
Not sure what happened here, but the comment does not match the spec,
and so the FIXME I added is not actually an issue.
2022-05-03 22:51:36 +02:00
Linus Groh
f3768705a9 LibJS: Use consistent phrasing for string length
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/33ea99e
2022-05-03 22:49:31 +02:00
Linus Groh
8b035b80d3 LibJS: Update order of steps in CanonicalNumericIndexString
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/be5db32
2022-05-03 22:49:31 +02:00
Linus Groh
367e7b4fe5 LibJS: Reflect Array.prototype.toLocaleString comment in %TypedArray%
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/2a9ed48
2022-05-03 22:49:31 +02:00
Linus Groh
b9bbf45a81 LibJS: Add assertion (comment) to MakeMatchIndicesIndexPairArray
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/caa6e3f
2022-05-03 22:49:31 +02:00
Linus Groh
ede932287f LibJS: Update spec comments to avoid = comparisons with signed zero
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/b7348e5
2022-05-03 22:49:31 +02:00
Linus Groh
257375f54c LibJS: Update comments for Annex B changes to IsLooselyEqual
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/da3d674
2022-05-03 22:49:31 +02:00
Linus Groh
17fb40bc42 LibJS: Fix type confusion in msFromTime
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/8e572b6
2022-05-03 22:49:31 +02:00
Linus Groh
03e13715ac LibJS: Update two comments saying "completion value"
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/7913cea
2022-05-03 22:49:31 +02:00
Linus Groh
99cc442f5c LibJS: Use more consistent wording for creating empty lists
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/0bf22a9
2022-05-03 22:49:31 +02:00
Linus Groh
438e3ceb4a LibJS: Use CreateDataPropertyOrThrow in MakeMatchIndicesIndexPairArray
This was part of a normative change in the ECMA-262 spec, but didn't get
updated when we implemented that.

See: https://github.com/tc39/ecma262/commit/0209d85
2022-05-03 22:49:31 +02:00
Tim Schumacher
812aa1a99c Ports: Make cmake adhere to the number of build jobs 2022-05-03 22:18:20 +02:00
Tim Schumacher
8f8673474a Ports: Make llvm adhere to the number of build jobs 2022-05-03 22:18:20 +02:00
Tim Schumacher
d8ce2802e0 Ports: Make the number of compile jobs configurable 2022-05-03 22:18:20 +02:00
Tim Schumacher
7eb8d13f84 Ports: Update mc to 4.8.28
This also switches us from the GitHub tag archive to using the actual
release tarballs, which don't require us to run autoconf anymore.
2022-05-03 22:17:28 +02:00
Tim Schumacher
365caec2e2 Ports: Replace mc config.sub patch with our own download
`mc` runs `autoconf` on the fly, which unpacks a `config.sub` from its
own files. This means that support for `serenity` (and the fact whether
the patch successfully applies) depends on the version of `autoconf`
that is installed on the host.

Instead, just always replace it with a fresh version straight from the
GNU server.
2022-05-03 22:17:28 +02:00
Tim Schumacher
283aa43bf9 Ports: Force glib to link against gcc_s during the configure stage 2022-05-03 22:17:28 +02:00
Tim Schumacher
9dde7dcd70 Ports: Fix the default Toolchain name in .hosted_defs.sh 2022-05-03 22:17:28 +02:00
Tim Schumacher
be8a18b8d5 Ports: Work around halflife formatting NaN values endlessly 2022-05-03 22:16:14 +02:00
Tim Schumacher
73e505fb77 Ports: Return opfor to upstream 2022-05-03 22:16:14 +02:00
Tim Schumacher
c9c59602a4 Ports: Return halflife to upstream 2022-05-03 22:16:14 +02:00