aboutsummaryrefslogtreecommitdiff
path: root/include/render/vulkan.h
diff options
context:
space:
mode:
authorManuel Stoeckl <code@mstoeckl.com>2023-10-21 12:38:20 -0400
committerSimon Ser <contact@emersion.fr>2023-11-21 11:08:55 +0000
commitdbe7fb70273ed1c9008bb5d36546d0d187f1217c (patch)
treea2315395d79219dd97e30729592fb5ff55557de0 /include/render/vulkan.h
parentfe6a432299852f9fce72358999c736172a9065bd (diff)
render/vulkan: undo alpha premult for 8-bpc ARGB/ABGR
When a texel from the Vulkan format VK_FORMAT_B8G8R8A8_SRGB is read, the sRGB to linear conversion is applied independently to the R, G, and B channels; the A channel has no influence on this. However, DRM_FORMAT_ARGB8888 buffers are, per Wayland protocol, not encoded in this fashion; one must first unpremultiply the color channels before doing sRGB to linear conversion. This commit switches to handling ARGB8888 and ABGR8888 formats using the general fragment shader conversion from electrical to optical values.
Diffstat (limited to 'include/render/vulkan.h')
0 files changed, 0 insertions, 0 deletions