gtk/gsk/gpu
Benjamin Otte 896ea5b753 memoryformat: Add linear/nearest choice for mipmaping
linear will average all the pixels for the lod, nearest will just pick
one (using the same method as OpenGL/Vulkan, picking bottom right
center).

This doesn't really make linear/nearest filtering work as it should
(because it's still a form of mipmaps), but it has 2 advantages:

1. it gets closer to the desired effect

2. it is a lot faster

Because only 1 pixel is chosen from the original image, instead of
averaging all pixels, a lot less memory needs to be accessed, and
because memory access is the bottleneck for large images, the speedup is
almost linear with the number of pixels not accessed.
And that means that even for lot level 3, aka 1/8th scale, only 1/64 of
the pixels need to be accessed, and everything is 50x faster.

Switching gtk4-demo --run=image_scaling to linear/nearest makes all the
lag go away for me, even with a 64k x 64k image.
2024-09-06 15:47:35 -04:00
..
shaders gpu: Simplify the blur op a bit 2024-08-23 19:01:05 +02:00
gskglbuffer.c gl: Add buffer implementation using persistent mapping 2024-03-16 20:55:26 +01:00
gskglbufferprivate.h gl: Add buffer implementation using persistent mapping 2024-03-16 20:55:26 +01:00
gskgldevice.c gpu: Add shader name to error message 2024-07-25 18:53:55 +02:00
gskgldeviceprivate.h gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskglframe.c gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskglframeprivate.h gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskglimage.c gpu: Fix fd leak in GL dmabuf export 2024-08-26 20:31:08 +02:00
gskglimageprivate.h gpu: Fix fd leak in GL dmabuf export 2024-08-26 20:31:08 +02:00
gskgpublendmodeop.c gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpublendmodeopprivate.h gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpublendop.c gpu: Add GSK_GPU_BLEND_NONE 2024-07-13 10:56:47 +02:00
gskgpublendopprivate.h gpu: Make blend modes configurable 2024-01-07 07:22:52 +01:00
gskgpublitop.c gsk: Remove unnecessary G_GNUC_FALLTHROUGH 2024-02-13 18:29:03 +01:00
gskgpublitopprivate.h gpu: Add outline of new GPU renderer 2024-01-07 07:22:49 +01:00
gskgpublurop.c gpu: Simplify the blur op a bit 2024-08-23 19:01:05 +02:00
gskgpubluropprivate.h gsk: Change the blur op api 2024-08-09 20:09:31 -04:00
gskgpuborderop.c gsk: Change the border op api 2024-08-06 07:35:00 -04:00
gskgpuborderopprivate.h gsk: Change the border op api 2024-08-06 07:35:00 -04:00
gskgpuboxshadowop.c Change box shadow op api 2024-08-08 15:43:49 -04:00
gskgpuboxshadowopprivate.h Change box shadow op api 2024-08-08 15:43:49 -04:00
gskgpubuffer.c gsk: Cosmetics 2024-04-28 23:54:55 -04:00
gskgpubufferprivate.h gsk/gpu: avoid unnecessary buffer uploads 2024-03-08 13:55:57 -08:00
gskgpucache.c memoryformat: Add linear/nearest choice for mipmaping 2024-09-06 15:47:35 -04:00
gskgpucacheprivate.h memoryformat: Add linear/nearest choice for mipmaping 2024-09-06 15:47:35 -04:00
gskgpuclearop.c gsk: Change the clear op api 2024-08-05 11:11:14 -04:00
gskgpuclearopprivate.h gsk: Change the clear op api 2024-08-05 11:11:14 -04:00
gskgpuclip.c gpu: Implement transform support for dihedral transforms 2024-07-10 21:34:12 +02:00
gskgpuclipprivate.h gpu: Implement transform support for dihedral transforms 2024-07-10 21:34:12 +02:00
gskgpucolorizeop.c gsk: Change the colorize op api 2024-08-09 20:09:30 -04:00
gskgpucolorizeopprivate.h gsk: Change the colorize op api 2024-08-09 20:09:30 -04:00
gskgpucolormatrixop.c gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpucolormatrixopprivate.h gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpucolorop.c gsk: Change color op apis 2024-08-05 11:11:14 -04:00
gskgpucoloropprivate.h gsk: Change color op apis 2024-08-05 11:11:14 -04:00
gskgpucolorstatesprivate.h gpu: Add an assertion 2024-08-14 08:30:55 +02:00
gskgpuconicgradientop.c gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpuconicgradientopprivate.h gpu: Make conic gradient op obey ccs 2024-07-11 14:57:20 +02:00
gskgpuconvertcicpop.c gpu: More debug spew 2024-07-26 07:22:45 -04:00
gskgpuconvertcicpopprivate.h gsk: Add a cicp convert shader 2024-07-24 08:16:08 -06:00
gskgpuconvertop.c gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpuconvertopprivate.h gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpucrossfadeop.c gpu: The colorstate op doesn't need a colorstates arg 2024-08-20 01:05:20 +02:00
gskgpucrossfadeopprivate.h gpu: The colorstate op doesn't need a colorstates arg 2024-08-20 01:05:20 +02:00
gskgpudevice.c gpu: Be more aggressive about GC'ing dead textures 2024-08-21 09:45:05 +02:00
gskgpudeviceprivate.h gpu: Clean up headers 2024-07-22 01:28:40 +02:00
gskgpudownloadop.c gpu: Use builder for memory texture 2024-09-01 22:49:34 +02:00
gskgpudownloadopprivate.h gsk: Drop some unused code 2024-08-07 08:39:53 -04:00
gskgpuframe.c memoryformat: Add linear/nearest choice for mipmaping 2024-09-06 15:47:35 -04:00
gskgpuframeprivate.h gdk: Pass the opaque rect to begin_frame() actually 2024-08-10 01:40:46 +02:00
gskgpuglobalsop.c gpu: Completely revamp descriptor set handling 2024-07-22 19:40:24 +02:00
gskgpuglobalsopprivate.h gpu: Add ability to run shaders 2024-01-07 07:22:49 +01:00
gskgpuimage.c ngl: Mark backbuffers as srgb 2024-07-11 14:57:20 +02:00
gskgpuimageprivate.h gpu: Add dmabuf import for Vulkan 2024-01-07 07:22:51 +01:00
gskgpulineargradientop.c gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpulineargradientopprivate.h gpu: Make linear gradient op obey ccs 2024-07-11 14:57:20 +02:00
gskgpumaskop.c gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpumaskopprivate.h gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpumipmapop.c gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpumipmapopprivate.h gpu: Add support for texture-scale nodes 2024-01-07 07:22:51 +01:00
gskgpunodeprocessor.c memoryformat: Add linear/nearest choice for mipmaping 2024-09-06 15:47:35 -04:00
gskgpunodeprocessorprivate.h gpu: Pass the clip region even further down 2024-08-07 23:26:03 +02:00
gskgpuop.c gpu: Add a CommandState struct to the command vfuncs 2024-01-07 07:22:51 +01:00
gskgpuopprivate.h gpu: Add the same cache as the GL shader uses 2024-07-22 19:40:24 +02:00
gskgpuprint.c gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpuprintprivate.h gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpuradialgradientop.c gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgpuradialgradientopprivate.h gpu: Make radial gradient op obey ccs 2024-07-11 14:57:20 +02:00
gskgpurenderer.c gdk: Beef up gdk_parse_debug_var 2024-08-19 20:40:32 -04:00
gskgpurenderer.h gpu: Add outline of new GPU renderer 2024-01-07 07:22:49 +01:00
gskgpurendererprivate.h gpu: Refactor waiting for frames 2024-03-14 06:06:33 +01:00
gskgpurenderpassop.c gpu: Add GskGpuLoadOp 2024-08-21 21:13:34 +02:00
gskgpurenderpassopprivate.h gpu: Add GskGpuLoadOp 2024-08-21 21:13:34 +02:00
gskgpuroundedcolorop.c gsk: Change color op apis 2024-08-05 11:11:14 -04:00
gskgpuroundedcoloropprivate.h gsk: Change color op apis 2024-08-05 11:11:14 -04:00
gskgpuscissorop.c gpu: Add a CommandState struct to the command vfuncs 2024-01-07 07:22:51 +01:00
gskgpuscissoropprivate.h gpu: Add scissor operation 2024-01-07 07:22:49 +01:00
gskgpushaderflagsprivate.h gpu: Compile with AMD's compiler, too 2024-07-22 19:40:24 +02:00
gskgpushaderop.c gpu: Completely revamp YCbCr handling 2024-07-22 19:40:24 +02:00
gskgpushaderopprivate.h gsk: Change color op apis 2024-08-05 11:11:14 -04:00
gskgputextureop.c gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgputextureopprivate.h gpu: Remove descriptors 2024-07-22 19:40:24 +02:00
gskgputypesprivate.h gpu: Add GskGpuLoadOp 2024-08-21 21:13:34 +02:00
gskgpuuploadop.c memoryformat: Add linear/nearest choice for mipmaping 2024-09-06 15:47:35 -04:00
gskgpuuploadopprivate.h memoryformat: Add linear/nearest choice for mipmaping 2024-09-06 15:47:35 -04:00
gsknglrenderer.c gsk: Clear current context after unrealize() 2024-08-10 01:40:45 +02:00
gsknglrendererprivate.h gpu: Add outline of new GPU renderer 2024-01-07 07:22:49 +01:00
gskvulkanbuffer.c vulkan: Prefer cached buffer memory 2024-03-16 22:32:49 +01:00
gskvulkanbufferprivate.h gpu: Add ability to run shaders 2024-01-07 07:22:49 +01:00
gskvulkandevice.c gpu: Add GskGpuLoadOp 2024-08-21 21:13:34 +02:00
gskvulkandeviceprivate.h gpu: Add GskGpuLoadOp 2024-08-21 21:13:34 +02:00
gskvulkanframe.c gdk: Pass the opaque rect to begin_frame() actually 2024-08-10 01:40:46 +02:00
gskvulkanframeprivate.h gpu: sync dmabufs via semaphores 2024-01-07 07:22:52 +01:00
gskvulkanimage.c vulkan: Don't spam stderr on failed Vulkan import 2024-08-23 22:53:13 +02:00
gskvulkanimageprivate.h gpu: Completely revamp YCbCr handling 2024-07-22 19:40:24 +02:00
gskvulkanmemory.c gskvulkanmemory.c: Use VK_NULL_HANDLE for VkDeviceMemory 2024-05-29 12:57:07 +08:00
gskvulkanmemoryprivate.h gdk: Don't include vulkan.h in public API anymore 2024-01-07 14:47:22 +01:00
gskvulkanrenderer.c gpu: Remove the ubershader 2024-07-07 05:19:32 +02:00
gskvulkanrenderer.h gsk: include Vulkan renderer in public header 2024-01-07 14:47:22 +01:00
gskvulkanycbcr.c gpu: Completely revamp YCbCr handling 2024-07-22 19:40:24 +02:00
gskvulkanycbcrprivate.h gpu: Completely revamp YCbCr handling 2024-07-22 19:40:24 +02:00