Mesa (main): d3d12: When no framebuffer attachments are present, use ForcedSampleCount instead of SampleDesc.Count for MSAA
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 14 17:04:32 UTC 2022
Module: Mesa
Branch: main
Commit: 3f22038973b36416cbe5db8c1803db99980351da
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f22038973b36416cbe5db8c1803db99980351da
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Tue Jan 11 13:38:04 2022 -0800
d3d12: When no framebuffer attachments are present, use ForcedSampleCount instead of SampleDesc.Count for MSAA
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14504>
---
src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp b/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp
index f236f8b2fab..cff25192a47 100644
--- a/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp
@@ -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;
More information about the mesa-commit
mailing list