gen8/pipeline: Set IndependentAlphaBlendEnable properly
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 20 Nov 2015 19:52:54 +0000 (11:52 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 20 Nov 2015 19:52:54 +0000 (11:52 -0800)
src/vulkan/gen8_pipeline.c

index 2baa5c5f31d498002534a55e62fa3c4c4c693eac..618774eda6ec996206026c38138eb6d2c559a352 100644 (file)
@@ -204,6 +204,12 @@ emit_cb_state(struct anv_pipeline *pipeline,
    for (uint32_t i = 0; i < info->attachmentCount; i++) {
       const VkPipelineColorBlendAttachmentState *a = &info->pAttachments[i];
 
+      if (a->srcBlendColor != a->srcBlendAlpha ||
+          a->destBlendColor != a->destBlendAlpha ||
+          a->blendOpColor != a->blendOpAlpha) {
+         blend_state.IndependentAlphaBlendEnable = true;
+      }
+
       blend_state.Entry[i] = (struct GEN8_BLEND_STATE_ENTRY) {
          .LogicOpEnable = info->logicOpEnable,
          .LogicOpFunction = vk_to_gen_logic_op[info->logicOp],