zink: add better TODO note for surface swizzles

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12529>
This commit is contained in:
Mike Blumenkrantz 2021-04-06 10:29:28 -04:00 committed by Marge Bot
parent 6ff5eaa7d5
commit ea18b0930b
1 changed files with 8 additions and 1 deletions

View File

@ -78,7 +78,14 @@ create_ivci(struct zink_screen *screen,
ivci.format = zink_get_format(screen, templ->format);
assert(ivci.format != VK_FORMAT_UNDEFINED);
// TODO: format swizzles
/* TODO: it's currently illegal to use non-identity swizzles for framebuffer attachments,
* but if that ever changes, this will be useful
const struct util_format_description *desc = util_format_description(templ->format);
ivci.components.r = zink_component_mapping(zink_clamp_void_swizzle(desc, PIPE_SWIZZLE_X));
ivci.components.g = zink_component_mapping(zink_clamp_void_swizzle(desc, PIPE_SWIZZLE_Y));
ivci.components.b = zink_component_mapping(zink_clamp_void_swizzle(desc, PIPE_SWIZZLE_Z));
ivci.components.a = zink_component_mapping(zink_clamp_void_swizzle(desc, PIPE_SWIZZLE_W));
*/
ivci.components.r = VK_COMPONENT_SWIZZLE_R;
ivci.components.g = VK_COMPONENT_SWIZZLE_G;
ivci.components.b = VK_COMPONENT_SWIZZLE_B;