broadcom/compiler: handle gl_SampleMask writes in fragment shaders

We didn't need this until now, since this was included with GLES 3.2,
but we need it for Vulkan.

Eric had already done the plumbing for it though, we just need to
actually emit the mask.

Fixes some tests in:
dEQP-VK.renderpass.suballocation.multisample_resolve.*

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga 2020-07-30 11:29:12 +02:00 committed by Marge Bot
parent 3310c1542c
commit 14d74c07aa
1 changed files with 4 additions and 3 deletions

View File

@ -1328,11 +1328,12 @@ vir_emit_tlb_color_write(struct v3d_compile *c, unsigned rt)
static void
emit_frag_end(struct v3d_compile *c)
{
/* XXX
if (c->output_sample_mask_index != -1) {
vir_MS_MASK(c, c->outputs[c->output_sample_mask_index]);
vir_SETMSF_dest(c, vir_nop_reg(),
vir_AND(c,
vir_MSF(c),
c->outputs[c->output_sample_mask_index]));
}
*/
bool has_any_tlb_color_write = false;
for (int rt = 0; rt < V3D_MAX_DRAW_BUFFERS; rt++) {