Commit Graph

6110 Commits

Author SHA1 Message Date
Hajime Hoshi
ebd0e11c0d graphicsdriver/metal: Avoid synching texture data at ReplacePixels
Instead, use a temporary texture, transfer texture data to it, and
copy the data on GPU side.
2020-06-28 19:40:37 +09:00
Hajime Hoshi
383ff1e6a7 shareable: Use as big backends as possible
As the shader hack is removed at d74f7d3a77,
any sizes of textures should work regardless of the float precision.
2020-06-28 04:14:55 +09:00
Hajime Hoshi
aea4630b5f Revert "buffered: Defer ReplacePixels when possible"
This reverts commit 1395ab5e84.

Reason: This increases the number of ReplacePixels aggressively.
2020-06-28 02:49:55 +09:00
Hajime Hoshi
36515eb1f5 Revert "ebiten: Make ebiten.Image and buffered.Image 1:1"
This reverts commit 620981a09a.

Fixes #1218
Updates #896
2020-06-28 01:01:39 +09:00
Hajime Hoshi
52df43b7ab Update GLFW version 2020-06-27 23:55:32 +09:00
Hajime Hoshi
006b518929 ebiten: Skip test failing on macOS 2020-06-27 20:24:32 +09:00
Hajime Hoshi
7e01ba17c1 shareable: Bug fix: wrong size calculation
The size calculation must consider the paddings.

Fixes #1217
2020-06-27 17:21:26 +09:00
Hajime Hoshi
00e8b701c1 graphicsdriver/metal: Optimization 2020-06-27 04:14:21 +09:00
Hajime Hoshi
2bc1475a15 graphicsdriver/metal: Bug fix: Sync textures before replacing a region
Updates #1213
2020-06-27 03:08:17 +09:00
Hajime Hoshi
7b6182d05a shareable: Update comments 2020-06-27 02:46:29 +09:00
Hajime Hoshi
5a176d6f4f graphicsdriver/metal: Bug fix: synchronizing must be skipped on iOS 2020-06-27 01:45:14 +09:00
Hajime Hoshi
9f76b96c1f graphicsdriver/metal: Specify the texture type explicitly 2020-06-26 23:46:12 +09:00
Hajime Hoshi
a1abe6b728 restorable: Add padding when renderingn the empty image 2020-06-26 14:01:49 +09:00
Hajime Hoshi
5c4740c294 ebiten: Improve TestImageColorMCopy to test copying actually works 2020-06-25 22:49:37 +09:00
Hajime Hoshi
198621404f buffered: Bug fix: Pixel data was not invalidated after DrawImage/Triangles 2020-06-25 13:11:19 +09:00
Hajime Hoshi
4a7929cf71 buffered: Bug fix: Duplicated calls of resolvePendingPixels 2020-06-25 04:08:24 +09:00
Hajime Hoshi
d3613e13af graphicsdriver/opengl: Fix comments 2020-06-25 01:06:30 +09:00
Hajime Hoshi
2a63512c6e driver: Add AddressUnsafe
This skips the source-region check and reduces 'if' branches from
shader programs.

AddressUnsafe is internal only so far. We might expose this value
later.

Updates #1210
2020-06-25 01:00:38 +09:00
Hajime Hoshi
bfc2fffba6 graphicsdriver/opengl: Move comments 2020-06-24 23:52:39 +09:00
Hajime Hoshi
20b5be0886 graphicsdriver: Bug fix: Tie-breaking when picking a texel
When a texel is picked on texel-borders of a texture, the behavior
(tie-breaking) depends on GPU and unexpected. This change fixes this
issue by shifting 1/512 [texel] when picking a texel up.

Updates #1212
2020-06-24 20:51:16 +09:00
Hajime Hoshi
ebb3bcfeb5 examples/shader: Refactoring 2020-06-24 02:47:51 +09:00
Hajime Hoshi
545342262f examples/shader: Show an image 2020-06-24 01:41:27 +09:00
Hajime Hoshi
afef032acc ebiten: Deprecate Run
Fixes #1184
2020-06-22 03:45:19 +09:00
Hajime Hoshi
1f9cc53ce4 examples/keyboard/keyboard: Use RunGame
Updates #1111
2020-06-22 03:44:40 +09:00
Hajime Hoshi
841085863b examples/shader: Embed the shader file 2020-06-22 01:07:00 +09:00
Hajime Hoshi
d0df5950b5 examples/shader: Add mouse cursor 2020-06-22 00:47:53 +09:00
Hajime Hoshi
f10263fff7 shader: Bug fix: Test failures 2020-06-21 22:32:54 +09:00
Hajime Hoshi
c36d2165e6 shader: Parse number literals in unary expressions correctly
Fixes #1190
2020-06-21 21:47:27 +09:00
Hajime Hoshi
29b70bea95 shader: Parse number literals in binary expressions correctly
Updates #1190
2020-06-21 21:32:40 +09:00
Hajime Hoshi
afc39a100c shader: Reduce the calls of parseExpr so that unneeded variables are reduced 2020-06-21 16:39:26 +09:00
Hajime Hoshi
ac9bb92885 shader: Refactoring: Reduce calls of parseExpr at definings 2020-06-21 05:26:23 +09:00
Hajime Hoshi
40e581c19f shader: Allow to mix an int and a float in a binary expression
Updates #1190
2020-06-21 03:34:55 +09:00
Hajime Hoshi
eb136daa39 testing: Bug fix: Compile error 2020-06-21 02:26:59 +09:00
Hajime Hoshi
ea9fae1faa shader: Abort parsing correctly when an error is found 2020-06-21 02:18:21 +09:00
Hajime Hoshi
912135d1e7 shaderir: Use constant.Value for number literals
Updates #1190
2020-06-21 01:30:23 +09:00
Hajime Hoshi
4b5de9f445 shaderir: Refactoring: Add OpFromToken 2020-06-20 23:27:54 +09:00
Hajime Hoshi
28948a9976 shaderir: Add (*Type).serialize again 2020-06-20 21:08:08 +09:00
Hajime Hoshi
255da0367f shader: Bug fix: a binary expression for an int and a float did not work 2020-06-20 18:10:23 +09:00
Hajime Hoshi
5e0e12d290 shader: Bug fix: Resolve types in a binary expression correctly 2020-06-20 17:49:23 +09:00
Hajime Hoshi
f36d6c02a9 shader: Refactoring: Remove detectType 2020-06-20 17:20:44 +09:00
Hajime Hoshi
cfc8b4505d Add Marios Nikolaou to AUTHORS 2020-06-19 21:16:02 +09:00
Marios Nikolaou
ee8d0c3479
ebiten: Correct spelling of game in function comment (#1203) 2020-06-19 21:12:02 +09:00
Hajime Hoshi
3da0af5de2 shader: Make parseExpr return types
Updates #1190
2020-06-19 03:19:07 +09:00
Hajime Hoshi
afb4e6dc3d shaderir: Misspelling 2020-06-18 01:28:17 +09:00
Hajime Hoshi
b620b4334e buffered: Bug fix: Corner case of the race condition
Updates #1195
2020-06-17 03:31:54 +09:00
Hajime Hoshi
0beddf5519 buffered: Bug fix: Race condition at checkDealeydCommandsNil
This change also renames checkDealeydCommandsNil to
checkDealeydCommandsFlushed, which makes more sense.

Updates #1195
2020-06-17 03:19:35 +09:00
Hajime Hoshi
2869885816 shaderir: Fix the initial variable values on GLSL
This is for consistency with number literals we are introducing.

Updates #1190
2020-06-17 01:59:02 +09:00
Hajime Hoshi
530723ec66 ebiten: Bug fix: Crash at examples/shader 2020-06-17 01:47:01 +09:00
Hajime Hoshi
d9cf1095d4 buffered: Bug fix: Race conndition on delayedCommands
This CL fixes the race condtion on delayedCommands, which can be
accessed and set to nil at the same time.

This CL separates some operations for delayedCommands into slow-
paths and fast-paths, and use mutex only at slow-paths for
performance. The implementation is based on sync.Once.

Fixes #1195
2020-06-16 23:22:18 +09:00
Hajime Hoshi
1735dda586 shareable: Rename border -> padding 2020-06-16 12:48:20 +09:00