7903c5e667
This patch modifies the shader generation code so that the shaders are stitched together based on the requirement instead of creating them during initialization. This is necessary for HDR use cases where each surface would have different properties based on which different de-gamma or tone mapping or gamma shaders are stitched together. v2: Use /* */ instead of // (Pekka) Move shader strings to gl-shaders.c file (Pekka) Remove Makefile.am changes (Pekka) Use a struct instead of uint32_t for storing requirements (Pekka) Clean up shader list on destroy (Pekka) Rename shader_release -> shader_destroy (Pekka) Move shader creation/deletion into gl-shaders.c (Pekka) Use create_shaders's multi string capbility instead of concatenating (Pekka) v3: Add length check when adding shader string (Pekka) Signed-off-by: Harish Krupo <harishkrupo@gmail.com> v4: Rebased, PROTECTION_MODE_ENFORCED converted. Dropped unnecessary { }. Ported setup_censor_overrides(). Split out moving code into gl-shaders.c. Changed to follow "gl-renderer: rewrite fragment shaders", no more shader source stitching. Added SHADER_VARIANT_XYUV. Const'fy function arguments. Added gl_shader_requirements_cmp() and moved the early return in use_gl_program(). Moved use_gl_program() before first use in file. Split solid shader requirements by use case: requirements_censor and requirements_triangle_fan. Simplified fragment_debug_binding() since no need to force anything. Ensure struct gl_shader_requirements has no padding. This allows us to use normal C syntax instead of memset() and memcpy() when initializing or assigning. See also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2071 Make it also a bitfield to squeeze the size. v5: Move wl_list_insert() into gl_shader_create() (Daniel) Compare variant to explicit value. (Daniel) Change functions to gl_renderer_get_program, gl_renderer_use_program, and gl_renderer_use_program_with_view_uniforms. Use local variable instead of gr->current_shader. (Daniel) Simplified gl_renderer_get_program. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> |
||
---|---|---|
.. | ||
backend-drm | ||
backend-fbdev | ||
backend-headless | ||
backend-rdp | ||
backend-wayland | ||
backend-x11 | ||
renderer-gl | ||
animation.c | ||
backend.h | ||
bindings.c | ||
clipboard.c | ||
compositor.c | ||
content-protection.c | ||
data-device.c | ||
dbus.c | ||
dbus.h | ||
git-version.h.meson | ||
input.c | ||
launcher-direct.c | ||
launcher-impl.h | ||
launcher-logind.c | ||
launcher-util.c | ||
launcher-util.h | ||
launcher-weston-launch.c | ||
libinput-device.c | ||
libinput-device.h | ||
libinput-seat.c | ||
libinput-seat.h | ||
libweston-internal.h | ||
linux-dmabuf.c | ||
linux-dmabuf.h | ||
linux-explicit-synchronization.c | ||
linux-explicit-synchronization.h | ||
linux-sync-file-uapi.h | ||
linux-sync-file.c | ||
linux-sync-file.h | ||
log.c | ||
meson.build | ||
noop-renderer.c | ||
pixel-formats.c | ||
pixel-formats.h | ||
pixman-renderer.c | ||
pixman-renderer.h | ||
plugin-registry.c | ||
screenshooter.c | ||
spring-tool.c | ||
timeline.c | ||
timeline.h | ||
touch-calibration.c | ||
vertex-clipping.c | ||
vertex-clipping.h | ||
weston-direct-display.c | ||
weston-launch.c | ||
weston-launch.h | ||
weston-log-file.c | ||
weston-log-flight-rec.c | ||
weston-log-internal.h | ||
weston-log-wayland.c | ||
weston-log.c | ||
zoom.c |