Commit Graph

3476 Commits

Author SHA1 Message Date
Alex Szpakowski f4a694c266 Merge branch 'master' into 12.0-development 2021-09-05 13:03:46 -03:00
Alex Szpakowski 16ebaea390 Fix DXT1 textures which use 1 bit alpha-cutout.
Note that premultiplied alpha blending must be used with DXT1 alpha cutout textures if linear filtering is used, otherwise transparent black pixels will be blended with opaque non-black pixels resulting in dark fringes.
2021-09-05 12:55:32 -03:00
Jack Robinson bfca659e37 Fix #1721: floor result of scaling kerning based on dpi 2021-08-31 21:22:06 +12:00
Alex Szpakowski 7038c66ab2 Hook up missing reflection data for writable textures in compute 2021-08-23 16:53:55 -03:00
Miku AuahDark 216d5ca4b2 Fix love.displayrotated passes boolean instead of string
Fixes #1722
2021-08-21 14:31:44 +08:00
Alex Szpakowski 63e3bd1823 use 'thread' and 'threadgroup' terminology in compute shader code.
Also fix compute shaders including some rendering-specific code.
2021-08-14 20:42:46 -03:00
Alex Szpakowski 601d4e120d don't need memory barriers for readonly storage textures. 2021-08-13 18:13:45 -03:00
Alex Szpakowski a551fcd492 Initial support for writing to textures in compute shaders. 2021-08-13 14:43:03 -03:00
Alex Szpakowski cffd485976 Allow rendering to integer textures. 2021-08-12 17:43:33 -03:00
Alex Szpakowski 48b3a4e860 Initial support for integer format textures.
They can't be rendered to and ImageData can't use the formats, for now.
2021-08-12 16:38:54 -03:00
Alex Szpakowski 4caeb27047 Slightly less heavy-handed compute memory barrier implementation.
Also validate whether there are any unbound writable resources when dispatching compute shader work.
2021-08-11 18:41:38 -03:00
Alex Szpakowski 1cf8f1192c vertex format table in newMesh uses the same fields as newBuffer.
Deprecate (but don't remove) the old {name, type, elementcount} vertex format style. The new style is {name=attributename, format=dataformat}.
2021-08-02 16:11:58 -03:00
Alex Szpakowski 92d0d1d60f love.graphics.validateShader no longer errors if the system doesn't support the shader 2021-07-18 14:09:28 -03:00
Alex Szpakowski 00494ec3b5 Error if image load/store is used since it's not supported yet. 2021-07-18 13:38:10 -03:00
Alex Szpakowski b644d00bf7 Add a more specific error message when compute shaders aren't supported
It already correctly errored, but the message was generic enough (GLSL 4 support) that it might be confusing.
2021-07-18 13:18:43 -03:00
Alex Szpakowski 80f051b97d Merge pull request #1715 from bjornbytes/compute-shaders
Compute Shaders
2021-07-18 13:09:48 -03:00
bjorn dc5f68e709 World's worst sync; 2021-07-17 20:02:04 -07:00
bjorn 9ae529b325 Flush batched draws before dispatching compute; 2021-07-17 19:58:14 -07:00
bjorn 13a10ac482 love.graphics.newComputeShader; 2021-07-17 19:58:11 -07:00
bjorn b28e61d00d Shader:getLocalThreadgroupSize; 2021-07-17 19:54:54 -07:00
bjorn 25fbf1d8ce love.graphics.dispatchThreadgroups; 2021-07-17 19:49:53 -07:00
bjorn 085ba2cb6e Add compute ShaderStage; 2021-07-17 19:46:05 -07:00
bjorn a1c79c45d8 Shader:hasStage; 2021-07-17 19:38:46 -07:00
bjorn f6559ce49e Add threadgroups{x,y,z} SystemLimits; 2021-07-17 19:38:45 -07:00
Alex Szpakowski d6dfa7412c Merge pull request #1713 from bjornbytes/fix-default-shader-storage-buffer
Fix default shader storage buffer initialization;
2021-07-01 21:52:41 -03:00
bjorn bbb4cd66be Fix default shader storage buffer initialization; 2021-07-01 17:22:03 -07:00
Alex Szpakowski 5ef1709c02 Expose love.markDeprecated.
Arguments are (level, name, apitype, deprecationtype [, replacementname]). Call it inside a function.
2021-06-06 18:16:56 -03:00
Alex Szpakowski 199632e791 Add love.parsedGameArguments and love.rawGameArguments tables.
They're the same as the global arg table and the result of love.arg.parseGameArguments, respectively. They only exist on the main thread.
2021-06-06 18:04:58 -03:00
Alex Szpakowski 3d32f1c7d0 iOS: Fix compile errors 2021-06-06 12:19:54 -03:00
Alex Szpakowski 433190d1df Merge branch 'master' into 12.0-development 2021-06-06 11:43:54 -03:00
Alex Szpakowski d899fe96b6 update dr_flac 2021-05-30 21:27:34 -03:00
Alex Szpakowski d419795a28 Expand stb_image thread-local workaround to apply to iOS devices 2021-05-30 21:12:45 -03:00
Alex Szpakowski 042b0ffe31 Fix previous workaround commit... 2021-05-30 16:06:11 -03:00
Alex Szpakowski 13523f5a5a Update stb_image 2021-05-30 16:04:54 -03:00
Alex Szpakowski f20c637dd6 iOS: Fix simulator build 2021-05-30 16:04:37 -03:00
Alex Szpakowski aa8ed7c8c5 Revert change that added codepoint variant of Font:getWidth.
It could break code that relied on Lua's implicit conversion from numbers to strings.
2021-05-30 15:46:21 -03:00
Alex Szpakowski 17c26dc902 Fix compile error on older C++ compilers 2021-04-20 19:18:59 -03:00
Alex Szpakowski 3d3c665f3c Fix Mesh:setVertexMap.
Fixes #1686
2021-04-20 19:09:20 -03:00
Alex Szpakowski e9c58c8192 Work around certain buggy Vivante GPU drivers on Android
love2d/love-android#204
2021-04-17 15:09:21 -03:00
Alex Szpakowski 977c690fa9 Fix physics meter value persisting after love.event.quit("restart").
Fixes #1685
2021-04-11 19:53:16 -03:00
Alex Szpakowski 14cda7818f Rename internal enum 2021-04-07 20:43:22 -03:00
Alex Szpakowski 9b4aea8f17 Missed some copyright date updates 2021-04-07 20:34:24 -03:00
Alex Szpakowski 21f5ba86d3 Merge branch 'master' into 12.0-development 2021-04-07 20:33:44 -03:00
Alex Szpakowski b1692a4000 metal: implement internal Shader::setVideoTextures method 2021-04-07 20:12:15 -03:00
Alex Szpakowski 7b6978f052 Add Font:getKerning.
Also add a variant of Font:getWidth which accepts a codepoint number.
Fixes #1403
2021-04-05 11:22:54 -03:00
Alex Szpakowski c59c85e04c Fix Text:getWidth when the Text only contains spaces
Fixes #1555
2021-04-05 10:32:01 -03:00
Alex Szpakowski 0bc574ef4e metal: fix Shader:send not flushing the active auto-batch. 2021-04-04 23:49:23 -03:00
Alex Szpakowski 6296e44425 metal: fix clampzero wrap mode. 2021-04-04 23:48:23 -03: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 f89aabb0bb Update copyright year for 2021 2021-04-04 16:14:45 -03:00