d3d12: When no framebuffer attachments are present, use ForcedSampleCount instead of SampleDesc.Count for MSAA

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14504>
This commit is contained in:
Jesse Natalie 2022-01-11 13:38:04 -08:00
parent a21d2bfd77
commit 3f22038973

View file

@ -261,7 +261,12 @@ create_gfx_pipeline_state(struct d3d12_context *ctx)
pso_desc.RTVFormats[i] = d3d12_rtv_format(ctx, i);
pso_desc.DSVFormat = state->dsv_format;
pso_desc.SampleDesc.Count = state->samples;
if (state->num_cbufs || state->dsv_format != DXGI_FORMAT_UNKNOWN) {
pso_desc.SampleDesc.Count = state->samples;
} else {
pso_desc.SampleDesc.Count = 1;
pso_desc.RasterizerState.ForcedSampleCount = state->samples;
}
pso_desc.SampleDesc.Quality = 0;
pso_desc.NodeMask = 0;