memcpy(ctx->blend_constants, color->color, sizeof(float) * 4);
}
+static void
+zink_set_sample_mask(struct pipe_context *pctx, unsigned sample_mask)
+{
+ struct zink_context *ctx = zink_context(pctx);
+ ctx->gfx_pipeline_state.sample_mask = sample_mask;
+}
+
static VkAccessFlags
access_flags(VkImageLayout layout)
{
ctx->base.set_active_query_state = zink_set_active_query_state;
ctx->base.set_blend_color = zink_set_blend_color;
+ ctx->base.set_sample_mask = zink_set_sample_mask;
+
ctx->base.clear = zink_clear;
ctx->base.draw_vbo = zink_draw_vbo;
ctx->base.flush = zink_flush;
ms_state.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
ms_state.alphaToCoverageEnable = state->blend_state->alpha_to_coverage;
ms_state.alphaToOneEnable = state->blend_state->alpha_to_one;
+ ms_state.pSampleMask = state->sample_mask ? &state->sample_mask : NULL;
VkPipelineViewportStateCreateInfo viewport_state = {};
viewport_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO;