Commit Graph

2195 Commits

Author SHA1 Message Date
Sasha Szpakowski 111bbde32d vulkan: fix shaders with int vertex attributes when nothing using that attribute is drawn. 2024-04-11 22:35:43 -03:00
Sasha Szpakowski ad0526d97d Fix videos not setting their textures in the first frame, on some backends. 2024-04-09 21:18:11 -03:00
Sasha Szpakowski b01ff0e8ee opengl: fix GL errors when MSAA is enabled for the window. 2024-04-09 17:33:11 -03:00
Sasha Szpakowski bb9fb54ef4 Merge pull request #2053 from nikeinikei/main
vulkan: fix incorrect scissor when rendering to a canvas
2024-04-09 13:53:19 -03:00
niki 15c14c69b4 vulkan: correct scissor extent calculation 2024-04-09 18:04:54 +02:00
niki 869cb23314 vulkan: fix incorrect scissor when rendering to a canvas 2024-04-09 17:31:04 +02:00
Sasha Szpakowski 7f37a7ddbe metal: fix texture uploads in the middle of a render pass stopping the pass' subsequent draws from working. 2024-04-08 22:10:11 -03:00
Sasha Szpakowski 6bc91a025c metal: fix backbuffer discarding its contents in some situations.
fixes #1975.
2024-04-08 20:11:47 -03:00
Sasha Szpakowski d40b78be76 vulkan: fix shader cross-stage io (varying) location mapping. 2024-04-08 17:59:06 -03:00
Sasha Szpakowski 994079e76d Mesh:getVertexFormat uses named fields, to match the new format syntax in newMesh. 2024-04-08 12:20:07 -03:00
Sasha Szpakowski 8140817107 vulkan: fix a crash on minimization.
Use a fake backbuffer when the system reports 0 for swap chain dimensions.
2024-04-07 17:25:46 -03:00
Sasha Szpakowski 2bc9777c3b vulkan: limit render pass layout transitions to the active mipmap/layer. 2024-04-07 09:48:54 -03:00
Sasha Szpakowski 1692573be6 vulkan: fix image layout mismatches when generating mipmaps and when copying from a buffer. 2024-04-07 09:13:21 -03:00
Sasha Szpakowski 92a03719e2 vulkan: fix validation errors when a resource is declared in multiple stages. 2024-04-06 21:38:12 -03:00
Sasha Szpakowski aded2621a3 vulkan: use uniform shader stage masks when setting up descriptor set layouts. 2024-04-06 20:24:10 -03:00
Sasha Szpakowski 455d02c695 vulkan/metal: fix a typo preventing non-array struct field uniforms from working. 2024-04-06 09:46:40 -03:00
Sasha Szpakowski e08004d338 vulkan: fix uniform vec3 array alignment 2024-04-01 23:06:19 -03:00
Mark Jansen a689d8e450 Fix building love on Windows for SDL3-3.1.0 2024-04-01 19:26:52 +02:00
Sasha Szpakowski b48d81d976 rename love.graphics.setCustomProjection to setProjection. 2024-03-31 21:12:01 -03:00
Sasha Szpakowski 44a6a81641 vulkan: improve depth/stencil texture support. 2024-03-31 17:56:36 -03:00
Sasha Szpakowski 6ac3c5f990 vulkan: fix one validation error when sending a depth-stencil texture to a shader. 2024-03-31 16:48:12 -03:00
Sasha Szpakowski f32b6bde57 vulkan: fix validation error when clearing mid-pass. 2024-03-31 13:28:46 -03:00
Sasha Szpakowski a0ca3c148e vulkan: improve handling of vertex attribute bindings. 2024-03-31 12:55:40 -03:00
Sasha Szpakowski c764626a6a vulkan: fix shader:send with fields in an array-of-structs. 2024-03-30 12:20:52 -03:00
Sasha Szpakowski b5b6d07108 metal: fix shader:send with fields in an array-of-structs. 2024-03-30 12:03:20 -03:00
Sasha Szpakowski 4387935f16 Allow drawing a Mesh that has no VertexPosition attribute, if it has custom attributes. 2024-03-29 21:01:04 -03:00
Sasha Szpakowski 302da1b3af vulkan: potentially fix validation errors when creating a cubemap canvas. 2024-03-28 19:06:42 -03:00
Sasha Szpakowski b33afc4371 vulkan: love.graphics.clear fixes.
- Fix love.graphics.clear(color) when multiple canvases are active.
- Fix love.graphics.clear when an integer-format canvas is active.
2024-03-28 19:00:29 -03:00
Sasha Szpakowski d82922f774 vulkan: let the system handle device rotation for us.
We'd need to inject a whole bunch of code into user shaders (for example to rotate derivates) if we wanted to reliably handle it ourselves, which isn't viable.
2024-03-27 20:00:05 -03:00
Sasha Szpakowski 2bdadf51d4 Merge branch 'main' into SDL3 2024-03-24 18:53:08 -03:00
Sasha Szpakowski 21b71d02b5 Add love.graphics.setCustomProjection.
The active projection matrix is reset when changing canvases, and when the window is resized if no canvas is active at the time.
2024-03-24 10:46:29 -03:00
Sasha Szpakowski 7bfbd647ba Make shader clip space consistent across APIs and projection matrices.
- All shaders are expected to output clip space values that are effectively y-up, with [-1, 1] z, in NDC.
- The transform to a backend's expected clip space values from the above range now happens after user vertex shader code is run, instead of inside a projection matrix.
- Projection matrices no longer need to be flipped when rendering to a canvas versus the main screen.

This means custom projection matrices might need to be altered to account for the more consistent range.
2024-03-23 22:00:02 -03:00
Sasha Szpakowski 698d305212 Remove love.graphics.setOrthoProjection and setPerspectiveProjection 2024-03-23 17:58:34 -03:00
Sasha Szpakowski 565eab4ae1 samplers use mediump instead of lowp by default in GLSL ES. 2024-03-23 09:50:48 -03:00
Sasha Szpakowski 1e657ea0bf metal: fix love_ScreenSize shader variable when rendering to a non-default mipmap level of a Canvas. 2024-03-22 23:15:09 -03:00
Sasha Szpakowski 9aaeabd6a5 vulkan: fix love_ScreenSize shader variable when a canvas is active. 2024-03-22 23:08:34 -03:00
Sasha Szpakowski 17cb64c45f vulkan: fix validation errors in love.graphics.getTextureFormats. 2024-03-21 21:43:45 -03:00
Sasha Szpakowski bbaa55f8b8 vulkan: fix validation errors in layout transitions for depth-only and stencil-only images. 2024-03-21 21:32:03 -03:00
Sasha Szpakowski 95796caa06 improve performance of love.graphics.draw's Lua binding code. 2024-03-20 18:36:59 -03:00
Sasha Szpakowski 4d1865fe1a opengl: attempt to fix the Android workaround for r8 pixel format support. 2024-03-17 13:54:40 -03:00
Sasha Szpakowski 60911c5181 vulkan: remove some newly dead code 2024-03-17 00:01:10 -03:00
Sasha Szpakowski 48aefd91fa vulkan: captureScreenshot improvements.
- Don't create several persistent screen-sized images and buffers for screenshots, only create one temporary buffer during a frame that requests a screenshot.
- Attempt to handle more out-of-memory situations.
- Make sure the final screenshot is opaque.
- Swap R and B channels in the screenshot ImageData when the backbuffer is BGRA.
2024-03-16 23:51:40 -03:00
Sasha Szpakowski f3887361e5 Merge pull request #2037 from nikeinikei/main
vk: unify local uniform buffer
2024-03-13 18:33:56 -03:00
niki 07c5c44ea3 vulkan: simplify code with alignUp 2024-03-13 22:16:33 +01:00
Sasha Szpakowski f8859358c3 allow graphics debug output when OpenGL ES 3.2 is used. 2024-03-12 18:28:26 -03:00
Sasha Szpakowski 930053d81d opengl: ignore debug notifications when debug output is enabled. 2024-03-12 18:27:49 -03:00
Sasha Szpakowski 63aba28d18 metal: fix shader compilation when using void effect() with MRTs. 2024-03-11 19:14:25 -03:00
niki 295fb214d5 vulkan: remove unused constant and use correct sizes for mapping
the local uniform stream buffer
2024-03-11 13:47:43 +01:00
Sasha Szpakowski c91101d2e4 Fix texel buffer detection in shaders. 2024-03-10 21:24:10 -03:00
Sasha Szpakowski ec9fb6eb28 Improve Windows vulkan draw performance by reducing the size of a struct. 2024-03-10 14:33:29 -03:00