Mesa (vulkan): anv/gen7_pipeline: Set WriteDisable = true if we have no color attachments
Jason Ekstrand
jekstrand at kemper.freedesktop.org
Thu Feb 18 02:38:47 UTC 2016
Module: Mesa
Branch: vulkan
Commit: 7c26d8d47174b19d91651c5eff3be9e71a004b24
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c26d8d47174b19d91651c5eff3be9e71a004b24
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Wed Feb 17 12:05:03 2016 -0800
anv/gen7_pipeline: Set WriteDisable = true if we have no color attachments
---
src/vulkan/gen7_pipeline.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/vulkan/gen7_pipeline.c b/src/vulkan/gen7_pipeline.c
index e329c8f..c4f7a36 100644
--- a/src/vulkan/gen7_pipeline.c
+++ b/src/vulkan/gen7_pipeline.c
@@ -113,15 +113,15 @@ gen7_emit_cb_state(struct anv_pipeline *pipeline,
{
struct anv_device *device = pipeline->device;
- if (info->pAttachments == NULL) {
+ if (info == NULL || info->attachmentCount == 0) {
pipeline->blend_state =
anv_state_pool_emit(&device->dynamic_state_pool,
GEN7_BLEND_STATE, 64,
.ColorBufferBlendEnable = false,
- .WriteDisableAlpha = false,
- .WriteDisableRed = false,
- .WriteDisableGreen = false,
- .WriteDisableBlue = false);
+ .WriteDisableAlpha = true,
+ .WriteDisableRed = true,
+ .WriteDisableGreen = true,
+ .WriteDisableBlue = true);
} else {
/* FIXME-GEN7: All render targets share blend state settings on gen7, we
* can't implement this.
More information about the mesa-commit
mailing list