Commit Graph

3710 Commits

Author SHA1 Message Date
Hajime Hoshi
f53327a57b internal/packing: fix the comment 2023-02-28 21:46:12 +09:00
Hajime Hoshi
9e0bebda71 internal/packing: bug fix: node's links were not synced correctly
Closes #2584
2023-02-28 20:50:24 +09:00
Hajime Hoshi
ade7b8ceec internal/buffered: bug fix: functions were not concurrent-safe
Before this change, `delayedCommandsFlushed` was set as 1 BEFORE
buffered commands were flushed. This meant that a function call and
a command being flushed were not concurrent-safe.

This change fixes this issue by changing the timing of setting
`delayedCommandsFlushed` as 1 to the later time after flushing the
buffered commands.

Closes #2580
2023-02-21 20:46:54 +09:00
Hajime Hoshi
b625cc84ce internal/ui: bug fix: FPS drop on fullscreen on macOS 13
Updates #1745
Closes #2495
2022-12-16 03:02:42 +09:00
Hajime Hoshi
1fc08d3d61 internal/graphicsdriver/directx: revert some commits for feture levels
This reverts these commits

* a4d20094d7
* ed88559a50
* cc82ad19a1

Reason: As the default feature level becomes 11 again, we don't need the
environment variable EBITENGINE_DIRECTX_FEATURE_LEVEL for v2.4.

Updates #2466
Updates #2486
2022-12-09 15:58:23 +09:00
Hajime Hoshi
3ce436f5ff internal/ui: bug fix: wrong calculation of wheel scrolling
Closes #2487
2022-12-08 02:10:45 +09:00
Hajime Hoshi
a4d20094d7 internal/graphicsdriver/directx: change the default feature level to 11_0
The feature level 12_0 causes some issues on some machines. As we now
have EBITENGINE_DIRECTX_FEATURE_LEVEL, let's go back to the default
feature level 11_0.

Updates #2486
2022-12-07 21:18:33 +09:00
Hajime Hoshi
f87504c3ec internal/glfwwin: bug fix: crash when dropping a file
Updates #2478
2022-12-03 04:48:09 +09:00
Hajime Hoshi
ed88559a50 internal/graphicsdriver/directx: add EBITENGINE_DIRECTX_FEATURE_LEVEL
A fix for #2447 was a breaking-change as the DirectX driver was no longer
available for some old graphics card.

To support such old cards, provide a new environment variable
EBITENGINE_DIRECTX_FEATURE_LEVEL to specify a feature level.
The possible values are 11_0, 11_1, 12_0, 12_1, and 12_2. The default
value is 12_0.

Closes #2466
2022-11-21 02:53:37 +09:00
Hajime Hoshi
5cd7d9107e internal/graphicsdriver/directx: bug fix: a software adaptor was unexpectedly chosen
Closes #2459
2022-11-16 15:53:27 +09:00
Hajime Hoshi
cc82ad19a1 internal/graphicsdriver/directx: specify DX level 12
The DirectX initialization passed but crashed later on some old machines
supporting the feature level 11 but not 12.

This change fixes the issue by changing the required feature level from
11 to 12 so that the initialization fails and OpenGL is used as the
fallback.

Closes #2447
2022-11-16 15:53:05 +09:00
Hajime Hoshi
ca1044ff33 internal/ui: bug fix: fullscreening didn't work correctly on macOS 13
As of macOS 13, a retrieved collectionBehavior included
NSWindowCollectionBehaviorFullScreenNone and this prevented the window
from being fullscreen.

This change fixes this issue by removing the flag
NSWindowCollectionBehaviorFullScreenNone when necessary.

Closes #2437
2022-11-05 14:22:03 +09:00
Hajime Hoshi
b983014e95 internal/graphicscommand: bug fix: compile error
Updates #2391
Updates #2423
2022-10-30 10:58:04 +09:00
Hajime Hoshi
13d28f50e5 internal/graphicscommand: always flush buffers
After #2423 is fixed, buffers should be able to be flushed safely
anytime.

