Commit graph

3228 commits

Author SHA1 Message Date
Daniel Eklöf
78da147e80
Merge branch 'releases/1.6' 2020-12-21 16:00:00 +01:00
Daniel Eklöf
c6a53d5e33
meson/pkgbuild: bump version to 1.6.2 2020-12-21 15:58:25 +01:00
Daniel Eklöf
71d1515a05
Merge branch 'releases/1.6' 2020-12-21 13:55:19 +01:00
Daniel Eklöf
7c3cb008ec
changelog: prepare for 1.6.1 2020-12-21 13:50:27 +01:00
Daniel Eklöf
b6b565cc9a
changelog: mention -Wno-profile-instr-unprofiled 2020-12-21 13:50:06 +01:00
Daniel Eklöf
1ad63a5c58
changelog: mention --seed in in generate-alt-random.pu 2020-12-21 13:47:45 +01:00
Daniel Eklöf
68dd9c17d5
generate-alt-random: ioctl(TIOCGWINSZ) may fail in run inside a container
This _should_ only happen when we’re doing a partial PGO build, since
then the script is run in the parent terminal. In this case, the user
is expected to use --rows/--cols anyway.
2020-12-21 13:42:59 +01:00
Daniel Eklöf
e4ae5a7586
generate-alt-random: ioctl(TIOCGWINSZ) may fail in run inside a container
This _should_ only happen when we’re doing a partial PGO build, since
then the script is run in the parent terminal. In this case, the user
is expected to use --rows/--cols anyway.
2020-12-21 13:40:53 +01:00
Daniel Eklöf
6a03567490
install: remove -march=native
This simplifies the instructions. People interested in performance are
likely to know how to use it.
2020-12-21 13:02:58 +01:00
Daniel Eklöf
84fe48acbb
install.md: mention that packagers should not use -march=native 2020-12-21 13:02:54 +01:00
Daniel Eklöf
69836ab795
install.md: add -Wno-profile-instr-unprofiled to clang flags in PGO builds 2020-12-21 13:02:51 +01:00
Daniel Eklöf
aa13dfb4e8
install: remove -march=native
This simplifies the instructions. People interested in performance are
likely to know how to use it.
2020-12-21 13:01:38 +01:00
Daniel Eklöf
a83f2448bc
Merge branch 'clang-wno-profile-instr-unprofile' 2020-12-21 13:01:11 +01:00
Daniel Eklöf
505680087c
changelog: use -std=c11 instead of -std=c18 2020-12-21 12:28:29 +01:00
sterni
5987b7c85f
meson: default to c11
We don't need any C18 specifics, so C11 is also fine and more widely
supported (i. e. in older clang versions).
2020-12-21 12:27:25 +01:00
Daniel Eklöf
82d9fd9219
install: fix typo in ‘ninja’ 2020-12-21 12:27:22 +01:00
Daniel Eklöf
4fe95e6354
install.md: mention that packagers should not use -march=native 2020-12-21 12:24:47 +01:00
Daniel Eklöf
5a1dcbb04d
install.md: add -Wno-profile-instr-unprofiled to clang flags in PGO builds 2020-12-21 12:24:29 +01:00
Daniel Eklöf
e95798e608
changelog: use -std=c11 instead of -std=c18 2020-12-21 12:20:08 +01:00
Daniel Eklöf
86c69aed05
Merge branch 'meson-c11' 2020-12-21 12:17:49 +01:00
Daniel Eklöf
288ea360cb
install: fix typo in ‘ninja’ 2020-12-21 12:15:59 +01:00
sterni
b4c9238f3f meson: default to c11
We don't need any C18 specifics, so C11 is also fine and more widely
supported (i. e. in older clang versions).
2020-12-20 16:44:41 +01:00
Daniel Eklöf
e4620071b0
Merge branch 'releases/1.6' 2020-12-20 15:51:04 +01:00
Daniel Eklöf
fbe9f54db0
changelog: update ‘contributors’ 2020-12-20 15:49:24 +01:00
Daniel Eklöf
533db90a94
changelog: remove trailing ‘5’ 2020-12-20 15:48:25 +01:00
Daniel Eklöf
e12a9347dd
generate-alt-random: override detected width/height when --cols/--rows have been used
This ensures we have a valid width and height, that matches what the
PGO helper binary expects.
2020-12-20 15:46:46 +01:00
Daniel Eklöf
983f474ec8
generate-alt-random: fix “new style” cube escape
It’s “38:5:<idx>”, not “38:2:5:<idx>”.
2020-12-20 15:46:43 +01:00
sterni
d1735ffb6d
generate-alt-random-writes: use python random, allow setting a seed
Using Python's own PRNG should make the code cleaner and allow for
reproducible stimulus files if that is desired via setting --seed (at
least for the same versions of the script, changing the kind and/or
order of the random calls will of course impact the output in the
future).

I did the following substitutions:

* rand.read(1)[0] % n and struct.unpack('@H', rand.read(2))[0] % n →
  random.randrange(n)
* rand.read(1)[0] → random.randrange(256)
* rand.read(n) → [random.randrange(256) for _ in range(n)]
  (better alternative would have been random.randbytes(n), but is only
  available for Python >= 3.9, switching to this in the future will
  impact output)
* list[rand.read(1) % len(list)] → random.choice(list)
2020-12-20 15:46:40 +01:00
Daniel Eklöf
a2ce0622c5
render: fix rounding error when calculating background color with alpha
We use pre-multiplied alpha color channels, but were having bad
rounding errors due to the alpha divider being truncated to an
integer.

The algorithm for pre-multiplying a color channel is:

  alpha_divider = 0xffff / alpha
  pre_mult_color = color / alpha_divider

In order to fix the rounding errors, we could turn ‘alpha_divider’
into a double.

That however would introduce a performance penalty since now we’d need
to do floating point math for each cell.

The algorithm can be trivially converted to:

  pre_mult_color = color * alpha / 0xffff

Since both color and alpa values are < 65536, the multiplication is
“safe”; it will not overflow an uint32_t.

Closes #249
2020-12-20 15:46:32 +01:00
Daniel Eklöf
06f84b9aaf
meson: add wl_proto_headers to pgo executable
This fixes a build failure of pgo.o
2020-12-20 15:46:28 +01:00
Daniel Eklöf
3fd60d4975
changelog: mention meson dependency fix 2020-12-20 15:46:24 +01:00
Daniel Eklöf
b976d10f7d
changelog: add 1.6.1 section 2020-12-20 15:46:05 +01:00
Craig Barnes
18b027f26b
meson: add missing "wl_proto_headers" dependency for pgolib and vtlib
Dependency chains:

* pgolib -> terminal.c -> terminal.h -> wayland.h
* vtlib -> csi.c -> config.h -> wayland.h

wayland.h includes <primary-selection-unstable-v1.h>, which must be
generated by a custom_target() rule *before* any sources that require
it are built. Failure to fully specify these dependencies can otherwise
result in a race condition, where a dependent source file gets compiled
(and fails with a "header not found" error) before the header itself
has been generated.
2020-12-20 15:44:20 +01:00
Craig Barnes
9e7d108afd
changelog: fix link to "1.6.0" heading 2020-12-20 15:44:09 +01:00
Daniel Eklöf
eadc1c58a2
term: fix builds with debug logging enabled
DPI_AWARE_ON has been renamed to DPI_AWARE_YES
2020-12-20 15:43:26 +01:00
Daniel Eklöf
ede5661d50
changelog: update ‘contributors’ 2020-12-20 15:42:32 +01:00
Daniel Eklöf
e9dea5bb9d
generate-alt-random: override detected width/height when --cols/--rows have been used
This ensures we have a valid width and height, that matches what the
PGO helper binary expects.
2020-12-20 15:36:07 +01:00
Daniel Eklöf
21cb4671a4
generate-alt-random: fix “new style” cube escape
It’s “38:5:<idx>”, not “38:2:5:<idx>”.
2020-12-20 15:27:27 +01:00
Daniel Eklöf
1d7595d1db
Merge branch 'random-seed' 2020-12-20 15:27:03 +01:00
sterni
050da302b8 generate-alt-random-writes: use python random, allow setting a seed
Using Python's own PRNG should make the code cleaner and allow for
reproducible stimulus files if that is desired via setting --seed (at
least for the same versions of the script, changing the kind and/or
order of the random calls will of course impact the output in the
future).

I did the following substitutions:

* rand.read(1)[0] % n and struct.unpack('@H', rand.read(2))[0] % n →
  random.randrange(n)
* rand.read(1)[0] → random.randrange(256)
* rand.read(n) → [random.randrange(256) for _ in range(n)]
  (better alternative would have been random.randbytes(n), but is only
  available for Python >= 3.9, switching to this in the future will
  impact output)
* list[rand.read(1) % len(list)] → random.choice(list)
2020-12-20 14:52:27 +01:00
Daniel Eklöf
c60c8d93f7
Merge branch 'subproject-wrap' 2020-12-20 14:37:02 +01:00
Daniel Eklöf
339acc57cf
render: fix rounding error when calculating background color with alpha
We use pre-multiplied alpha color channels, but were having bad
rounding errors due to the alpha divider being truncated to an
integer.

The algorithm for pre-multiplying a color channel is:

  alpha_divider = 0xffff / alpha
  pre_mult_color = color / alpha_divider

In order to fix the rounding errors, we could turn ‘alpha_divider’
into a double.

That however would introduce a performance penalty since now we’d need
to do floating point math for each cell.

The algorithm can be trivially converted to:

  pre_mult_color = color * alpha / 0xffff

Since both color and alpa values are < 65536, the multiplication is
“safe”; it will not overflow an uint32_t.

Closes #249
2020-12-20 12:25:12 +01:00
Daniel Eklöf
35e28fc503
meson: add wl_proto_headers to pgo executable
This fixes a build failure of pgo.o
2020-12-20 12:15:40 +01:00
Daniel Eklöf
9a0a642a5e
changelog: mention meson dependency fix 2020-12-20 11:56:18 +01:00
Daniel Eklöf
d85d9fafcb
Merge branch 'meson-dep-fixes' 2020-12-20 11:53:26 +01:00
Daniel Eklöf
f56695cfff
Merge branch 'changelog-link-fix' 2020-12-20 11:52:08 +01:00
Craig Barnes
da47deee10 changelog: fix link to "1.6.0" heading 2020-12-19 22:50:18 +00:00
Craig Barnes
013cca646d meson: use wrap files for fcft/tllist subprojects
See: https://mesonbuild.com/Wrap-dependency-system-manual.html
2020-12-19 22:43:09 +00:00
Craig Barnes
7dc6036ca9 meson: add missing "wl_proto_headers" dependency for pgolib and vtlib
Dependency chains:

* pgolib -> terminal.c -> terminal.h -> wayland.h
* vtlib -> csi.c -> config.h -> wayland.h

wayland.h includes <primary-selection-unstable-v1.h>, which must be
generated by a custom_target() rule *before* any sources that require
it are built. Failure to fully specify these dependencies can otherwise
result in a race condition, where a dependent source file gets compiled
(and fails with a "header not found" error) before the header itself
has been generated.
2020-12-19 22:09:03 +00:00
Daniel Eklöf
2a82096749
term: fix builds with debug logging enabled
DPI_AWARE_ON has been renamed to DPI_AWARE_YES
2020-12-18 17:32:54 +01:00