Sasha Szpakowski
f6cdbdc868
Merge branch 'main' into 12.0-development
2022-12-31 22:46:34 -04:00
slime
99ad576668
metal: implement storage texture support for shaders.
...
Fixes #1783
2022-10-10 13:47:17 -03:00
Alex Szpakowski
3a5c3df02f
Add sync and async texture and buffer readback APIs.
...
- Add imagedata = love.graphics.readbackTexture(texture, [slice, mipmap, x, y, w, h, [dest, destx, desty]]).
- Add readback = love.graphics.readbackTextureAsync(texture, [slice, mipmap, x, y, w, h, [dest, destx, desty]]).
- Add bytedata = love.graphics.readbackBuffer(buffer, [offset, size, [dest, destoffset]]).
- Add readback = ove.graphics.readbackBufferAsync(buffer, [offset, size, [dest, destoffset]]).
- Deprecate Texture:newImageData.
The async variants return a new GraphicsReadback object. It has the following methods:
- isComplete()
- hasError()
- wait()
- getBufferData()
- getImageData()
- update() (called automatically every frame by love, not normally needed).
Support notes:
- readbackBuffer and readbackBufferAsync require buffer copying support.
- readbackTexture with a render target (canvas) is always supported. readbackTexture with a non-render-target requires copy-texture-to-buffer support.
- readbackTextureAsync with a render target requires copy-render-target-to-buffer support. readbackTextureAsync with a non-render-target requires copy-texture-to-buffer support.
2022-05-30 21:53:55 -03:00
Alex Szpakowski
28a64c2b29
Use uint32 instead of int for some internal bit-flags.
2022-04-23 09:41:29 -03:00
Miku AuahDark
405e33a689
Use int instead of PixelFormatUsageFlags for isPixelFormatSupported.
2022-03-05 13:42:20 +08:00
Alex Szpakowski
6dbb7fa5de
Add love.graphics.setStencilMode. Remove old stencil API.
...
- Add setStencilMode(drawaction, comparemode, value = 0, readmask = 0xFF, writemask = 0xFF).
- Add getStencilMode.
- Remove love.graphics.stencil.
- Remove love.graphics.set/getStencilTest.
Note that the new setStencilMode API does not clear the stencil buffer, and does not turn off color writes (it can still be done manually), unlike love.graphics.stencil.
Fixes #1161 .
Fixes #1251 .
2022-01-22 23:36:07 -04:00
Alex Szpakowski
4c3c875aa9
metal: clean up some code around render pipeline states.
2022-01-22 21:29:57 -04:00
Alex Szpakowski
87592513a2
metal: fix automatic depth/stencil with setCanvas.
2022-01-22 20:57:06 -04:00
Alex Szpakowski
4e1c4a6afe
metal: some fixes for MSAA
2022-01-16 13:44:29 -04:00
Alex Szpakowski
5c3f391136
update metal backend for projection changes.
2022-01-12 18:31:32 -04:00
Alex Szpakowski
cf57c3eedf
update copyright year for metal files
2022-01-05 21:13:53 -04:00
Alex Szpakowski
c6e4cfdc64
metal: initial love.graphics.dispatchThreadgroups implementation
2021-12-24 23:04:44 -04:00
Alex Szpakowski
a431e70179
metal: add internal compute encoder APIs
2021-12-24 18:56:21 -04:00
Alex Szpakowski
bcd64fe537
metal: implement mesh cull modes
2021-12-24 18:46:06 -04:00
Alex Szpakowski
7a910484c3
Fix compilation
2021-12-24 16:45:23 -04:00
Alex Szpakowski
2ec9f88f7a
metal: more robust render pass handling.
...
Initial implementation of captureScreenshot.
Fix getStats().shaderswitches.
Fix getStats().drawcalls.
2021-04-04 23:47:58 -03:00
Alex Szpakowski
8c88d645a3
metal: avoid redundant resource binding calls.
2021-04-03 13:49:29 -03:00
Alex Szpakowski
a4d0761e84
metal: work on depth/stencil textures, MSAA
2021-04-02 22:10:01 -03:00
Alex Szpakowski
1b9b32c7a7
metal: clean up some shader code
2021-03-31 20:38:37 -03:00
Alex Szpakowski
52d4a5c679
metal: initial shader texture binding implementation.
...
rework metal shader compilation/parsing.
2021-03-31 18:35:57 -03:00
Alex Szpakowski
aad0810e11
metal: initial (bad/slow) setShader tracking
2021-03-29 18:28:06 -03:00
Alex Szpakowski
5f888be64a
metal: initial pixel format support implementation
2021-03-27 17:37:09 -03:00
Alex Szpakowski
2d2918a254
Merge branch '12.0-development' into metal
2021-03-26 21:42:08 -03:00
Alex Szpakowski
20a92a4106
Merge branch '12.0-development' into metal
2020-12-22 22:37:17 -04:00
Alex Szpakowski
4b9c648c8b
metal: work towards shader uniform implementation.
...
Misc cleanup.
2020-10-24 00:33:02 -03:00
Alex Szpakowski
3ae4a0f76b
metal: post merge compilation fixes
2020-07-29 18:51:21 -03:00
Alex Szpakowski
9aa9319eb5
metal: implement depth/stencil state
2020-06-14 21:14:56 -03:00
Alex Szpakowski
9d2dca5740
metal: nogame and error screens work.
...
- implement love.graphics.setColor
- implement default textures
- hacky implementation of default uniform data
- use texture swizzles to set up LA8 (text) texture data
- shader reflection work
2020-06-13 20:29:23 -03:00
Alex Szpakowski
de041ded0e
metal: initial vertex attribute support for pipelines
...
Also hook up samplers
2020-05-03 17:14:54 -03:00
Alex Szpakowski
9765485222
metal: partial implementation of pipeline states.
...
Add BGRA8 pixel format.
2020-05-03 12:48:43 -03:00
Alex Szpakowski
ceb1e4459b
metal: initial sampler cache implementation
2020-04-26 09:09:26 -03:00
Alex Szpakowski
99b39065b6
metal: hook up the backbuffer
2020-04-23 18:38:29 -03:00
Alex Szpakowski
e001e4336d
metal: initial work on setRenderTarget
2020-02-16 09:04:50 -04:00
Alex Szpakowski
64b38459cf
Update metal backend for Image+Canvas->Texture changes
2020-02-15 15:44:23 -04:00
Alex Szpakowski
d687b4c099
metal: initial work on windowing and instance creation
2020-01-30 20:35:33 -04:00
Alex Szpakowski
74cf9b8236
The bones of what will become a Metal backend.
...
This isn't anywhere close to usable (not even a blank screen will work), let alone complete. It's about 20% done.
2020-01-26 15:46:33 -04:00