Updates #2391
Updates #2423
2022-10-30 10:52:55 +09:00
Hajime Hoshi
e51d7ce947 internal/graphicscommand: bug fix: clear buffers when disposing an image
Closes #2423
2022-10-30 03:24:34 +09:00
Hajime Hoshi
89471701fc internal/graphicscommand: bug fix: suppress test flakiness on browsers
Closes #2391
2022-10-16 18:03:26 +09:00
Hajime Hoshi
4b22781d01 internal/atlas: remove an unnecessary mutex
Updates #2390
2022-10-16 15:29:17 +09:00
Hajime Hoshi
a971490dc9 internal/graphicscommand: bug fix: resolve unsent WritePixels commands
(*Image).WritePixels doens't send a command to the queue immediately
but caches commands internally. However, the package atlas assumed
that pixel data was sent to the cache every end of a frame. Then, byte
slices for pixels were corrupted.

This change fixes the issue by resolving all the images when flushing
commands.

Closes #2390
2022-10-16 15:27:30 +09:00
Hajime Hoshi
966823e445 internal/processteset/testdta: bug fix: compile error 2022-10-16 15:26:34 +09:00
Hajime Hoshi
67178c9534 internal/processtest/testdata: add a test file
Updates #2362
2022-10-16 15:18:04 +09:00
Hajime Hoshi
2b261c6314 internal/glfwwin, internal/graphicsdriver/directx: bug fix: wrong error handlings for Windows HANDLE
Closes #2366
2022-10-02 01:58:45 +09:00
Hajime Hoshi
b4306e0e56 internal/mipmap: bug fix: mipmap images were unexpectedly volatile
Closes #2354
2022-09-28 01:41:19 +09:00
Hajime Hoshi
eecabf25f4 internal/restorable: bug fix: wrong panic on mixing DrawTriangles and WritePixels
When DrawTriangles is called and then WritePixels is called on a
sub-image, a panic happened. However, this panic actually happens
only when the graphics driver requires restoring (e.g. OpenGL ES
on Android). The situation was very limited, but this was a real
problem on Android.

This panic was introduced to prevent a rendering bug by a inmature
graphics drivers, but we should no longer need this. This change
just removes the panic.

Updates #292
Closes #2346
2022-09-24 21:44:35 +09:00
Hajime Hoshi
ef26267703 internal/ui: bug fix: reentering updateImpl caused double unlocking
updateImpl can be invoked in multiple ways. This should have been
protected by a mutex, or this caused unexpected reentrance.

Closes #2339
2022-09-20 13:23:44 +09:00
divVerent
e808f168a1 internal/gamepaddb: fix mapping support for e.g. dpleft:-a0. (#2335)
SDL interprets this as "map -1 to 1, map 0 to -1", so we should do the same.

This fix contains two parts:
* Fix the intended output range.
* Also fix the formula to map a range to a range.
The fix does not change behavior if a "-a" mapping isn't used, as in any other case max-min == 1 or max+min == 0.

Fixes #2334
2022-09-20 00:35:08 +09:00
Hajime Hoshi
1a2e93c594 internal/gamepad: bug fix: a wireless Xbox controller didn't work correctly on macOS
The button and hat values must be adjusted by their minimum values.
See also GLFW's implementation.

Closes #266
2022-09-12 01:56:17 +09:00
divVerent
0ae4002750 internal/gamepad: ignore EPERM when opening gamepads (#2308)
This seems required for the Snap sandbox when probing a non-gamepad device node.

Closes #2307
2022-09-06 21:29:50 +09:00
Hajime Hoshi
6feb4c5121 internal/shader: bug fix: test failures
Updates #2304
2022-09-05 02:52:42 +09:00
Hajime Hoshi
ead48ca5ab internal/shaderir: bug fix: wrong argument check on pow
Closes #2304
2022-09-05 02:36:15 +09:00
Hajime Hoshi
40052f6e35 internal/ui: bug fix: do not call setFrame in windowDidExitFullScreen
Calling setFrame in windowDidExitFullScreen caused unexpected results
like a strange window size after fullscreen. Let's remove this.

By removing this, setting window position and size during fullscreen
will no longer work again. Let's fix this later.

Closes #2295
2022-09-02 17:50:37 +09:00
Hajime Hoshi
7c6466cfa0 internal/graphicsdriver/directx: bug fix: processtest failures
The command allocators should be reset only when the frame index was
updated.

Closes #2249
2022-09-02 12:48:38 +09:00
Hajime Hoshi
5459036d1c Revert "internal/graphicsdriver/directx: bug fix: do not reset command allocators at Begin"
This reverts commit 9d303e8dc5.

Reason: A GPU memory leak (#2292). Though this reverting reveals the error #2249
again, a memory leak is more critical. Then revert the change once, and then
take time to investigate how to resolve #2249.

Closes #2292
Updates #2249
2022-09-02 02:30:50 +09:00
Hajime Hoshi
833473316f internal/ui: forbide RestoreWindow when the window size limits are specified
Closes #2259
2022-08-20 22:36:37 +09:00
Hajime Hoshi
31141d5112 internal/ui: forbid maximizing window when a window size is limited
Closes #2258
2022-08-20 22:24:13 +09:00
Hajime Hoshi
e150745598 internal/ui: bug fix: do not register a framebuffer-size callback on macOS
When a decorating state is switched, a framebuffer-size callback was
invoked but with wrong parameters on macOS.

This callback was originally implemented for i3 window manager, and
was not needed for macOS. Then, let's not use this on macOS. Probably
we can also skip this registering on Windows.

Updates #1960
Closes #2257
2022-08-20 19:10:42 +09:00
Hajime Hoshi
85d54515cd internal/shader: check types for && and || correctly
Updates #2256
2022-08-19 17:34:03 +09:00
Hajime Hoshi
d6047f3988 internal/shader: add type checks to compare two values
Closes #2187
2022-08-19 17:03:29 +09:00
Hajime Hoshi
f63b87f675 internal/shader: refactoring 2022-08-19 15:24:00 +09:00
Hajime Hoshi
a4b9d3c241 internal/gamepaddb: update the database
Adopts 74ebd51889
2022-08-19 02:54:03 +09:00
Hajime Hoshi
590147acda internal/shader: add type checks for the builtin function texture2D
Note that texture2D is usually not called by users.

Closes #2184
2022-08-19 02:27:40 +09:00
Hajime Hoshi
63eee0600e internal/shader: add type checks for the builtin function transpose
Updates #2184
2022-08-19 01:57:24 +09:00
Hajime Hoshi
7a94cbbd62 internal/shader: add refract
Closes #2255
2022-08-19 01:48:35 +09:00
Hajime Hoshi
13ae8f5872 internal/shader: add type checks for the builtin function faceforward
Updates #2184
2022-08-19 01:48:30 +09:00
Hajime Hoshi
73f12fa704 internal/shader: add type checks for the builtin function smoothstep
Updates #2184
2022-08-19 01:27:01 +09:00
Hajime Hoshi
f3ea274d20 internal/shader: add type checks for the builtin function mix
Updates #2184
2022-08-19 01:19:20 +09:00
Hajime Hoshi
ec851a85f5 internal/shader: add type checks for the builtin function step
Updates #2184
2022-08-19 00:25:04 +09:00
Hajime Hoshi
34cc6405dd internal/shader: add type checks for the builtin function clamp
Updates #2184
2022-08-19 00:14:38 +09:00
Hajime Hoshi
82a9aac689 internal/shader: add type checks for the builtin function cross
Updates #2184
2022-08-18 23:45:01 +09:00
Hajime Hoshi
7af6c99954 internal/shader: add type checks for some builtin functions
Updates #2184
2022-08-18 23:21:25 +09:00
Hajime Hoshi
3aad4fada1 internal/shaderir: add comments
Updates #2253
2022-08-18 17:46:53 +09:00