You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to draw points using VK_PRIMITIVE_TOPOLOGY_POINT_LIST and VK_POLYGON_MODE_POINT but I get the following error: [mvk-error] VK_ERROR_FORMAT_NOT_SUPPORTED: VkPolygonMode value VK_POLYGON_MODE_POINT is not supported for render pipelines.
fillModeNonSolid is set to VK_TRUE and supported. Vulkaninfo show the fillModeNonSolid Device Feature as supported.
gl_PointSize is set in the vertex Shader
I'm missing something or is this a bug? I'm linking against the VulkanSDK 1.2.176.1 (using the vulkan.framework)
The following line inside the MVKPipeline.mm is for me not clear:
line 415: if (pCreateInfo->pInputAssemblyState && !isRenderingPoints(pCreateInfo))
If you look into the function, this will return true if VK_PRIMITIVE_TOPOLOGY_POINT_LIST or VK_POLYGON_MODE_POINT are set.
Why is this function in line 415 than negated?
The text was updated successfully, but these errors were encountered:
Because Metal doesn't have a MTLTriangleFillModePoints. I guess Apple just figured you'd use MTLPrimitiveTypePoint if you wanted to draw points. Although, rendering triangles and lines as points gives subtly different results than just drawing points straight up, mostly around primitive culling behavior. That is, if the triangle is the wrong winding, the points shouldn't be drawn at all, but with MTLPrimitiveTypePoint, they will be. We can't work around this, because Metal also doesn't support shader-controlled culling (CullDistance built-in in SPIR-V). Also, it gives different results for PrimitiveId. But Metal only got that fairly recently (macOS 10.15, iOS 13).
We used to actually use MTLPrimitiveTypePoint for this case, but then @kvark pointed out those discrepancies, so we added a bit to VK_KHR_portability_subset (now public) which indicates support for VK_POLYGON_MODE_POINT, which MoltenVK does not enable.
I'm trying to draw points using VK_PRIMITIVE_TOPOLOGY_POINT_LIST and VK_POLYGON_MODE_POINT but I get the following error:
[mvk-error] VK_ERROR_FORMAT_NOT_SUPPORTED: VkPolygonMode value VK_POLYGON_MODE_POINT is not supported for render pipelines.
fillModeNonSolid is set to VK_TRUE and supported. Vulkaninfo show the fillModeNonSolid Device Feature as supported.
gl_PointSize is set in the vertex Shader
I'm missing something or is this a bug? I'm linking against the VulkanSDK 1.2.176.1 (using the vulkan.framework)
The following line inside the MVKPipeline.mm is for me not clear:
line 415:
if (pCreateInfo->pInputAssemblyState && !isRenderingPoints(pCreateInfo))
If you look into the function, this will return true if VK_PRIMITIVE_TOPOLOGY_POINT_LIST or VK_POLYGON_MODE_POINT are set.
Why is this function in line 415 than negated?
The text was updated successfully, but these errors were encountered: