Commit Graph

129 Commits

Author SHA1 Message Date
Hajime Hoshi
b54ad73a2b Add go:build comments with go1.17beta1 fmt 2021-06-11 01:11:46 +09:00
Hajime Hoshi
77b198211c internal/graphicsdriver/metal: Add a comment 2021-02-27 04:04:25 +09:00
Hajime Hoshi
53352cf2b3 internal/graphicsdriver/metal: Use the smallest temporary texture
Updates #1517
2021-02-27 03:45:19 +09:00
Hajime Hoshi
673627c4d4 internal/graphicsdriver/metal: Optimization 2021-02-27 02:30:20 +09:00
Hajime Hoshi
6b3c51921c internal/driver: Remove Image.Sync
Syncing is no longer needed for Metal, and additionally, OpenGL's sync
implementation was mock.

Updates #1508
2021-02-26 23:16:28 +09:00
Hajime Hoshi
718273c2d7 ebiten: Add a new shader function imageDstRegionOnTexture
Updates #1428
2020-12-09 11:36:29 +09:00
Hajime Hoshi
ddfb8adbc4 graphicsdriver/metal: Asynchronous sending pixels
Fixes #1418
2020-11-10 22:48:03 +09:00
Hajime Hoshi
5705dc79fb graphicsdriver/metal: Do not need to wait until flushing at Sync 2020-11-10 22:12:26 +09:00
Hajime Hoshi
e09f3aa286 graphicsdriver/metal/mtl: Bug fix: Fix the guard range 2020-11-08 04:44:43 +09:00
Hajime Hoshi
aaff18ecf7 graphicsdriver/metal/mtl: Bug fix: Guard the handler map by a mutex
The handler is invoked in another thread than the main thread.
2020-11-08 04:40:13 +09:00
Hajime Hoshi
ed028110cf ebiten: Allow rendering on a sub-image by scissor test
Fixes #1255
2020-11-08 00:58:44 +09:00
Hajime Hoshi
e4e8e7254e graphicsdriver/metal/mtl: Refactoring: Specify struct member names explicitly 2020-11-07 23:46:07 +09:00
Hajime Hoshi
a8f96ee9af graphicsdriver/metal: Add Sync to sync CPU and GPU asynchronously
Fixes #1414
2020-11-07 04:09:47 +09:00
Hajime Hoshi
6e3cbe2e33 graphicsdriver/metal/mtl: Refactoring 2020-11-07 03:26:35 +09:00
Hajime Hoshi
8da5ad2c4f graphicsdriver/metal: Misspelling 2020-11-03 23:44:40 +09:00
Hajime Hoshi
fe6a2daef4 graphicsdriver/metal: Bug fix: Had to set the vsync state again at resetting
Fixes #1364
2020-10-14 01:58:56 +09:00
Hajime Hoshi
249e1c46ba graphicsdriver/metal: Remove an old comment
Updates #1367
2020-10-14 01:51:18 +09:00
Hajime Hoshi
eed619ad0f graphicsdriver/metal, graphicsdriver/opengl: Reland: Remove the thread usages for performance
Instead, graphicscommand package has a thread.

Updates #1367
2020-10-13 02:46:31 +09:00
Hajime Hoshi
713eee1117 Revert "graphicsdriver/metal, graphicsdriver/opengl: Remove the thread usages for performance"
This reverts commit 2942f10d9d.

Reason: Compile error on mobiles and runtime error on browsers
2020-10-13 02:12:02 +09:00
Hajime Hoshi
2942f10d9d graphicsdriver/metal, graphicsdriver/opengl: Remove the thread usages for performance
Instead, graphicscommand package has a thread.

Updates #1367
2020-10-13 01:50:54 +09:00
Hajime Hoshi
e90b5ff277 Update import paths in the documents 2020-10-04 05:07:08 +09:00
Hajime Hoshi
bf515bb594 Update version to v2.0.0-alpha 2020-10-04 04:30:40 +09:00
Hajime Hoshi
52fcab7a90 graphicsdriver/metal: Fix comments 2020-09-06 16:51:44 +09:00
Hajime Hoshi
e565433fb0 graphicsdriver/metal: Bug fix: Synchronizing textures on iOS was necessary
Fixes #1337
2020-09-06 16:19:50 +09:00
Hajime Hoshi
a3b41515a9 ui: Replace the native window's type (unsafe.Pointer) with uintptr
Updates #1306
2020-09-04 00:51:48 +09:00
Hajime Hoshi
609a3c4e22 ebiten: Bug fix: Fix the texel calculation
In shaders, texCoord is always in texture0's texels. Convert them
at imageNTextureAt functions correctly.

Fixes #1290
2020-08-11 04:15:07 +09:00
Hajime Hoshi
69f87d5fd1 ebiten: Add new shader builtin functions: image[N]TextureBoundAt
Fixes #1287
2020-08-11 03:24:54 +09:00
Hajime Hoshi
4d1947f711 grpahicsdriver/metal: Better error message 2020-08-09 04:06:30 +09:00
Hajime Hoshi
a45e241da1 shaderir/metal: Implement the shader IR compiler for Metal
Fixes #1165
2020-08-08 19:14:57 +09:00
Hajime Hoshi
2b89710600 graphicsdriver/metal: Refactoring 2020-08-08 18:05:58 +09:00
Hajime Hoshi
6dc74d308b graphicsdriver/metal: Rename viewportSize to internalSize and use it more 2020-08-08 16:07:14 +09:00
Hajime Hoshi
fe1cea533a graphicsdriver/metal: Add a generalized 'draw' function
This is a preparation for rendering shaders.

Updates #1165
2020-08-08 03:12:44 +09:00
Hajime Hoshi
eb056690aa graphicsdriver/metal: Update the minimum macOS version to 10.12 for Go 1.15 2020-07-25 04:18:26 +09:00
Hajime Hoshi
36e9803cea shader: Enable to get pixels from multiple images
Updates #1193
2020-07-19 02:33:43 +09:00
Hajime Hoshi
6ccb614b08 graphicsdriver/metal: Implement CompositeModeMultiply
Updates #410
2020-07-18 21:51:57 +09:00
Hajime Hoshi
e0d5763a60 shader: Use the fixed number of images for shaders
This changes uses arrays rather than slices in order to avoid heap
allocations.

Updates #1193
2020-07-18 18:27:47 +09:00
Hajime Hoshi
7f70797a6d ebiten: Rename DrawTriaglesWithShaderOptions.Textures to Images 2020-07-15 03:49:05 +09:00
Hajime Hoshi
d217bc6033 ebiten: Sparate textures from uniforms at DrawTrianglesWithShader
Updates #1193
Updates #1239
2020-07-09 01:59:21 +09:00
Hajime Hoshi
b83f0acc4d Remove source-region information from vertices
Fixes #1210
2020-07-02 23:38:39 +09:00
Hajime Hoshi
71c9e7ac40 driver: Add Region and sourceRegion parameter at Draw
This is a preparation to remove source-region information from
vertices.

Updates #1210
2020-07-02 03:26:05 +09:00
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
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
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
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
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
1785b6a670 examples/moire: Add a smaller scale, and remove AdjustTexel function from shaders
This can reproduce the bug reported at #669.

Apparently, the fix (8827520d4a) is
no longer required after 3550abef7a.
That's pretty odd, but examples/moire proves this fact.

Updates #669
Updates #759
2020-06-15 00:29:34 +09:00
Hajime Hoshi
e023425be0 graphicsdriver/metal: Reduce calls of SetLayer 2020-06-14 05:07:33 +09:00
Hajime Hoshi
f80719ef9a driver: Use slices for uniform variables instead of maps
Fixes #1172
2020-05-26 23:50:11 +09:00