pvr: Support clear colours with more than 32 bits

The support for this seems to already exist, but was blocked by a
conditional. Replace with an assert to ensure the format can be packed
into 4x32 bit words (true for all currently supported formats).

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19799>
This commit is contained in:
Matt Coster 2022-10-31 11:03:10 +00:00 committed by Marge Bot
parent 0ad5b0a74e
commit fffc3866fe

View file

@ -570,6 +570,9 @@ pvr_load_op_constants_create_and_upload(struct pvr_cmd_buffer *cmd_buffer,
assert(load_op->is_hw_object);
assert(hw_render->color_init_count == 1);
assert(vk_format_get_blocksize(attachment->vk_format) <=
sizeof(hw_clear_value));
/* FIXME: add support for VK_ATTACHMENT_LOAD_OP_LOAD. */
assert(color_init->op == VK_ATTACHMENT_LOAD_OP_CLEAR);
@ -578,9 +581,6 @@ pvr_load_op_constants_create_and_upload(struct pvr_cmd_buffer *cmd_buffer,
clear_value->color,
hw_clear_value);
if (vk_format_get_blocksize(attachment->vk_format) > 4)
pvr_finishme("Handle clear color greater than 32 bits.");
result = pvr_cmd_buffer_upload_general(cmd_buffer,
&hw_clear_value[0],
sizeof(hw_clear_value),