Skip to content

venus: scrub ignored fields of pipeline info when rasterization is disable

Yiwei Zhang requested to merge zzyiwei/mesa:pipeline-rasta-disable into main

In VkGraphicsPipelineCreateInfo:

  • pViewportState is a pointer to a VkPipelineViewportStateCreateInfo structure, and is ignored if the pipeline has rasterization disabled.
  • pMultisampleState is a pointer to a VkPipelineMultisampleStateCreateInfo structure, and is ignored if the pipeline has rasterization disabled.
  • pDepthStencilState is a pointer to a VkPipelineDepthStencilStateCreateInfo structure, and is ignored if the pipeline has rasterization disabled or if the subpass of the render pass the pipeline is created against does not use a depth/stencil attachment.
  • pColorBlendState is a pointer to a VkPipelineColorBlendStateCreateInfo structure, and is ignored if the pipeline has rasterization disabled or if the subpass of the render pass the pipeline is created against does not use any color attachments.

Ignored fields need to be scrubed in case app passes garbage pointer and crashes the encoder (caught by below new cts).

Test: dEQP-VK.api.pipeline.pipeline_invalid_pointers_unused_structs.graphics

/cc @olv @ryanneph

Edited by Yiwei Zhang

Merge request reports