Closed Rua closed 5 months ago
FWIW, NVIDIA's implementation assumes extraPrimitiveOverestimationSize=0.0 if the struct is missing and VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT is enabled but __VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT is not enabled.
I think this becomes 1.
If DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE is used, extraPrimitiveOverestimationSize may be read, so it cannot be undefined (default). So pNext must be provided in that case.
I'll try something.
I suppose there's also a third possibility:
This should be fixed in the 1.3.283 spec update.
It's fixed for VkPipelineRasterizationConservativeStateCreateInfoEXT
, but what about the others mentioned? It's a more general problem.
The documentation of
VkPipelineRasterizationConservativeStateCreateInfoEXT
states that when this struct is not present in thepNext
chain ofVkPipelineRasterizationStateCreateInfo
, conservative rasterization is considered disabled. However, there is alsoVK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT
, which allows dynamically enabling and disabling conservative rasterization. In this combination, it's possible to dynamically enable conservative rasterization, yet without specifying the remaining fixed state via the struct (theflags
andextraPrimitiveOverestimationSize
fields in this case).I can think of two possible ways this could be clarified:
CreateInfo
struct is missing.CreateInfo
struct is considered to have a default value, which is used when the struct hasn't been provided.The same kind of issue may exist with other combinations of a pipeline
CreateInfo
struct and a dynamic state. One I have already spotted isVkPipelineRasterizationLineStateCreateInfoKHR
being missing withVK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT
enabled; this leaves thelineStippleFactor
andlineStipplePattern
fields unspecified when dynamically enabling viavkCmdSetLineStippleEnableEXT
.EDIT: Another case is
VkPipelineDiscardRectangleStateCreateInfoEXT
andVK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT
.