Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layers: (SC) check PointSize valid usage #8

Closed
karl-lunarg opened this issue May 14, 2018 · 4 comments
Closed

Layers: (SC) check PointSize valid usage #8

karl-lunarg opened this issue May 14, 2018 · 4 comments
Assignees
Labels
Enhancement New feature or request
Milestone

Comments

@karl-lunarg
Copy link
Contributor

Issue by yavn (MIGRATED)
Friday Sep 23, 2016 at 13:37 GMT
Originally opened as KhronosGroup/Vulkan-LoaderAndValidationLayers#974


This is a feature request.

It seems that Vulkan requires (similar to GLES) that PointSize is written in VS when the vertex pipeline is outputting points. It would be nice if layer could detect this situation and report an error if PointSize is not assigned to in the shader.

Please check the spec for details. From what I understood, this only applies if vertex shader is the only active vertex stage, and only if drawing points (VK_PRIMITIVE_TOPOLOGY_POINT_LIST). In other stages the point size is 1.0 by default and there are other rules (e.g. see shaderTessellationAndGeometryPointSize feature).

@karl-lunarg karl-lunarg added this to the P2 milestone May 14, 2018
@karl-lunarg karl-lunarg added the Enhancement New feature or request label May 14, 2018
@karl-lunarg
Copy link
Contributor Author

Comment by chrisforbes (MIGRATED)
Saturday Sep 24, 2016 at 02:40 GMT


Seems like a reasonable thing to want, and shouldn't be a big deal to implement. I'm not convinced you've got the rules quite right, but I'll work from the spec.

@karl-lunarg
Copy link
Contributor Author

Comment by jekstrand (MIGRATED)
Friday Jan 13, 2017 at 16:35 GMT


+1 I just hit this in a CTS test where they were using tessellation with point_mode but weren't setting gl_PointSize in their tessellation evaluation shader. This comment serves as a note to the person working on this to remember tessellation!

The correct rules for this are fairly subtle. If you only have a vertex shader, then you must write gl_PointSize in the shader when using points. If you have a geometry or tessellation shader, then it depends on whether or not the shaderGeometryAndTessellationPointSize feature is enabled. If enabled, then you must write gl_PointSize in the last geometry shader stage. If disabled, then you must not write gl_PointSize and you get a default of 1.0.

@karl-lunarg
Copy link
Contributor Author

Comment by zeux (MIGRATED)
Saturday Oct 28, 2017 at 03:55 GMT


We've hit this issue as well - on some Android devices neglecting to output gl_PointSize results in a random value getting fed to the rasterizer, which can be hard to track down without a graphics debugger if the result of rasterization isn't directly visible on the screen...

IOW +1 - this is easy to miss and needs to be validated.

@mark-lunarg
Copy link
Contributor

Need to address @chrisforbes review findings in PR #261.

AttilioProvenzano-ARM added a commit to ARM-software/Vulkan-ValidationLayers that referenced this issue Feb 27, 2020
This commit adds checks regarding:
 - Store ops for potentially transient images
 - Framebuffer attachments that should/should not be transient
 - Clearing attachments after load
 - Many instanced vertex buffers in a pipeline

This corresponds to checks KhronosGroup#8, KhronosGroup#10-11, KhronosGroup#14 and KhronosGroup#32 from PerfDoc.
AttilioProvenzano-ARM added a commit to ARM-software/Vulkan-ValidationLayers that referenced this issue Feb 27, 2020
This commit adds checks regarding:
 - Store ops for potentially transient images
 - Framebuffer attachments that should/should not be transient
 - Clearing attachments after load
 - Many instanced vertex buffers in a pipeline

This corresponds to checks KhronosGroup#8, KhronosGroup#10-11, KhronosGroup#14 and KhronosGroup#32 from PerfDoc.
AttilioProvenzano-ARM added a commit to ARM-software/Vulkan-ValidationLayers that referenced this issue Feb 27, 2020
This commit adds checks regarding:
 - Store ops for potentially transient images
 - Framebuffer attachments that should/should not be transient
 - Clearing attachments after load
 - Many instanced vertex buffers in a pipeline

This corresponds to checks KhronosGroup#8, KhronosGroup#10-11, KhronosGroup#14 and KhronosGroup#32 from PerfDoc.
AttilioProvenzano-ARM added a commit to ARM-software/Vulkan-ValidationLayers that referenced this issue Feb 28, 2020
This commit adds checks regarding:
 - Store ops for potentially transient images
 - Framebuffer attachments that should/should not be transient
 - Clearing attachments after load
 - Many instanced vertex buffers in a pipeline

This corresponds to checks KhronosGroup#8, KhronosGroup#10-11, KhronosGroup#14 and KhronosGroup#32 from PerfDoc.
AttilioProvenzano-ARM added a commit to ARM-software/Vulkan-ValidationLayers that referenced this issue Feb 28, 2020
This commit adds checks regarding:
 - Store ops for potentially transient images
 - Framebuffer attachments that should/should not be transient
 - Clearing attachments after load
 - Many instanced vertex buffers in a pipeline

This corresponds to checks KhronosGroup#8, KhronosGroup#10-11, KhronosGroup#14 and KhronosGroup#32 from PerfDoc.
mark-lunarg pushed a commit that referenced this issue Feb 28, 2020
This commit adds checks regarding:
 - Store ops for potentially transient images
 - Framebuffer attachments that should/should not be transient
 - Clearing attachments after load
 - Many instanced vertex buffers in a pipeline

This corresponds to checks #8, #10-11, #14 and #32 from PerfDoc.
@shannon-lunarg shannon-lunarg modified the milestones: P1, sdk-1.2.148.0 Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants