weston/libweston
Pekka Paalanen 0f52da6226 gl-renderer: rework uniform value assignments
This patch gathers all values to be loaded to shader uniforms into a new
struct gl_shader_config along with texture target and filter
information. Struct gl_shader becomes opaque outside of gl-shaders.c.
Everything that used or open-coded these are converted.

The aim is to make gl-renderer.c easier to read. Previously, uniform
values were loaded up in various places, texture units were set up in
one place, textures were bound into units in different places. Stuff was
all over the place.

Now, shader requirements and associated uniform data is stored in a
single struct. The data is loaded into a shader program in one function
only.

That makes it easy for things like maybe_censor_override() to replace
the whole config rather than poke only the shader requirements. This may
not look like much right now, but when color management adds more
uniforms and even hardcoded color need to go through the proper color
pipeline, doing things the old way would become intractable.

Similar simplification can be seen in draw_view(), where the RGBA->RGBX
override becomes more contained. There is no longer a need to "pre-load"
the shader used by triangle fan debug. Triangle fan debug no longer
needs to play tricks with saving and restoring the current shader.

The real benefit of this change will probably come when almost all
shader operations need to take color spaces into account. That means
filling in gl_shader_config parts based on a color transformation.

This is based on an idea Sebastian already used in his Weston color
management work.

Co-authored-by: Sebastian Wick <sebastian@sebastianwick.net>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-04-07 11:45:10 +00:00
..
backend-drm libweston/backend-drm: Re-order gbm destruction at DRM-backend tear down 2021-04-01 11:28:44 +03:00
backend-fbdev pixman-renderer: Replace output-create flags with struct 2020-03-20 15:25:24 +00:00
backend-headless Add weston-drm-fourcc.h 2021-02-25 14:35:03 +02:00
backend-rdp backend-rdp: release seat on peer disconnect 2020-10-16 12:11:27 +00:00
backend-wayland Add weston-drm-fourcc.h 2021-02-25 14:35:03 +02:00
backend-x11 Add weston-drm-fourcc.h 2021-02-25 14:35:03 +02:00
renderer-gl gl-renderer: rework uniform value assignments 2021-04-07 11:45:10 +00:00
animation.c libweston: add missing include 2020-01-29 09:49:41 +00:00
backend.h pixman-renderer: share region_global_to_output() 2021-02-25 13:16:02 +02:00
bindings.c libweston: add missing include 2020-01-29 09:49:41 +00:00
clipboard.c libweston: add missing include 2020-01-29 09:49:41 +00:00
compositor.c gl-renderer: garbage-collect old shaders 2021-02-25 14:36:46 +02:00
content-protection.c libweston: fix typos 2021-02-24 10:01:17 -05:00
data-device.c libweston: constify data_source_interface 2020-10-21 14:18:30 +03:00
dbus.c
dbus.h
git-version.h.meson
input.c libweston: Send wl_keyboard.modifiers after wl_keyboard.enter 2020-07-09 17:47:11 +03:00
launcher-direct.c launcher-direct: handle seat0 without VTs 2021-01-21 09:02:26 +00:00
launcher-impl.h launcher: Add more error logging to launcher backends 2020-12-16 07:23:02 +00:00
launcher-logind.c launcher-logind: handle any seat without VTs 2021-01-21 09:02:26 +00:00
launcher-util.c launcher: Add more error logging to launcher backends 2020-12-16 07:23:02 +00:00
launcher-util.h
launcher-weston-launch.c launcher: Add more error logging to launcher backends 2020-12-16 07:23:02 +00:00
libinput-device.c libweston/libinput-device: Enable/Set pointer capabilities only on pointer movement 2020-12-08 17:54:55 +02:00
libinput-device.h
libinput-seat.c
libinput-seat.h
libweston-internal.h libweston: Add the ability to determine if a dmabuf is scanout-capable 2019-11-21 13:54:50 +02:00
linux-dmabuf.c Add weston-drm-fourcc.h 2021-02-25 14:35:03 +02:00
linux-dmabuf.h drop MOD_INVALID, MOD_LINEAR definitions 2021-02-25 14:35:03 +02:00
linux-explicit-synchronization.c libweston: Advertise minor version 2 of zwp_linux_explicit_synchronization_v1 2019-08-02 15:00:08 +00:00
linux-explicit-synchronization.h
linux-sync-file-uapi.h
linux-sync-file.c
linux-sync-file.h
log.c libweston: add missing include 2020-01-29 09:49:41 +00:00
meson.build libweston: Add weston-direct-display server side implementation 2019-11-18 19:33:09 +02:00
noop-renderer.c libweston: add missing include 2020-01-29 09:49:41 +00:00
pixel-formats.c libweston: fix #ifdef ENABLE_EGL 2021-03-12 16:14:28 +02:00
pixel-formats.h pixel-formats: add RGBA bits and type fields 2019-10-04 12:17:18 +03:00
pixman-renderer.c pixman-renderer: share region_global_to_output() 2021-02-25 13:16:02 +02:00
pixman-renderer.h pixman-renderer: Replace output-create flags with struct 2020-03-20 15:25:24 +00:00
plugin-registry.c
screenshooter.c libweston: do not damage on screenshot 2021-02-25 12:47:07 +02:00
spring-tool.c
timeline.c libweston: fix typos 2021-02-24 10:01:17 -05:00
timeline.h libweston: move TYPEVERIFY macro into shared 2021-02-17 12:52:33 +00:00
touch-calibration.c libweston: don't clean up surface role 2020-06-12 09:23:11 +00:00
vertex-clipping.c
vertex-clipping.h
weston-direct-display.c libweston: Add weston-direct-display server side implementation 2019-11-18 19:33:09 +02:00
weston-launch.c launcher-weston-launch: avoid race condition when switching VT merge 2020-01-30 12:11:37 +00:00
weston-launch.h launcher-weston-launch: avoid race condition when switching VT merge 2020-01-30 12:11:37 +00:00
weston-log-file.c weston-log: destroy subscriptions with destruction of subscribers 2020-02-10 10:53:50 +00:00
weston-log-flight-rec.c weston-log: destroy subscriptions with destruction of subscribers 2020-02-10 10:53:50 +00:00
weston-log-internal.h weston-log-wayland: make stream_destroy() use weston_log_subscriber_release() 2020-02-10 10:53:50 +00:00
weston-log-wayland.c weston-log-wayland: make stream_destroy() use weston_log_subscriber_release() 2020-02-10 10:53:50 +00:00
weston-log.c libweston: fix typos 2021-02-24 10:01:17 -05:00
zoom.c libweston: Add functions to modify disable_planes counter for an output 2019-08-26 16:18:22 +05:30