v3dv: drop incorrect assertion on number of clear values at render pass begin

There can be more clear values than attachments, we should just ignore them
in that case.

Fixes some tests in:
dEQP-VK.fragment_operations.*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga 2020-03-19 10:11:28 +01:00 committed by Marge Bot
parent a81e63a302
commit e86f381ea1
1 changed files with 6 additions and 1 deletions

View File

@ -795,8 +795,13 @@ cmd_buffer_state_set_clear_values(struct v3dv_cmd_buffer *cmd_buffer,
{
struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;
const struct v3dv_render_pass *pass = state->pass;
assert(count <= pass->attachment_count);
/* There could be less clear values than attachments in the render pass, in
* which case we only want to process as many as we have, or there could be
* more, in which case we want to ignore those for which we don't have a
* corresponding attachment.
*/
count = MIN2(count, pass->attachment_count);
for (uint32_t i = 0; i < count; i++) {
const struct v3dv_render_pass_attachment *attachment =
&pass->attachments[i];