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

Simplied Fullscreen-Triangle Shader in RadialBlur #244

Closed
twanks123 opened this issue Nov 2, 2016 · 4 comments
Closed

Simplied Fullscreen-Triangle Shader in RadialBlur #244

twanks123 opened this issue Nov 2, 2016 · 4 comments
Labels

Comments

@twanks123
Copy link

Hello Sasha,
i am referring to this line in radialBlur.vert:
outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2); gl_Position = vec4(outUV * 2.0f - 1.0f, 0.0f, 1.0f);
With validation layers enabled it throws a performance warning at vkCmdDraw(...):
"Vertex Buffers are bound to command buffer but no vertex buffers are attached to this Pipeline State Object"
Is it allowed to do this neat trick in vulkan? I could find only these two lines in the spec:
1.) All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound
2.) For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Section 20.2, “Vertex Input Description”

Does this mean know you shouldnt do this?
Greetings
SH

@SaschaWillems
Copy link
Owner

This is perfectly valid as long as you have a proper empty vertex input state for that pipeline (see https://github.com/SaschaWillems/Vulkan/blob/master/radialblur/radialblur.cpp#L696).

Seeing that this is just a performance warning, using this technique is fine, as the performance warnings may be a bit too strict. What version of the validation layers throws this warning?

@twanks123
Copy link
Author

The newest one (1.0.30.0). And yes i have an empty vertex-input-state for the pipeline. Should i report this to LunarG?

@SaschaWillems
Copy link
Owner

The layers from the SDK usually lag behind, so it's best to test with layers compiled from sources.

Performance warnings are debatable though, so this one may make sense for certain implementations. But if still present with recent layers build from source it may be a good idea to bring up the discussion over at validation layer repo (https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues).

@SaschaWillems
Copy link
Owner

I just checked with the layers built from the latest sources and the performance warning is still there. IMO this is misleading, so I opened up an issue over at the validation layer repo: KhronosGroup/Vulkan-LoaderAndValidationLayers#1080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants