Hajime Hoshi
eb3c45c8af
Revert "internal/graphicsdriver/opengl, metal, directx: skip multiplying a scale when a color matrix is used"
...
This reverts commit b457dc3307
.
Reason: a color scale might be used with ColorM (DrawTriangles)
2022-10-02 00:19:41 +09:00
Hajime Hoshi
b457dc3307
internal/graphicsdriver/opengl, metal, directx: skip multiplying a scale when a color matrix is used
2022-10-01 18:14:22 +09:00
Hajime Hoshi
4203a3b68a
internal/graphicsdriver/opengl, metal, directx: add comments
...
Updates #1212
2022-10-01 15:21:02 +09:00
Hajime Hoshi
a10f3d1dad
internal/graphicsdriver/opengl, metal, directx: refactoring: clean up the built-in shaders
2022-10-01 14:35:26 +09:00
Hajime Hoshi
cff64894cc
internal/affine: refactoring: use slices instead of array pointers
...
This doesn't change the performance at the test using ColorM:
```
name old time/op new time/op delta
ColorMScale-8 1.11µs ±43% 1.23µs ±70% ~ (p=1.000 n=5+5)
```
2022-09-30 22:20:32 +09:00
Hajime Hoshi
c7fcfe5bf7
internal/graphicsdriver/directx: refactoring
...
This makes more explicit that the pixels are sent after the slice
for the pixels finishes modification.
2022-09-19 00:31:44 +09:00
Hajime Hoshi
cfdf59ef8d
internal/graphicsdriver/directx: revert changes to remove GetCopyableFootprints
...
This reverts these commits
* ccddd4ee20
* 8e40c2ce7e
* 2eb1efe3cc
Without GetCopyableFootprints, the test results on 32bit Windows seemed
much more flaky. This didn't fix the memory issue like #2294 anyway.
2022-09-19 00:26:59 +09:00
Hajime Hoshi
ccddd4ee20
internal/graphicsdriver/directx: refactoring: make the lifetime of uploadingStagingBuffer more explicit
2022-09-19 00:16:53 +09:00
Hajime Hoshi
8e40c2ce7e
internal/graphicsdriver/directx: refactoring
2022-09-19 00:06:43 +09:00
Hajime Hoshi
2eb1efe3cc
internal/graphicsdriver/directx: stop using GetCopyableFootprints
...
GetCopyableFootprints seems very conservative and returns a quite
big memory size. Instead of using the info from GetCopyableFootprints
let's use our own minimum footprint.
2022-09-18 23:10:15 +09:00
Hajime Hoshi
45b2bd7b2b
internal/graphicsdriver/metal/mtl: remove a TODO comment
2022-09-16 11:48:59 +09:00
Hajime Hoshi
963eb2756a
all: fix TODO comments
2022-09-16 02:02:02 +09:00
Hajime Hoshi
2cbc5e7b60
internal/cocoa: remove IsIOS
...
Use `runtime.GOOS == "ios"` instead.
Closes #1415
2022-09-15 01:04:37 +09:00
Hajime Hoshi
655cd4bf68
all: remove the build tag
...
Updates #1415
2022-09-15 00:23:40 +09:00
Hajime Hoshi
86706c0335
internal/graphicsdriver/opengl: add opengles
build tag
...
This enables to use OpenGL ES instead of OpenGL.
Closes #292
2022-09-13 11:10:48 -07:00
Hajime Hoshi
6ea455f4e1
internal/graphicsdriver/opengl/gles: remove cString
2022-09-13 00:17:33 +09:00
Hajime Hoshi
e46bfd8d30
internal/graphicsdriver: rename files
...
Updates #292
2022-09-12 23:03:54 +09:00
Hajime Hoshi
14a3a0f6bc
internal/graphicsdriver/opengl/gl: better error message
2022-09-10 14:21:59 +09:00
Hajime Hoshi
fe11facbb8
internal/graphicsdriver/opengl/gl: better error message
2022-09-10 14:14:42 +09:00
Hajime Hoshi
d8eaf0a394
internal/graphicsdriver/opengl/gl: reland: integrate files for ebitengine/purego
...
Closes #2313
2022-09-10 13:37:20 +09:00
Hajime Hoshi
45a9cdda30
Revert "internal/graphicsdriver/opengl/gl: integrate files for ebitengine/purego"
...
This reverts commit be8edb984f
.
Reason: Test failures. See #2313
Updates #2313
2022-09-10 03:45:14 +09:00
Hajime Hoshi
be8edb984f
internal/graphicsdriver/opengl/gl: integrate files for ebitengine/purego
2022-09-10 03:31:16 +09:00
Hajime Hoshi
fccb43e15b
internal/graphicsdriver/directx: remove .errcheck_excludes_windows
...
These DirectX functions don't return any value and should not affect
the last error. Then it should be fine to ignore the returning values
from syscall.Syscall*.
Updates #2287
2022-09-10 03:03:18 +09:00
Hajime Hoshi
f2255b8fa6
internal/graphicsdriver/opengl/gl: remove .errcheck_excludes_windows
...
Updates #2287
2022-09-10 02:44:24 +09:00
Terra Brown
a1cc44833d
add errcheck static analysis ( #2293 )
...
Closes #2287
2022-09-10 01:52:46 +09:00
Hajime Hoshi
bb406c9b8f
internal/graphicsdriver/metal: bug fix: go vet failed
...
view must not be copied.
Updates #2282
2022-09-06 19:09:21 +09:00
Hajime Hoshi
35f597e682
internal/graphicsdriver: refactoring: remove FilterScreen
...
Closes #2282
2022-09-06 19:04:15 +09:00
Hajime Hoshi
bd43b42ee5
internal/ui: reland the screen shader in Kage
...
This change relads a part of the change to use the screen shader
instead of FilterScreen, but with the issue on iOS fixed.
Let's remove FilterScreen later.
Updates #2282
2022-09-06 18:48:19 +09:00
Hajime Hoshi
37bae461d1
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:06 +09:00
Hajime Hoshi
c126dea7fb
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:27:40 +09:00
Hajime Hoshi
cdf83ad2fc
internal/atlas: dispose images at ReadPixels
...
Without resolveDeferred() at ReadPixels, many images are never disposed
in tests.
Updates #2292
2022-09-01 23:54:57 +09:00
Hajime Hoshi
63e3c4adea
Revert "internal/graphics: remove FilterScreen and use an original Kage program instead"
...
This reverts these commits
* 3259ef3daf
* 7c55065490
* 5bb70f485e
Reason: iOS crash. Probably we have to prepare a special rendering
pipeline for the final screen.
Closes #2278
2022-08-30 01:56:06 +09:00
Hajime Hoshi
f7c44f086f
replace Ebiten with Ebitengine in comments
2022-08-29 11:17:17 +09:00
Hajime Hoshi
ec68534c73
internal/graphicsdriver/opengl: introduce EBITENGINE_OPENGL
replacing ebitenginewebgl1
...
This change inroduces a new environment variable `EBITENGINE_OPENGL`
to replace the build tag `ebitenginewebgl1`.
2022-08-28 01:45:58 +09:00
Hajime Hoshi
313c70f4b4
internal/graphicsdriver/directx: support 32bit Windows
...
Closes #2088
2022-08-28 00:04:55 +09:00
Hajime Hoshi
b2f874a244
image/rectangle: read pixels only for necessary parts
...
Closes #2274
2022-08-27 23:23:33 +09:00
Hajime Hoshi
5bb70f485e
internal/graphics: remove FilterScreen and use an original Kage program instead
...
Updates #2046
2022-08-26 17:41:29 +09:00
TotallyGamerJet
05470f7706
internal/graphicsdriver/metal: remove C for macOS ( #2243 )
...
Updates #1162
2022-08-18 01:39:34 +09:00
Hajime Hoshi
9d303e8dc5
internal/graphicsdriver/directx: bug fix: do not reset command allocators at Begin
...
Closes #2249
2022-08-17 22:37:26 +09:00
Hajime Hoshi
bb2df24f83
internal/graphicsdriver/directx: use DXGI_PRESENT_TEST when the screen is invisible
...
This change also reduces FPS to about 10 when the screen is invisible
in order to save CPU power.
Closes #2181
2022-08-17 00:10:44 +09:00
Hajime Hoshi
e7c0a121c4
all: remove the build tag 'ebitencbackend'
...
This also automatically enables 'egl' when 'nintendosdk' is specified.
Updates #2242
2022-08-12 13:15:39 +09:00
Hajime Hoshi
dac6548c0c
all: rename ebitenginecbackend to nintendosdk
...
Updates #2242
2022-08-12 02:05:29 +09:00
Hajime Hoshi
70f5e84098
internal/graphicsdriver: rename ReplacePixels to WritePixels
...
Updates #2236
2022-08-08 03:05:04 +09:00
Hajime Hoshi
72d5002e72
remove go2cpp support
...
Closes #2126
2022-08-07 22:17:53 +09:00
mattn
2bacecca24
fix typos ( #2227 )
2022-08-03 22:40:39 +09:00
mattn
3cd0daac67
go generate ./... with Go 1.19 ( #2228 )
2022-08-03 20:48:02 +09:00
Herczog Zoltán
fabf3fb374
internal/graphicsdriver/metal: remove supportsMetal check ( #2223 )
...
Closes #2211
2022-07-31 21:20:53 +09:00
Hajime Hoshi
2aa595de52
Revert "internal/graphicsdriver/directx: bug fix: check the error at CreateGraphicsPipelineState at initialization"
...
This reverts commit c183555cc8
.
Reason: this didn't help anything on the reporter's machine
2022-07-31 00:46:26 +09:00
Hajime Hoshi
c183555cc8
internal/graphicsdriver/directx: bug fix: check the error at CreateGraphicsPipelineState at initialization
...
CreateGraphicsPipelineState someitmes causes an error
DXGI_ERROR_DEVICE_HUNG, but we failed to know why.
Instead of fixing this, check the error earlier and use the fallback
grpahics library OpenGL in this case.
Updates #2198
2022-07-29 16:20:09 +09:00
Hajime Hoshi
9ea399e7cc
internal/graphicsdriver/directx: typo
2022-07-20 01:24:08 +09:00
Hajime Hoshi
7025f195a7
internal/graphicsdriver/directx: check DirectX availability earlier for Wine
...
Closes #2114
2022-07-20 01:22:45 +09:00
Hajime Hoshi
e861080145
internal/graphicsdriver/directx: early error check for Wine
...
Updates #2114
2022-07-19 23:55:44 +09:00
Hajime Hoshi
f8acd5e7ee
internal/graphicsdriver/directx: bug fix: D3D12CreateDevice could be called without creating a device
2022-07-19 03:22:46 +09:00
Hajime Hoshi
0f9ec45709
internal/graphicsdriver/directx: refactoring
2022-07-18 23:36:42 +09:00
Hajime Hoshi
90ac7d047d
internal/graphicsdriver/opengl/gl: bug fix: wrong build tag syntax
2022-07-15 23:34:09 +09:00
Hajime Hoshi
b31ce0a568
internal/graphicsdriver/directx: update comments
2022-07-15 13:33:45 +09:00
Hajime Hoshi
b48c2aa103
internal/graphicsdriver/directx: bug fix: too many constant buffers could be allocated
...
Closes #2204
2022-07-15 03:40:24 +09:00
Hajime Hoshi
e3d025bf4f
internal/graphicsdriver/directx: fix a wrong constant usage
2022-07-15 02:49:01 +09:00
Hajime Hoshi
8d74039617
internal/graphicsdriver/directx: increment numDescriptorsPerFrame
...
16 seems too conservative. Let's double it.
Updates #2188
2022-07-15 02:42:23 +09:00
Hajime Hoshi
9a35366380
internal/graphicsdriver/directx: batch ResourceBarrier commands ( #2203 )
...
Updates #2188
2022-07-15 02:34:38 +09:00
Hajime Hoshi
41edd98675
Revert "internal/graphicsdriver/directx: batch ExecuteCommandList"
...
This reverts commit f92107c2ee
.
Reason: Performance regression
Updates #2188
2022-07-15 01:06:08 +09:00
Hajime Hoshi
f92107c2ee
internal/graphicsdriver/directx: batch ExecuteCommandList
...
Updates #2188
2022-07-15 00:51:02 +09:00
Hajime Hoshi
82d31c5fb7
internal/graphicsdriver/directx: remove redundant resetting of allocators
...
Updates #2202
2022-07-15 00:13:28 +09:00
Hajime Hoshi
479483b76d
internal/graphicsdriver/directx: bug fix: need to reset command allocators
...
Closes #2202
2022-07-14 21:21:55 +09:00
Hajime Hoshi
b3267a7126
internal/graphicsdriver/directx: bug fix: wrong offsets
...
* Wrong offsets were speicified when creating a constant buffer view and
a shader resource view.
* Wrong root descriptor tables were speicified. For one draw command,
one descriptor table for a constant buffer and textures should be used.
Updates #2198
Closes #2201
2022-07-14 03:01:40 +09:00
Hajime Hoshi
42d5d91829
internal/graphicsdriver/directx: unmap constant buffers appropriately
...
Updates #2198
2022-07-14 01:54:34 +09:00
Hajime Hoshi
6f182d1124
internal/graphicsdriver/directx: fix a suspicious error chceck
2022-07-14 01:45:21 +09:00
Hajime Hoshi
16ff5c5039
internal/shaderir: change the naming convention: Num -> Count
2022-07-13 02:02:48 +09:00
Hajime Hoshi
afed6a83c6
internal/graphics: change the naming convention: Num -> Count
...
This change also renames ebiten.MaxIndicesNum -> ebiten.MaxIndicesCount.
2022-07-13 02:02:44 +09:00
Hajime Hoshi
b27b7ec483
internal/graphicsdriver/directx: use CreateEventEx to follow the official example
2022-07-10 22:44:40 +09:00
Hajime Hoshi
4c121ae5eb
internal/graphicsdriver/directx: bug fix: a wrong fence value was passed to SetEventOnCompletion
2022-07-10 22:24:39 +09:00
Hajime Hoshi
a22125a075
internal/graphicsdriver/directx: bug fix: ResizeBuffers failed without the flag
...
Closes #2193
2022-07-10 19:55:28 +09:00
Hajime Hoshi
bf0f3d304b
internal/graphicsdriver/directx: add optimization flag to D3DCompile
...
Updates #2034
Updates #2188
2022-07-10 02:55:16 +09:00
Hajime Hoshi
0035ba0bd1
internal/graphicsdriver/directx: allow tearing when vsync is off
...
Updates #2034
Updates #2188
2022-07-10 01:17:36 +09:00
Hajime Hoshi
a32a137fa8
internal/graphicsdriver/directx: skip unnecessary flushing commands
...
Updates #2034
Updates #2188
2022-07-10 00:24:14 +09:00
Hajime Hoshi
55c7a2df6c
internal/graphicsdriver/opengl/gl: bug fix: wrong build tags
2022-07-09 16:15:56 +09:00
Hajime Hoshi
28fd3ec9e5
add the ebitengine version build tags besides the ebiten version
...
Closes #2111
Updates #2190
2022-07-09 15:38:03 +09:00
Hajime Hoshi
428b1263d9
add ebitenginecbackend build tag besides ebitencbackend
...
Updates #2111
Updates #2190
2022-07-09 15:23:52 +09:00
Hajime Hoshi
204fb5935b
add new environment variables with the EBITENGINE_ suffix
...
Updates #2111
Updates #2190
2022-07-09 15:00:28 +09:00
Hajime Hoshi
3d5031571d
internal/graphicsdriver/directx: add the original source at D3DCompile errors
2022-07-09 01:59:51 +09:00
Hajime Hoshi
8522bfd0bf
internal/graphicscommand: bug fix: replacePixelsCommand should not read pixels
...
Reading pixels, writing pixels, and using the image as a source might
cause a flaky behavior with Metal. Stop reading pixels if possible.
Closes #2180
2022-07-05 23:30:26 +09:00
Hajime Hoshi
47c65a92ae
internal/graphicsdriver/directx: bug fix: ignore DXGI_STATUS_OCCLUDED
...
When a screen is locked, an Ebitengine application crashed as the
swap chain's Present returned DXGI_STATUS_OCCLUDED.
Let's ignore the error and continue to run the applications. In the
ideal world, an application should stop running during the screen lock,
so let's revisit this later.
This fix also fixes the issue that a Win32API GetCursorPos returned
an error ERROR_ACCESS_DENIED when the screen was locked.
Closes #2179
2022-07-04 12:55:36 +09:00
Hajime Hoshi
7d725f3e58
Revert "internal/graphicscommand: bug fix: using an image just after ReplacePixels might fail on Metal"
...
This reverts commit c31cc4ecff
.
Reason: This didn't fix the issue.
Updates #2154
2022-07-04 11:50:06 +09:00
Hajime Hoshi
c31cc4ecff
internal/graphicscommand: bug fix: using an image just after ReplacePixels might fail on Metal
...
Inserting a dummy rendering command after ReplacePixels and before
DrawTriangles solved the issue. This is a very dirty hack, but
there seems no other better way.
Closes #2154
2022-07-03 15:59:18 +09:00
Hajime Hoshi
afe1a93648
internal/graphicscommand, internal/graphicsdriver/metal: remove unused code
2022-07-03 15:23:52 +09:00
Hajime Hoshi
12533c2cce
Revert "internal/graphicsdriver/metal: bug fix: need to commit replace-pixels commands at DrawTriangles"
...
This reverts commit ac802cf0d0
.
Reason: This caused flickerings, and didn't solve #2154
Updates #2154
Closes #2174
2022-07-03 12:17:58 +09:00
Hajime Hoshi
712940cb02
internal/graphicsdriver/directx: bug fix: leave mapped regions for constant buffers
...
Mapping for a constant buffer every frame might sometimes fails. We
are not sure the reason, but in the official examples, leaving mapped
regoins seems the way to go.
Updates #2084
Closes #2157
2022-06-23 17:09:46 +09:00
Hajime Hoshi
c93cecdc2b
internal/graphicsdriver/directx: accept S_FALSE at ScheduleFrameEventX
2022-06-22 02:13:32 +09:00
Hajime Hoshi
7b05e59000
internal/graphicsdriver/directx: bug fix: wrong GUID for IDXGIDevice
2022-06-22 01:59:22 +09:00
Hajime Hoshi
8311ff1e46
internal/graphicsdriver/directx: bug fix: wrong pointer usage
2022-06-22 01:49:23 +09:00
Hajime Hoshi
7e92b79a00
internal/graphicsdriver/directx: implement swap chains for Xbox
...
Updates #2084
2022-06-21 12:21:00 +09:00
Hajime Hoshi
a641f9ede0
internal/graphicsdriver/directx: refactoring
2022-06-20 23:40:53 +09:00
Hajime Hoshi
969e87fb89
internal/graphicsdriver/directx: fix moveToNextFrame for Xbox
...
Updates #2084
2022-06-20 00:41:34 +09:00
Hajime Hoshi
f8e9dcf035
internal/graphicsdriver/directx: refactoring
2022-06-19 17:58:04 +09:00
Hajime Hoshi
08c8c8089a
internal/graphicsdriver/directx: bug fix: clear constant buffers at the end of DrawTriangles
...
Constant buffers should not be reset while a stencil buffer is used.
Closes #2138
2022-06-19 17:13:34 +09:00
Hajime Hoshi
ac802cf0d0
internal/graphicsdriver/metal: bug fix: need to commit replace-pixels commands at DrawTriangles
...
Closes #2154
2022-06-19 15:38:12 +09:00
Hajime Hoshi
667bf2ff9d
internal/graphicsdriver/directx: refactoring
2022-06-19 01:44:31 +09:00
Hajime Hoshi
2a5b64bf4d
internal/graphicsdriver/directx: suppress warnings for depth buffers
...
Updates #2138
2022-06-19 00:21:04 +09:00
Hajime Hoshi
81b3d7bfac
internal/graphicsdriver/directx: add an assertion
2022-06-18 22:33:07 +09:00
Hajime Hoshi
f7a108e693
internal/graphicsdriver/directx: refactoring
2022-06-18 21:53:41 +09:00
Hajime Hoshi
b71a4975dd
internal/graphicsdriver/directx: bug fix: wrong state transitions at screen images
...
This change fixes the following issues:
* There should be two resource states for presenting targets, so an image
for the screen must have two resource states, though it had only one
in the current implementation.
* At removeImage, the screen image was removed unexpectedly.
Updates #2081
Closes #2151
2022-06-18 19:01:59 +09:00
Hajime Hoshi
522660c1f9
internal/graphicsdriver/directx: fix fence usages
...
Updates #2034
Updates #2138
Updates #2149
2022-06-18 15:44:54 +09:00
Hajime Hoshi
e78d888b24
internal/graphicsdriver/directx: handle error at Signal
2022-06-18 02:53:12 +09:00
Hajime Hoshi
0c38d6faeb
internal/graphicsdriver/directx: add comment about frames
...
Updates #2034
2022-06-18 01:18:49 +09:00
Hajime Hoshi
a16ffef499
internal/graphicsdriver/directx: update frameIndex at present
...
This follows the official GDK samples.
2022-06-18 01:09:54 +09:00
Hajime Hoshi
07a558b38d
internal/graphicsdriver/metal: bug fix: the default driver must be initialized on the main thread
...
Closes #2147
2022-06-17 14:58:26 +09:00
Hajime Hoshi
b43312fe80
internal/graphicsdriver/directx: add comments
...
Updates #2142
2022-06-17 12:19:36 +09:00
Hajime Hoshi
2f84e77e74
internal/graphicsdriver/directx: fallback to OpenGL when initialization fails
...
Closes #2142
2022-06-17 12:12:44 +09:00
Hajime Hoshi
9962fc5ee5
internal/graphicsdriver/direct: replace Get -> NewGraphics
...
Updates #2142
2022-06-17 11:48:40 +09:00
Hajime Hoshi
138463e219
internal/ui: rename chooseGraphicsDriver -> newGraphicsDriver
2022-06-17 02:40:39 +09:00
Hajime Hoshi
7484df0c5e
internal/graphicsdriver/metal: replace Get with NewGraphics
...
This is a prepartion to return an error when a graphics driver, especially
DirectX, fails to initialize.
Updates #2142
2022-06-17 02:40:35 +09:00
Hajime Hoshi
a6d415ebf2
internal/graphicsdriver/opengl: replace Get with NewGraphics ( #2146 )
...
This is a prepartion to return an error when a graphics driver, especially
DirectX, fails to initialize.
Updates #2142
2022-06-17 02:02:29 +09:00
Hajime Hoshi
195b060911
internal/graphicsdriver/metal: refactoring: initialize the driver at Get
2022-06-16 23:52:55 +09:00
Hajime Hoshi
76d88b276a
internal/graphicsdriver/directx: call C++ side for ID3D12GraphicsCommandList functions
...
Updates #2084
2022-06-13 22:35:58 +09:00
Hajime Hoshi
4aebcd2a04
internal/graphicsdriver/directx: bug fix: consider empty slices as arguments
2022-06-13 17:51:02 +09:00
Hajime Hoshi
c08d79d2ce
internal/graphicsdriver/directx: keep runtime.KeepAlive for Xbox
2022-06-13 17:36:58 +09:00
Hajime Hoshi
4adf46c2b0
internal/graphicsdriver/directx: refactoring
2022-06-13 17:25:27 +09:00
Hajime Hoshi
348435f769
internal/graphicsdriver/directx: fix a constant value for Xbox
...
Updates #2084
2022-06-13 14:23:29 +09:00
Hajime Hoshi
aef5402831
internal/graphicsdriver/directx: remove unused function
2022-06-13 01:35:31 +09:00
Hajime Hoshi
bcb2fe8c93
internal/graphicsdriver/directx: enable D3D12SerializeRootSignature for Xbox
...
Updates #2084
2022-06-13 01:02:48 +09:00
Hajime Hoshi
08b52698c6
internal/graphicsdriver/directx: call C++ side for some functions for Xbox
...
Updates #2084
2022-06-11 19:37:17 +09:00
Hajime Hoshi
4a19d645b7
internal/graphicsdriver/opengl: remove a comment
2022-06-11 15:36:10 +09:00
Hajime Hoshi
71a32d2036
internal/ui: pass the canvas element directly instead of an ID
2022-06-11 15:34:17 +09:00
Hajime Hoshi
95628ee5f7
internal/ui: add a unique ID to the canvas for browsers
2022-06-11 15:24:50 +09:00
Hajime Hoshi
d42bb7d699
internal/graphicsdriver/directx: add a comment for Xbox
...
Updates #2084
2022-06-11 14:20:21 +09:00
Hajime Hoshi
826afcb9cc
internal/graphicsdriver/directx: fix CopyTextureRegion for Xbox
...
Updates #2084
2022-06-10 22:51:04 +09:00
Hajime Hoshi
abef203a70
rename github.com/ebitne/purego -> github.com/ebitengine/purego
2022-06-10 21:59:01 +09:00
Hajime Hoshi
07aa906753
internal/graphicsdriver/directx: fix GetCPU/GPUDescriptorHandleForHeapStart for Xbox
...
Updates #2084
2022-06-10 21:35:20 +09:00
Hajime Hoshi
b9373c498b
internal/graphicsdriver/directx: fix CreateCommandList for Xbox
...
Updates #2084
2022-06-10 16:44:07 +09:00
Hajime Hoshi
6ce8f77c53
gofmt
2022-06-06 00:28:19 +09:00
Hajime Hoshi
0256b0cfbf
internal/graphicsdriver/directx: bug fix: disable fullscreen by Alt+Enter
...
By default, DirectX 12 tries to make the window fullscreen by Alt+Enter.
This caused application crashes. Let's disable this feature.
Closes #2123
2022-06-05 16:16:09 +09:00
Hajime Hoshi
d518e64e22
Revert "internal/graphicsdriver/directx: refactoring: add syscallN"
...
This reverts commit 55a490736a
.
Reason: This has a potential risk of stack overflow.
Closes #2120
2022-06-04 13:58:01 +09:00
Hajime Hoshi
f69c550992
internal/graphicsdriver/directx: bug fix: go:nosplit was required for syscallN
...
Updates #2116
Closes #2117
2022-06-04 01:11:22 +09:00
Hajime Hoshi
55a490736a
internal/graphicsdriver/directx: refactoring: add syscallN
...
syscall.SyscallN is available as of Go 1.18 so this change implemented
our original syscallN function.
syscallN also panics when a given function pointer is 0. This helps
debugging especially on Xbox.
Updates #2084
2022-06-03 21:56:34 +09:00
Hajime Hoshi
3e1b313221
internal/graphicsdriver/directx: bug fix: ID3D12Resource::Map sometimes retrying
...
Updates #2113
Closes #2116
2022-06-03 21:56:30 +09:00
Hajime Hoshi
532b476c4e
Revert "internal/graphicsdriver/directx: pass nil for pReadRange at Map"
...
This reverts commit 3b13158cc0
.
Reason: Specifying nil for reading ranges is not efficient
2022-06-03 13:59:34 +09:00
Hajime Hoshi
3b13158cc0
internal/graphicsdriver/directx: pass nil for pReadRange at Map
...
Updates #2113
2022-06-03 13:45:08 +09:00
Hajime Hoshi
c29c423686
internal/glfwwin, internal/graphicsdriver/directx: bug fix: HRESULT and Errno are imcompatible
2022-06-03 00:41:04 +09:00
Hajime Hoshi
4a9caf8afb
internal/graphicsdriver/directx: ignore higher 32bit values for Errno
...
Updates #2113
2022-06-02 23:01:38 +09:00
Hajime Hoshi
fb03a1e351
internal/graphicsdriver/directx: bug fix: ID3D12Resource::Unmap does not return an value
...
Updates #2113
2022-06-02 12:52:58 +09:00
Hajime Hoshi
4a684c4195
treat Windows error values as uint32 instead of windows.Handle
...
The error value are defined as windows.Handle (64bit) in
golang.org/x/sys/windows, but an actual type should be HRESULT (32bit).
This causes an issue that a returning value from a Windows API was
recognized as a non-zero error value though the value was not an error,
when the value's lower 32-bits are all zero.
See also https://github.com/golang/go/issues/48736#issuecomment-1143993096
Updates #2113
2022-06-02 12:10:21 +09:00
Hajime Hoshi
b900f83a01
internal/graphicsdriver/directx: refactoring: remove an unused member Image.numRows
2022-06-02 01:53:27 +09:00
Hajime Hoshi
0dc6e4e64e
internal/graphicsdriver/directx: use ID3D12Resource instead of ID3D12Resource1
...
Updates #2114
2022-06-02 01:26:02 +09:00
Hajime Hoshi
c99b948df3
internal/graphicsdriver/directx: refactoring
...
Updates #2084
2022-05-30 03:17:15 +09:00
Hajime Hoshi
d4226659ee
internal/graphicsdriver/directx: initialize a device for Xbox
...
Updates #1162
2022-05-30 02:10:18 +09:00
Hajime Hoshi
59798d29f4
internal/graphicsdriver/directx: defer the initialization
2022-05-29 22:02:39 +09:00
Hajime Hoshi
b4491ab94d
internal/graphicsdriver/directx: unify the naming convention with glfwwin
2022-05-29 21:18:23 +09:00
Hajime Hoshi
0081fa7a47
internal/graphicsdriver/directx: add a comment
2022-05-29 20:05:37 +09:00
Hajime Hoshi
ad380a32f4
internal/glfwwin: split GDK part to a new package internal/microsoftgdk
...
Updates #1162
2022-05-29 19:25:26 +09:00
Hajime Hoshi
5c63c4a4aa
internal/graphicsdriver/metal: support macOS 10.12 by removing packed types
...
From the Metal shading language specification [1] Table 2.2.3, attribute
variables in Ebitengine's vertices don't have to be packed. Then, we can
remove `packed` types.
[1] https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf
Closes #2107
2022-05-28 23:57:59 +09:00