anv/pipeline: Make the temp blend attachment state pointer const
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 26 Nov 2016 06:26:50 +0000 (22:26 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 26 Nov 2016 19:55:09 +0000 (11:55 -0800)
This fixes a "discards const" warning since blend is const.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/intel/vulkan/genX_pipeline.c

index cb164addfbdf40d2a85223660fe8457e3e13c385..86dd64755128a34a2dd98cafd710d1211baa3ae0 100644 (file)
@@ -1138,7 +1138,9 @@ emit_3dstate_ps(struct anv_pipeline *pipeline,
    bool dual_src_blend = false;
    if (wm_prog_data->dual_src_blend) {
       for (uint32_t i = 0; i < blend->attachmentCount; i++) {
-         VkPipelineColorBlendAttachmentState *bstate = &blend->pAttachments[i];
+         const VkPipelineColorBlendAttachmentState *bstate =
+            &blend->pAttachments[i];
+
          if (bstate->blendEnable &&
              (is_dual_src_blend_factor(bstate->srcColorBlendFactor) ||
               is_dual_src_blend_factor(bstate->dstColorBlendFactor) ||