gen8/pipeline: Minor blending fixes
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 20 Nov 2015 19:52:28 +0000 (11:52 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 20 Nov 2015 19:52:30 +0000 (11:52 -0800)
This makes various fields match upstream mesa

src/vulkan/gen8_pipeline.c

index 9d4ee9927cf16234ffda794efda366dc7577f1a6..2baa5c5f31d498002534a55e62fa3c4c4c693eac 100644 (file)
@@ -198,6 +198,7 @@ emit_cb_state(struct anv_pipeline *pipeline,
 
    struct GEN8_BLEND_STATE blend_state = {
       .AlphaToCoverageEnable = info->alphaToCoverageEnable,
+      .AlphaToOneEnable = info->alphaToOneEnable,
    };
 
    for (uint32_t i = 0; i < info->attachmentCount; i++) {
@@ -208,8 +209,9 @@ emit_cb_state(struct anv_pipeline *pipeline,
          .LogicOpFunction = vk_to_gen_logic_op[info->logicOp],
          .ColorBufferBlendEnable = a->blendEnable,
          .PreBlendSourceOnlyClampEnable = false,
-         .PreBlendColorClampEnable = false,
-         .PostBlendColorClampEnable = false,
+         .ColorClampRange = COLORCLAMP_RTFORMAT,
+         .PreBlendColorClampEnable = true,
+         .PostBlendColorClampEnable = true,
          .SourceBlendFactor = vk_to_gen_blend[a->srcBlendColor],
          .DestinationBlendFactor = vk_to_gen_blend[a->destBlendColor],
          .ColorBlendFunction = vk_to_gen_blend_op[a->blendOpColor],